Moron Posted December 7, 2007 Share Posted December 7, 2007 Okay, I get nothing but the little red 'x' when trying to display an image using the GD Library. When I run: <?php var_dump(gd_info()); ?> ...I get: array(12) { ["GD Version"]=> string(27) "bundled (2.0.28 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(false) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) } JPG support is inded enabled in my PHP.ini file. I'm running PHP 5. Anyone? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted December 7, 2007 Share Posted December 7, 2007 Probably an error in the script. Try removing any content headers and the imagejpeg function and accessing the script directly (rather than loading it in an image tag) and see if you get any errors. Quote Link to comment Share on other sites More sharing options...
Moron Posted December 7, 2007 Author Share Posted December 7, 2007 Probably an error in the script. Try removing any content headers and the imagejpeg function and accessing the script directly (rather than loading it in an image tag) and see if you get any errors. I'm using a different script now. No errors at all, but it displays the ASCII code for the image, not the image itself. What will it take to make the GD Library work? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 7, 2007 Share Posted December 7, 2007 That either means that no image type header was output or you are attempting to output image data directly on a web page instead of using a proper HTML <img src="..." tag. In either case, you need to post your code so someone here can see what you are doing. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted December 7, 2007 Share Posted December 7, 2007 When I'm playing with GD library I get the bulk written by not incorporating it into my script and just accessing it directly by typing the URL into the address bar much like GingerRobot says. That way I get to see error messages if any are generated and see my image when it works. Once I'm happy with it I add it into my script and if at a later date I change something that kills it I simply access it directly in another browser tab again so I can see the error messages. If phpinfo() shows GD library to be installed and you're not having much luck with it then start creating something basic like a rectangle and work from there. 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.