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] Link to comment https://forums.phpfreaks.com/topic/25378-image-creation-problem/ 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... Link to comment https://forums.phpfreaks.com/topic/25378-image-creation-problem/#findComment-115741 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. Link to comment https://forums.phpfreaks.com/topic/25378-image-creation-problem/#findComment-116020 Share on other sites More sharing options...
Maximus Posted October 29, 2006 Author Share Posted October 29, 2006 bump Link to comment https://forums.phpfreaks.com/topic/25378-image-creation-problem/#findComment-116377 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.