Fix #1707 support thumbnail height value of 'auto' in any type

This commit is contained in:
Kijin Sung 2021-06-19 23:11:59 +09:00
parent 856f2af743
commit 633bc340e7
3 changed files with 16 additions and 10 deletions

View file

@ -543,7 +543,13 @@ class FileHandler
{
$target_type = 'jpg';
}
// Automatically set resize_height if it is 'auto'
if ($resize_height === 'auto')
{
$resize_height = round($resize_width / ($width / $height));
}
// create temporary image having original type
if ($type === 'gif' && function_exists('imagecreatefromgif'))
{