Maximus Posted October 28, 2006 Share Posted October 28, 2006 Hi, I am trying to create an image via php. I get "the image cannot be displayed, because it contains errors" message when viewing it. I don't know what I've done wrong, can someone point it out to me? Thanks![code]<?phpheader("Content-type: image/png");$string = $_GET['text'];$image = imagecreatefrompng("images/image_price.jpg");$color = imagecolorallocate($image, 255, 255, 250);$font = "images/font.ttf";imagestring($image, $font, 0, 0, $string, $color);imagepng($image);imagedestroy($image);?> [/code] Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted October 28, 2006 Share Posted October 28, 2006 do you have GD Library enabled because i think that may have an effect on the output... Quote Link to comment Share on other sites More sharing options...
Maximus Posted October 28, 2006 Author Share Posted October 28, 2006 Yes, I checked via phpinfo, everything related to GD is enabled. Quote Link to comment Share on other sites More sharing options...
Maximus Posted October 29, 2006 Author Share Posted October 29, 2006 bump 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.