]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixing bug in resizing function that would incorrectly attempt to crop a picture...
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 21 Jan 2010 16:17:58 +0000 (16:17 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 21 Jan 2010 16:17:58 +0000 (16:17 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3824 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/filestore.php

index 4627c93f00841836764d3021ec6d7483b1a5a688..f0b3baa4ce4646f7a19ec26721fcc3abe6417913 100644 (file)
@@ -888,8 +888,10 @@ function get_resized_image_from_existing_file($input_name, $maxwidth, $maxheight
                } elseif ($width < $new_width) {
                        $ratio = $new_height / $height;
                }
-               $region_height = $new_height = floor($height * $ratio);
-               $region_width = $new_width = floor($width * $ratio);
+               $region_height = $height;
+               $region_width = $width;
+               $new_height = floor($height * $ratio);
+               $new_width = floor($width * $ratio);
        }
 
        // load original image