3sharpltd Posted November 16, 2012 Share Posted November 16, 2012 The current issue is writing text to a jpeg image. The image can be found with the issue here: http://www.personali...labeldesign.php This generates the image but as you can see the text displays fine on the plain background but on the claret background the text pixelates. the php code is simple below: <?php define('gara','../forms/fonts/GARA.TTF'); $message1 = $text[0]; $color = imagecolorallocate($img, 0, 0, 0); $imagebox = imagettfbbox(67, 0, castellar, $message1); $x = ($imagebox[0] + (imagesx($img) / 2)) - ($imagebox[4] / 2); $y = ($imagebox[1] + (imagesy($img) / 2)) - ($imagebox[5] / 2); imagettftext($img, 67, 0, $x, $y, $color, gara, $message1); Header('Content-Type: image/jpeg'); imagejpeg($img); imagedestroy($img); ?> does anyone know why the text is pixalating? or how to resolve this issue as i have been trying to work arround this issue for a while. Many thanks, Liam Link to comment https://forums.phpfreaks.com/topic/270795-php-creating-a-jpeg-image/ Share on other sites More sharing options...
requinix Posted November 16, 2012 Share Posted November 16, 2012 Because GD isn't that great at manipulating images. Really. It can do small, simple tasks but that's about it. If you need quality then use ImageMagick instead. Link to comment https://forums.phpfreaks.com/topic/270795-php-creating-a-jpeg-image/#findComment-1393041 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.