From 84e08a62838b0299a5daa7c9cac4be3eca6d0cb1 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 11 Jan 2011 01:04:10 -0800 Subject: Don't resize if the target size is the same as the original. Fixes #1602. --- modules/gallery/helpers/gallery_graphics.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery_graphics.php b/modules/gallery/helpers/gallery_graphics.php index fca18076..4cd7143e 100644 --- a/modules/gallery/helpers/gallery_graphics.php +++ b/modules/gallery/helpers/gallery_graphics.php @@ -56,7 +56,7 @@ class gallery_graphics_Core { } $dims = getimagesize($input_file); - if (max($dims[0], $dims[1]) < min($options["width"], $options["height"])) { + if (max($dims[0], $dims[1]) <= min($options["width"], $options["height"])) { // Image would get upscaled; do nothing copy($input_file, $output_file); } else { -- cgit v1.2.3