note 16596 deleted from ref.image by didou
| From: | didou@php.net | Date: | Sun, 07 Dec 2003 02:20:21 +0000 |
| Subject: | note 16596 deleted from ref.image by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61507@lists.php.net to get a copy of this message | ||
Note Submitter: mkinsman@tcs-basys.com
----
Thanks for the notes on testing gd support in the distribution! It did save me a lot of time! Just
an update, though. Your code didn't work right off the bat for my system, because later
versions of PHP may not support GIF format due to 'copyright stuff'. However, it's
easy enough to change the code to output as JPEG or PNG or whatever. For example, to test JPEG
support instead:
// create the image
$gif = ImageCreate(200,200);
$bg = ImageColorAllocate($gif,0,0,0);
$tx = ImageColorAllocate($gif,255,128,128);
ImageFilledRectangle($gif,0,0,200,200,$bg);
ImageString($gif,3,70,90,"it works !",$tx);
// send the image
header("content-type: image/jpeg");
ImageJPEG($gif);
That's all folks !!