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 ? Quote Link to comment 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. Quote Link to comment 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) Quote Link to comment 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? Quote Link to comment 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) Quote Link to comment 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/ Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.