Page 1 of 1

can't load images

Posted: Tue Feb 16, 2010 1:27 am
by turab
I've been using the GD class for loading images and working with graphics, and it worked fine in the beginning, but now whenever I try code that loads images, the webpage does not show any image, instead its just a box with a red cross (the one you get when image isn't loaded). What did I do wrong??? need immediate help.....

Re: can't load images

Posted: Tue Feb 16, 2010 4:54 am
by greyhoundcode
Let's see some code 8O

Re: can't load images

Posted: Wed Feb 17, 2010 4:36 am
by turab
<?php
header("Content-type: image/png");
$image = imagecreate( 200, 200 );
$red = imagecolorallocate($image, 255,0,0);
$blue = imagecolorallocate($image, 0,0,255 );
$points = array ( 10, 10,
190, 190,
190, 10,
10, 190
);
imagefilledpolygon( $image, $points, count( $points )/2 , $blue );
imagepng($image);
?>

this is the code, and while there seems nothing wrong with the code, something must be wrong with my installation or God knows what, coz there are no images loading.