The text printed on this image looks sloppy and grainy. (This image is being
generated on a linux server RH 7.1, Apache 1.3.19, with GD 1.8)  I remember
seeing something about adjusting the quality of the image, but I can't find
it now, and even if I did, I don't know how much help it would be, because I
also recall seeing that it defaulted to 100. My question is this, is there a
way to generate a quality image or improve the quality of this image, or am
I stuck? As a side note, images that don't contain text seem to generate
very cleanly. Would it be possible to make the background transparent, like
a transparent gif?

-C

<?php
################################################
### draw an image for the header and print some stuff on it.
###############################################

## tell the browser what it is
header("Content-type: image/jpeg");

## draw a new image
$width = 600;
$height = 100;
$image = imagecreate($width, $height);

##make the background same as page
$backg = imagecolorallocate($image, 0, 51, 102);

##make the text white
$text = imagecolorallocate($image, 255, 255, 255);

imagefilledrectangle($image, 0, 0, $width, $height, $backg);
imagettftext($image, 30, 0, 200, 25, $text,

## now let's print some text to the image
"/usr/share/fonts/ttf/GARAIT.TTF", "foo");
imagettftext($image, 40, 0, 60, 75, $text,
"/usr/share/fonts/ttf/GARAIT.TTF", "some guy");

## off it goes
imagejpeg($image);

## cleanup
imagedestroy($image);

?>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to