Closed marco-pm closed 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.
$startwidth
$startheight
imagecopy
Implicit conversion from float to int loses precision
On PHP 8.1+, if
$startwidth
or$startheight
are float,imagecopy
generates aImplicit conversion from float to int loses precision
warning.