V-Tech Posted May 2, 2010 Share Posted May 2, 2010 I'm trying to understand this GD thing and i just came get it to work. I checked my host PHP info and the GD Support is enabled so it's not a problem with that. I found a script on the net and trying to work with it. What's wrong with this? <?php $im = imagecreatetruecolor(300, 300); $w = imagesx($im); $h = imagesy($im); $text = imagecreatetruecolor($w, $h); imagestring($text, 50, 50, 50, 'Hello', 0x0000FF); imagecopymerge($im, $text, 50, 50, 50, 50, $w, $h, 1000); header('Content-Type: image/gif'); imagegif($im); imagedestroy ($text); imagedestroy($im); ?> Link to comment Share on other sites More sharing options...
0 V-Tech Posted May 2, 2010 Author Share Posted May 2, 2010 Nevermind, got it working. Was a problem with a different code on the same page. :) Link to comment Share on other sites More sharing options...
0 Andrew Lyle Global Moderator Posted May 3, 2010 Global Moderator Share Posted May 3, 2010 Was about to say, that's just a giant black box with the blue word "hello" Link to comment Share on other sites More sharing options...
Question
V-Tech
I'm trying to understand this GD thing and i just came get it to work.
I checked my host PHP info and the GD Support is enabled so it's not a problem with that.
I found a script on the net and trying to work with it.
What's wrong with this?
<?php $im = imagecreatetruecolor(300, 300); $w = imagesx($im); $h = imagesy($im); $text = imagecreatetruecolor($w, $h); imagestring($text, 50, 50, 50, 'Hello', 0x0000FF); imagecopymerge($im, $text, 50, 50, 50, 50, $w, $h, 1000); header('Content-Type: image/gif'); imagegif($im); imagedestroy ($text); imagedestroy($im); ?>Link to comment
Share on other sites
2 answers to this question
Recommended Posts