Can someone help me to draw single pixel using php GD library? I have such code:
$img = imagecreatetruecolor(100, 100);
$c = imagecolorallocate($img, 255, 0, 0);
$white = imagecolorallocate($img, 255, 255, 255);
imagefill($img, 0, 0, $white);
imagesetpixel($img, 0, 0, $c);
imagejpeg($img, 'created.jpg');die();
But the output is really weird (it is approximate image in top-left corner):
Is it possible to draw just one red pixel at x-0 y-0 position?