TheSky Posted April 3, 2011 Share Posted April 3, 2011 who know about imagecreatetruecolor i did google and found <?php header ('Content-type: image/png'); $im = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); imagepng($im); imagedestroy($im); ?> but i get error or i have disabled this function some kind ? Link to comment https://forums.phpfreaks.com/topic/232571-imagecreatetruecolor/ Share on other sites More sharing options...
SamT_ Posted April 3, 2011 Share Posted April 3, 2011 You either need to remove the error suppression (get rid of the @ sign in front of imagecreatetruecolor()) or remove the "or die" clause at the end. Link to comment https://forums.phpfreaks.com/topic/232571-imagecreatetruecolor/#findComment-1196286 Share on other sites More sharing options...
TheSky Posted April 3, 2011 Author Share Posted April 3, 2011 <?php header ('Content-type: image/png'); $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); imagepng($im); imagedestroy($im); ?> still same problem (picture contains errors) Link to comment https://forums.phpfreaks.com/topic/232571-imagecreatetruecolor/#findComment-1196293 Share on other sites More sharing options...
SamT_ Posted April 3, 2011 Share Posted April 3, 2011 Code is working (pic), my guess is GD is not enabled or something. I am not seeing any picture in either of your posts, could you just copy-paste your error message? Link to comment https://forums.phpfreaks.com/topic/232571-imagecreatetruecolor/#findComment-1196298 Share on other sites More sharing options...
TheSky Posted April 3, 2011 Author Share Posted April 3, 2011 i taked url off so in english it means "cannot display image it contains errors" and in IE i get just X (broken image) Link to comment https://forums.phpfreaks.com/topic/232571-imagecreatetruecolor/#findComment-1196302 Share on other sites More sharing options...
litebearer Posted April 3, 2011 Share Posted April 3, 2011 try here - http://jontangerine.com/silo/php/phpinfo/ Link to comment https://forums.phpfreaks.com/topic/232571-imagecreatetruecolor/#findComment-1196315 Share on other sites More sharing options...
TheSky Posted April 3, 2011 Author Share Posted April 3, 2011 GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.2.1 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XPM Support enabled XBM Support enabled Link to comment https://forums.phpfreaks.com/topic/232571-imagecreatetruecolor/#findComment-1196349 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.