imagettftext() question
| From: | Mike Rotondo | Date: | Mon, 24 May 2004 19:52:41 +0000 |
| Subject: | imagettftext() question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186842@lists.php.net to get a copy of this message | ||
I've written a script that displays a graph of some data from a text file.
Beneath each bar in the graph is a text label. I read the php.net
documentation and it seemed that imagettftext() was the easiest function to
get text in an image with, so I used that. Here is the text-display code
(syntax is all correct):
imagettftext($im, 10, 0, $i * 100 + 10, 190, $black, "arial",
str_pad($candidates[$i][0], 12, " ", STR_PAD_BOTH));
This code works perfectly well on both windows machines I've tried it on,
but causes an error in the image on both non-windows (Unix variants)
machines I've tried it on. Does anyone have
-any idea why its breaking?
-a solution to get it to work on *nix machines?
-a different way to display text in an image?
Thanks a lot.