cheechm Posted May 11, 2008 Share Posted May 11, 2008 How do I remove the white bit around the borders of the image? http://nicks-world.co.uk/html.php COde here: http://nicks-world.co.uk/final.phps Link to comment https://forums.phpfreaks.com/topic/105177-gd-image-problems/ Share on other sites More sharing options...
owned Posted May 12, 2008 Share Posted May 12, 2008 What does the script do? Create a gradient colored text? Plus the script hogs all system resources, CPU usage 100% for awhile, doesn't look too good. Those white bits.. problem with alpha(i.e. transparency) channels probably? I think following code makes text correcly on transparent background without white bits and doesn't hog all system resources either. <?php $font="tahoma.ttf"; $col= imagecolorallocate($im, 0,170,0); $im = imagecreatetruecolor(400, 400); imagettftext($im, 20,0,400/2,400/2, $col, $font, 'TeXt'); header ("Content-type: image/png"); imagepng($im); imagedestroy($im); ?> Link to comment https://forums.phpfreaks.com/topic/105177-gd-image-problems/#findComment-538614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.