From 8ae1f19fc5c4b89d3a1a4d58172d90e7ada0e937 Mon Sep 17 00:00:00 2001 From: patdenice Date: Fri, 15 Apr 2011 13:10:58 +0000 Subject: round is better than ceil for resizing pictures. git-svn-id: http://piwigo.org/svn/trunk@10383 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions_upload.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'admin') diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php index a51a71ae9..98c17d53b 100644 --- a/admin/include/functions_upload.inc.php +++ b/admin/include/functions_upload.inc.php @@ -496,13 +496,13 @@ function get_resize_dimensions($width, $height, $max_width, $max_height, $rotati { if ($ratio_width < $ratio_height) { - $destination_width = ceil($width / $ratio_height); + $destination_width = round($width / $ratio_height); $destination_height = $max_height; } else { $destination_width = $max_width; - $destination_height = ceil($height / $ratio_width); + $destination_height = round($height / $ratio_width); } } -- cgit v1.2.3