ID: 14116 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Old Bug Type: *General Issues Bug Type: GD related Operating System: Slackware 8 PHP Version: 4.0.6 New Comment:
<?php $fontsize=11; $angle=0; $fontfile="./pub/fonts/ARIAL.TTF"; $image = ImageCreateTrueColor(300, 16); $first=@imagecreatefromPNG("./pub/menuimg/$im1.png"); $white = imageColorAllocate($image, 255, 255, 255); $black = imageColorAllocate($image, 0, 0, 0); imageCopyResized($image,$first,1,0,0,0,ImageSX($first),ImageSY($first),ImageSX($first),ImageSY($first)); imagettftext($image, $fontsize, $angle, 23, 11, $black, $fontfile, "Main Page"); Header( "Content-type: image/png"); imagePNG($image); ImageDestroy ($image); ?> Previous Comments: ------------------------------------------------------------------------ [2001-11-19 10:44:11] [EMAIL PROTECTED] Can you post a sample script? You might be doing something wrong... ------------------------------------------------------------------------ [2001-11-19 10:40:33] [EMAIL PROTECTED] I am using: GD-2.0.1 FREETYPE-1.3.1 When I use the ImageCreate then the imageTTFtext works, streaming the image to the screen. If I use imageCreateTrueColor then the browse says "document contains no data". ------------------------------------------------------------------------ [2001-11-19 10:37:08] [EMAIL PROTECTED] Luke, what do you mean by it doesn't work? There is a known problem with anti-aliasing of ttf fonts on truecolor images in gd-2.0.1, but apart from looking rather crappy, it does work. ------------------------------------------------------------------------ [2001-11-19 10:32:57] [EMAIL PROTECTED] Which version of GD/Freetype are you using? Derick ------------------------------------------------------------------------ [2001-11-19 10:29:07] [EMAIL PROTECTED] For some reason I hanent been able to get imageTTFtext to work with ImageCreateTrueColor. It works fine with ImageCreate but not with the true color. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14116&edit=1 -- PHP Development 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]