note 21545 rejected from function.imagecreatetruecolor by sander

From: Date: Thu, 16 May 2002 15:54:48 +0000
Subject: note 21545 rejected from function.imagecreatetruecolor by sander
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-30724@lists.php.net to get a copy of this message
Hi, I have compiled gd 2.0.1 into my php - but this function still doesn't work at least not well ! My page keeps reloading itself if I use this function and eventually my webserver crashes. Could someone provide a small working example of how to use this function. My example was : $pic=imagecreatetruecolor(1024,1024); imageFilledRectangle($pic,0,0,1023,1023,$currCol); $currCol=ImageColorAllocate($pic,255,255,255); $i=0; $j=0; $x1=0; $y1=0; $x2=4; $y2=4; for ($i=0;$i<256;$i++){ for ($j=0;$j<256;$j++){ $currCol=ImageColorAllocate($pic,$i,$j,0); imageFilledRectangle($pic,$x1,$y1,$x2,$y2,$currCol); $x1+=4; $x2+=4; } $y1+=4; $y2+=4; $x1=0; $x2=4; } ImagePNG($pic,"myTest.png"); echo '<HTML><HEAD><TITLE></TITLE></HEAD><BODY>'; echo '<IMG SRC="myTest.png" BORDER="1" ALT="Color test" ALIGN="TOP"></IMG>'; echo '</BODY></HTML>'; But this acts strangely as mentioned - Am I using the function incorrectly ?

« previous php.notes (#30724) next »