Disappearing Type1 text
| From: | Mika Tuupola | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Disappearing Type1 text | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1819@lists.php.net to get a copy of this message | ||
I have a script which dynamically writes text using
imagepstext() to an image created with imagecreatefromgif().
It works fine except for on thing; sometimes the text just
wont show. This happens in about 1/15 or 1/20 times when
loading the image.
Any idea what might be causing this?
<?
Header ("Content-type: image/gif");
$im = imagecreatefromgif("base.gif");
$tc = ImageColorAllocate ($im, 102, 51, 0);
$bg = ImageColorAllocate ($im, 255, 255, 153);
$fo = ImagePSLoadFont("/usr/local/share/fonts/type1/RLSAB___.PFB");
ImagePSText($im, "foobar", $fo, 18, $tc, $bg, 60, 28, 0, 0, 0,16);
ImageGif ($im);
ImageDestroy ($im);
?>
--
Mika Tuupola http://www.appelsiini.net/~tuupola/