note 41502 added to function.imagecreate

From: Date: Mon, 12 Apr 2004 20:11:56 +0000
Subject: note 41502 added to function.imagecreate
Groups: php.notes 
Request: Send a blank email to php-notes+get-68038@lists.php.net to get a copy of this message
You can set it up so you can write a text which is controled from the URL. Like this... <?php header("Content-type: image/png"); $im = @imagecreate(128, 16) or die("Cannot Initialize new GD image stream"); $bc = imagecolorallocate($im, 0, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagestring($im, 1, 4, 4, $t, $tc); imagepng($im); imagedestroy($im); ?> Then when you use the image, use this... <img src="http://www.yourdomain.com/stuff/cool_image.php?t=Text"> This will create an image with a cyan background, and in black text it will say "Text" EMail me at foxlovr1@cox.net or aquafox90@yahoo.com for comments/questions. ---- Manual Page -- http://www.php.net/manual/en/function.imagecreate.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41502 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41502&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41502&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68038) next »