note 6996 deleted from function.imagecreate by felipe

From: Date: Sat, 29 Dec 2007 18:30:40 +0000
Subject: note 6996 deleted from function.imagecreate by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134158@lists.php.net to get a copy of this message
Note Submitter: rolf dot winterscheidt at it-mannesmann dot de ---- Since I needed some time to get something on my screen, here a small example of creating graphics: <html> <head> </head> <body> <?php $pic=ImageCreate(600,600); $col1=ImageColorAllocate($pic,200,200,200); $col2=ImageColorAllocate($pic,0,0,255); ImageFilledRectangle($pic,1,1,100,100,$col2); ImagePNG($pic,"pic.png"); ImageDestroy($pic); ?> <img src="pic.png" border=0> </body> </html> -- You create a color for the background ($col1, seems to be zero for the background) and one for the boxcolor. The image will be written to disk as pic.png and you get it via normal html-command "img src"... That's it. Rolf

« previous php.notes (#134158) next »