I have this code working before (6 years ago) while upgrading to the latest PHP8, it doesn't work anymore, well it does when using absurd way putting "error_reporting(0);"
$a = imagecolorat($img, $x + $dx , $y);
$b = imagecolorat($img, $x, $y + $dy);
$c = imagecolorat($img, $x + $dx, $y + $dy);
I am getting this error message.
Notice: imagecolorat(): -1,0 is out of bounds on line 34
Notice: imagecolorat(): 0,-1 is out of bounds on line 35
Notice: imagecolorat(): -1,-1 is out of bounds on line 36
Do I miss something?