Skip to content

Commit d12d8cf

Browse files
Merge pull request #151 from HansPeterOrding/hanspeterording/issue-150
Issue 150
2 parents a54710a + c0d6ebe commit d12d8cf

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 = (int) round($height / $ratio);
513513
}
514514

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

0 commit comments

Comments
 (0)