I have searched the archives, and either:
- I am stupid
- It really is hard to find stuff in the archives sometimes...
(but I'm willing to accept possibility 1 just as easily).
Anyway, here's my problem. I have the following:
<?
// header
Header("Content-Type: image/jpeg");
// set up image and colours
$im = ImageCreateFromJPEG("picture.jpg");
$white = ImageColorAllocate($im, 255, 255, 255);
// get font dimensiona
$font_height = ImageFontHeight(3);
$font_width = ImageFontWidth(3);
// get image dimensiona
$image_height = ImageSY($im);
$image_width = ImageSX($im);
// get string length
$length = $font_width * strlen($message);
// calculate start coordinates for string
$image_center_x = ($image_width/2)-($length/2);
$image_center_y = ($image_height/2)-($font_height/2);
if (!isset($message)) {
$message = "!isset";
} else if ($message <= "") {
$message = "not more then \"\"";
}
// write string
ImageString($im, 3, $image_center_x, $image_center_y, $message, $white);
// output to browser
ImageJPEG($im);
?>
stolen straight from some tutorial or other (since I'm messing with this to try to learn about it).
Anyway, the page that references this generates <img src="example.php?message=testing123"> or similar.
The image loads OK, but always comes up with my !isset debug test text, rather then testing123 like I want.
Any ideas please, since I am stuck on this, and out of brainpower...