madspof Posted September 12, 2007 Share Posted September 12, 2007 I cannot get the gd feature to work with the scripts that are shown in one of the php freaks tutorials. Here is the code that i am try to get to work: <?php Header("Content-type: image/png"); $height = 300; $width = 300; $im = ImageCreate($width, $height); $bck = ImageColorAllocate($im, 10,110,100); $white = ImageColorAllocate($im, 255, 255, 255); ImageFill($im, 0, 0, $bck); ImageLine($im, 0, 0, $width, $height, $white); for($i=0;$i<=299;$i=$i+10) { ImageLine($im, 0, $i, $width, $height, $white); } ImagePNG($im); ?> and here is the error given The image “http://192.168.2.3:1128/testing/gd/pic.php” cannot be displayed, because it contains errors. Quote Link to comment https://forums.phpfreaks.com/topic/69094-solved-gd-will-not-display-pictures/ Share on other sites More sharing options...
madspof Posted September 12, 2007 Author Share Posted September 12, 2007 Sorry for that post i was messing around with the code and i had a spare line before hte php code i.e a blank line. Once i removed that it worked. Quote Link to comment https://forums.phpfreaks.com/topic/69094-solved-gd-will-not-display-pictures/#findComment-347342 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.