Hi there,

I am trying to put text into an image. There are some problems where I do
not find a solution for.

The image is a jpg and stored on the filesystem. Now I would like to create
a stamp in trutype font
verdana with a name. Just the text on the image.

I experianced following problems:
o The text has a white background which covers the other image
o It does not work with truetype. I tryed imagettftext but results in a
broken image.

Here is the code which should do the job, but does not:

$label = imagecreate(200,50);
$white = imagecolorallocate($label,255,255,255);
$black = imagecolorallocate($label,0,0,0);

Imagestring($label,1,0,0,'andy',$black);
#Imagettftext($label, 30,0,10,33,$black,'verdana.ttf',$number);

$photoImage = ImageCreateFromJPEG('card_city.jpg');
$pos_x = 5;
$pos_y= 220;
$label_w= 200;
$label_h = 50;
ImageCopy($photoImage, $label, $pos_x, $pos_y, 0, 0, $label_w, $label_h);

header("Content-type: image/jpeg");
imagejpeg($photoImage);

Has anybody an idea how to solve this prob?

Thanx in advance for any help.

Andy







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to