79301069

Date: 2024-12-22 13:27:00
Score: 2
Natty:
Report link

php 8.1 and above Deprecated: Implicit conversion from float to int loses precision in

imagecopy ($img, $font, $x - $shift, $y, $m['start'], 1, $m['end'] - $m['start'], $fontfile_height);

next

$color = imagecolorat($img, $px, $py) & 0xff;

next

else {
                    $color = imagecolorat($img, $sx, $sy) & 0xFF;
                    $color_x = imagecolorat($img, $sx + 1, $sy) & 0xFF;
                    $color_y = imagecolorat($img, $sx, $sy + 1) & 0xFF;
                    $color_xy = imagecolorat($img, $sx + 1, $sy + 1) & 0xFF;
                }

next

imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newred, $newgreen, $newblue));

I changed to

imagecopy ((int) ($img, $font, $x - $shift, $y, $m['start'], 1, $m['end'] - $m['start'], $fontfile_height));

but no positive effect What's wrong?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: simmy0583