Moargan Posted May 18, 2010 Share Posted May 18, 2010 I don't really use any image functions very often, so I have no idea what I've done wrong here. I recall having this problem before, but can't for the life of me remember, and can't seem to come up with the right search terms to find a solution. I'm using the simplepie library to get feed data, and I just want to print the titles of the feed items one after another over this image. Here's the file: http://ridiculouslogic.net/projects/feedimg/feed.php And the source: <?php include_once 'inc/simplepie.inc'; $feed = new SimplePie('http://feeds.arstechnica.com/arstechnica/everything'); $image = imagecreatefrompng("background.png"); $font = 'ARIAL.TTF'; $colour = imagecolorexact($image,0,0,0); imagealphablending($image,true); imagesavealpha($image,true); $title = $feed->get_title(); $down = 5; foreach ($feed->get_items(0, 0) as $item): $iTitle = $item->get_title(); imagefttext($image,14,0,5,$down,$colour,$font,$iTitle); $down = $down + 16; endforeach; imagepng($image); ?> Link to comment https://forums.phpfreaks.com/topic/202204-problem-with-gd-not-creating-image/ Share on other sites More sharing options...
Moargan Posted May 18, 2010 Author Share Posted May 18, 2010 Aaaand, I solved it myself. Forgot to set the header type. Link to comment https://forums.phpfreaks.com/topic/202204-problem-with-gd-not-creating-image/#findComment-1060299 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.