MDL-81256 lib: fix rounding of thumbnail image size
This commit is contained in:
+2
-2
@@ -359,8 +359,8 @@ function resize_image_from_image($original, $imageinfo, $width, $height, $forcec
|
||||
}
|
||||
|
||||
if ($ratio < 1) {
|
||||
$targetwidth = floor($originalwidth * $ratio);
|
||||
$targetheight = floor($originalheight * $ratio);
|
||||
$targetwidth = round($originalwidth * $ratio);
|
||||
$targetheight = round($originalheight * $ratio);
|
||||
} else {
|
||||
// Do not enlarge the original file if it is smaller than the requested thumbnail size.
|
||||
$targetwidth = $originalwidth;
|
||||
|
||||
Reference in New Issue
Block a user