From ca08eb6d170d375ef4fca53604956f3474c7db19 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 22 Aug 2010 22:37:30 +0000 Subject: Merged r6701:6756 from 1.7 branch into trunk git-svn-id: http://code.elgg.org/elgg/trunk@6849 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/filestore.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'engine/lib/filestore.php') diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php index 4e92fee21..0a30f5551 100644 --- a/engine/lib/filestore.php +++ b/engine/lib/filestore.php @@ -951,13 +951,7 @@ function get_image_resize_parameters($width, $height, $options) { } // check for upscaling - // @todo This ignores squares, coordinates, and cropping. It's probably not the best idea. - // Size checking should be done in action code, but for backward compatibility - // this duplicates the previous behavior. if (!$upscale && ($height < $new_height || $width < $new_width)) { - // zero out offsets - $widthoffset = $heightoffset = 0; - // determine if we can scale it down at all // (ie, if only one dimension is too small) // if not, just use original size. @@ -968,10 +962,9 @@ function get_image_resize_parameters($width, $height, $options) { } elseif ($width < $new_width) { $ratio = $new_height / $height; } + $selection_height = $height; $selection_width = $width; - $new_height = floor($height * $ratio); - $new_width = floor($width * $ratio); } $params = array( @@ -986,7 +979,6 @@ function get_image_resize_parameters($width, $height, $options) { return $params; } - // putting these here for now function file_delete($guid) { if ($file = get_entity($guid)) { -- cgit v1.2.3