From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.3.0 PHP Bug Type: GD related Bug description: imagettftext don't work with a image copied resized from another
This code work fine on PHP 4.2.3 compiled with gd2.0.4, but give a image without text with php 4.3 compiled with internal gd support. I have this problem only in the image resized and not with the original image: if($width==$isize[0]) //original size: this work { $im = ImageCreateFromPNG ("bottoni/".$tipo_bottone); } else // to resize: don't work { $im1 = ImageCreateFromPNG("bottoni/".$tipo_bottone); $im=ImageCreateTrueColor($width, $isize[1]); ImageCopy($im, im1,0,0,0,0,$margin_width,$isize[1]); ImageCopyResized($im, $im1, $margin_width, 0, $margin_width, 0, $width, $isize[1], round($isize[0]-($margin_width * 2),0), $isize[1]); ImageCopy($im, $im1,$margin_width+$width-1,0,$isize[0]-$margin_width,0,$margin_width,$isize[1]); ImageDestroy($im1); } ImageAlphaBlending($im, true); $tc = ImageColorAllocate ($im, $colors[$color][0], $colors[$color][1], $colors[$color][2]); imagettftext($im, $size, 0, $center, $margin_height, $tc, $currpath."/fonts/".$font,$testo); ImageAlphaBlending($im, false); header("Content-Type: image/png\n\n"); ImagePNG($im); Thank for support Paolo Morandi -- Edit bug report at http://bugs.php.net/?id=21729&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21729&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21729&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21729&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21729&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21729&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21729&r=support Expected behavior: http://bugs.php.net/fix.php?id=21729&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21729&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21729&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21729&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21729&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21729&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21729&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21729&r=gnused