Problem with ImageJpeg
| From: | David Coulter | Date: | Fri, 03 Nov 2000 04:53:41 +0000 |
| Subject: | Problem with ImageJpeg | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-3656@lists.php.net to get a copy of this message | ||
Greetings,
I'm using the php4win flavor of PHP 4.0.3 on a NT 4 machine through
IIS. I'm trying to use the Image functions to brand an image... here is
the code:
$string = "My Image";
$img = "d:\\web sites\\topes.ehnet.org\\halfdome.jpg";
$size = GetImageSize ($img);
$im = ImageCreateFromJPEG ($img);
$white = imagecolorclosest ($im, 255, 255, 255);
$black = imagecolorclosest ($im, 0, 0, 0);
ImageTTFText ($im, 12, 90, $size[0] - 6, $size[1] - 6, $black,
"c:\\winnt\\fonts\\tahoma.ttf",
$string);
ImageTTFText ($im, 12, 90, $size[0] - 5, $size[1] - 5, $white,
"c:\\winnt\\fonts\\tahoma.ttf",
$string);
ImageJPEG ($im, "d:\\web sites\\topes.ehnet.org\\halfdome_new.jpg");
Now, the new image is saved without any trouble, but no matter what I
put around this code, I get the following error at the very end of the
page.
Warning: Unknown list entry type in request shutdown (1333576) in
Unknown on line 0
It doesn't happen if I don't specify a filename for ImageJPEG. Any
ideas? Thanks.
David Coulter