adding text on an already made image
Posted: Sat Apr 03, 2004 9:16 am
Hi,
I have a business card site, and I want to have users to be able to add text on the business card image to see what it looks like.
First, I need to know how to add text on an already made image. Its a white business card :
<?
header ("Content-type: image/jpg");
$image = imagecreatefromjpeg ("blank.jpg");
$black = imagecolorresolve ($image, 0, 0, 0);
imagettftext ($image, 20, 0, 10, 20, $black, "Test Text");
imagejpeg($image,'',90);
imagedestroy($image);
?>
However, I see only the picture. No text! I dont know whats wrong!
I would be thankful for any help.
I have a business card site, and I want to have users to be able to add text on the business card image to see what it looks like.
First, I need to know how to add text on an already made image. Its a white business card :
<?
header ("Content-type: image/jpg");
$image = imagecreatefromjpeg ("blank.jpg");
$black = imagecolorresolve ($image, 0, 0, 0);
imagettftext ($image, 20, 0, 10, 20, $black, "Test Text");
imagejpeg($image,'',90);
imagedestroy($image);
?>
However, I see only the picture. No text! I dont know whats wrong!
I would be thankful for any help.