aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/filestore.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-21 16:17:58 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-21 16:17:58 +0000
commit8b586a622e78017c86c824b443f60d0b14437033 (patch)
tree95994fc83c93af009280f1ec8bf30c67ce259f5d /engine/lib/filestore.php
parenta664329577170d2ad46d0912acc74b30669f741b (diff)
downloadelgg-8b586a622e78017c86c824b443f60d0b14437033.tar.gz
elgg-8b586a622e78017c86c824b443f60d0b14437033.tar.bz2
Fixing bug in resizing function that would incorrectly attempt to crop a picture that was smaller than the target image.
git-svn-id: http://code.elgg.org/elgg/trunk@3824 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/filestore.php')
-rw-r--r--engine/lib/filestore.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php
index 4627c93f0..f0b3baa4c 100644
--- a/engine/lib/filestore.php
+++ b/engine/lib/filestore.php
@@ -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