Simple GD Library Question
I hate it when I just can't see the problem in such a simple script.
This doesn't output the value of $_GET['n'] onto my image:
For anybody who is enough of a saint to look at this for me, just run this script in a directory with the two attached files. It's just a simple png and the trebuchet bold font file.
$numberFont = "trebuchet_bold.ttf";
$marker = imagecreatefrompng('markerImage.png'); //create the working image resource from the invitation
//get the color resources of the font
$whiteColor = imagecolorallocate($marker,255,255,255);
untested, but i'd try this:
Originally Posted by php.net
You try passing it in as a var instead of a global?
Seems pretty silly but I noticed in the Docs no one is using super globals
to pass in data, AKA
What does $_GET['n']; print to?
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
Don't know what the problem was with this script, but I solved it by just copying and pasting from an old GD script that worked like this and trimmed it down to my needs. Still don't understand what the problem was with it....could've been something simple - but printing $_GET['n'] always printed out the number to the screen when I turned the png headers off (it was usually something like script.php?n=374)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)