Hey, I have been experimenting a little with PHP's GD library and I don't quite understand how space is allocated for a rectangle. In this example here:
<?
$im = ImageCreate(200,200);
$white = ImageColorAllocate($im,0xFF,0xFF,0xFF);
$black = ImageColorAllocate($im,0x00,0x00,0x00);
ImageFilledRectangle($im,50,50,150,150,$black);
header('Content-Type: image/png');
ImagePNG($im);
?>
The width and length of the image is twice as x coord - y coord. But in another image I am making:
$im = ImageCreate(900, 900);
$white = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $white);
$black = imagecolorallocate($im, 50, 50, 50);
imagerectangle($im, 500, 10, 850, 360, $black);
header("Content-type: image/jpeg");
imagejpeg($im);
imagedestroy($im);
I had to make the image this big so it would actually show up. Why do I need to make the image so big here? Is it because I am creating the image farther along the x axis?