mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-19 08:02:59 +02:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user