aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-04-15 13:16:29 +0000
committerpatdenice <patdenice@piwigo.org>2011-04-15 13:16:29 +0000
commit1d46b06ee1f62790e0901e18712762315e05d426 (patch)
tree7c87d7e13da897240bf28cf57e83b0c31150c9f2
parentb3e98a2dd271a8abfec866ad04eeb3b27850f4a6 (diff)
merge r10383 from trunk to branch 2.2
round is better than ceil for resizing pictures. git-svn-id: http://piwigo.org/svn/branches/2.2@10384 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/include/functions_upload.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php
index 24400c5f5..1b688c0ea 100644
--- a/admin/include/functions_upload.inc.php
+++ b/admin/include/functions_upload.inc.php
@@ -490,13 +490,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);
}
}