Changeset View
Changeset View
Standalone View
Standalone View
core/units/helpers/image_helper.php
Show First 20 Lines • Show All 484 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
$ratio = $resize_by == 'width' ? $width_ratio : $height_ratio; | $ratio = $resize_by == 'width' ? $width_ratio : $height_ratio; | ||||
} | } | ||||
else { | else { | ||||
$ratio = min($width_ratio, $height_ratio); | $ratio = min($width_ratio, $height_ratio); | ||||
} | } | ||||
$width = ceil($orig_width * $ratio); | $width = (int)round($orig_width * $ratio); | ||||
$height = ceil($orig_height * $ratio); | $height = (int)round($orig_height * $ratio); | ||||
} | } | ||||
else { | else { | ||||
$width = $orig_width; | $width = $orig_width; | ||||
$height = $orig_height; | $height = $orig_height; | ||||
} | } | ||||
return Array ($width, $height, $too_large); | return Array ($width, $height, $too_large); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines |