Hello,

I am trying to print some text over an image and then after sending it to the browser, delete the image.

The quality of the Text printed image is terrible.

I have used this code before without issue, but now the photo is ocming out poor.

Here are links to the images:
http://uptet.com/bikeissue/149-sold.jpg
http://uptet.com/bikeissue/149.jpg
http://uptet.com/bikeissue/155-sold.jpg
http://uptet.com/bikeissue/155.jpg

It's werid too, the 155 image is supposed to print the SOLD as white and it is showing as black

Any ideas?

$bikepic = "store/bikePics/{$rowBike[pic]}";
$src = ImageCreateFromjpeg("$bikepic");
$font = "/home/account/Papyrus.TTF";

$size = GetImageSize("$bikepic");
$img = ImageCreate($size[0],$size[1]); 
ImageCopy($img,$src,0,0,0,0,$size[0],$size[1]);
$white = ImageColorAllocate($img, 255,255,255);

$tmpxN = ImageTTFBBox(18,0,$font,"SOLD");

$hxN = (($size[0] - $tmpxN[2]) / 2);
$hyN = (($size[1] - $tmpxN[3]) / 2);

ImageTTFText ($img, 18, 30, $hxN, $hyN, $white, $font, "SOLD");

					Imagejpeg($img,"store/bikePicsSold/{$rowBike[pic]}", 100);

print "<img src=\"store/bikePicsSold/{$rowBike[pic]}\" hspace=\"0\" vspace=\"0\" border=\"0\" />";

Any suggestions?

Thanks.

    Have you tried imagecreatetruecolor() ?

      just did and it worked like a charm!

      Thanks!

        Write a Reply...