note 16596 added to ref.image
| From: | mkinsman at tcs-basys dot com | Date: | Mon, 05 Nov 2001 20:10:30 +0000 |
| Subject: | note 16596 added to ref.image | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-20470@lists.php.net to get a copy of this message | ||
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 !!
--
http://www.php.net/manual/en/ref.image.php
http://master.php.net/manage/user-notes.php?action=edit+16596
http://master.php.net/manage/user-notes.php?action=delete+16596
http://master.php.net/manage/user-notes.php?action=reject+16596