Skip to content

Commit e112cd6

Browse files
author
Björn May
committed
Issue 150
Always return int value for dest_w on resizeToBestFit
1 parent c71fe1c commit e112cd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ImageResize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public function resizeToBestFit($max_width, $max_height, $allow_enlarge = false)
509509

510510
if ($height > $max_height) {
511511
$height = $max_height;
512-
$width = $height / $ratio;
512+
$width = intval(round($height / $ratio));
513513
}
514514

515515
return $this->resize($width, $height, $allow_enlarge);

0 commit comments

Comments
 (0)