I am trying to overlay text in a ttf font over an already existing
image. From what I can see it should work but I'm not sure what the
problem is.
<?
Header ("Content-type: image/png");
putenv('GDFONTP ATH=' . realpath('.'));
$font = 'j';
$img_handle = imageCreateFrom PNG("stupid.png ");
$color = ImageColorAlloc ate ($img_handle, 100, 100, 100);
$wrong = $_GET['wrong'];
$right = $_GET['right'];
imagettftext($i mg_handle, 3, 10, 49, $font, $color, "$wrong is
$right!!");
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>
It says the image can not be displayed because it contains errors.
Thanks,
Ryan
image. From what I can see it should work but I'm not sure what the
problem is.
<?
Header ("Content-type: image/png");
putenv('GDFONTP ATH=' . realpath('.'));
$font = 'j';
$img_handle = imageCreateFrom PNG("stupid.png ");
$color = ImageColorAlloc ate ($img_handle, 100, 100, 100);
$wrong = $_GET['wrong'];
$right = $_GET['right'];
imagettftext($i mg_handle, 3, 10, 49, $font, $color, "$wrong is
$right!!");
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>
It says the image can not be displayed because it contains errors.
Thanks,
Ryan
Comment