Fix background color of resized image
This commit is contained in:
parent
92a98f6c38
commit
9b4c856b51
|
@ -44,10 +44,10 @@ class UploadImage
|
|||
$image = new SimpleImage();
|
||||
|
||||
$image->load($file);
|
||||
$image->resizeInCenter(160, 160, "#ffffff");
|
||||
$image->resizeAllInCenter(160, 160, "#ffffff");
|
||||
$image->save($path_img . $filename . '.webp', "webp");
|
||||
|
||||
$image->resizeInCenter(48, 48, "#ffffff");
|
||||
$image->resizeAllInCenter(48, 48, "#ffffff");
|
||||
$image->save($path_img_small . $filename . '.webp', "webp");
|
||||
|
||||
$new_img = $filename . '.webp';
|
||||
|
|
Loading…
Reference in a new issue