Hi!
I need help with a script I wrote. It is about image generation. When I create an image from a jpeg file and then add some text to it, the output doesn't have proper antialiasing (http://www.bucky-online.com/estore/?d=1 ). In contrast, when I create a jpeg image up from a scratch, antialiasing seems to work much better (http://www.bucky-online.com/estore/?d=2 )
Can someone give me a hand with case 1 - I need to make the font look better. I would appreciate any help.
Here is my code:
switch ($d) {
case 1:
header ("Content-type:image/jpeg");
$im = imagecreatefromjpeg ("vhd_002.jpg");
$white = imagecolorallocate ($im, 255, 255, 255);
imagettftext ($im, 40, 0, 10, 60, $white, "/path_to_font_file", "Testing...Omega: Ω");
imagejpeg($im);
imagedestroy ($im);
break;
case 2:
header ("Content-type: image/jpeg");
$im = imagecreate (457, 200);
$black = imagecolorallocate ($im, 0, 0, 0);
$white = imagecolorallocate ($im, 255, 255, 255);
imagettftext ($im, 40, 0, 10, 60, $white, "/path_to_font_file", "Testing...Omega: Ω");
imagejpeg ($im);
imagedestroy ($im);
break;
}