lat9 / zen_Image-Handler

Image Handler 5 is really meant to ease the management of product images (particularly the management of additional product images), and to help improve page performance by optimizing the product images.
GNU General Public License v2.0
2 stars 3 forks source link

`imagecopy` float implicit conversion warning #13

Closed marco-pm closed 1 year ago

marco-pm commented 1 year ago
$startwidth = (int)($this->canvas['width'] - $newwidth) / 2;
$startheight = (int)($this->canvas['height'] - $newheight) / 2;

[...]

imagecopy($newimg, $tmpimg, $startwidth, $startheight, 0, 0, $newwidth, $newheight);

On PHP 8.1+, if $startwidth or $startheight are float, imagecopy generates a Implicit conversion from float to int loses precision warning.