ok I keep trying to debug this and can't get anywhere.
the error i get is
Warning: imagepng(): supplied argument is not a valid Image resource in gdtests/test.php on line 18
the line number will be wrong because i have alot of lines commented out in the code. but the active lines are below.
i am assuming it is because i have a syntax error in my code, but i can't find it anywhere.
<?
$source_file = 'images/theunit.jpg';
// Load a source image
$iSource = imagecreatefromjpeg($source_file);
//resize the overlaid image.
$orig_imgsize = getimagesize($source_file);
$orig_width = $orig_imgsize['0'];
$orig_height = $orig_imgsize['1'];
$img_n = imagecreatetruecolor (200, 200);
$iSourceR = imagecopyresampled($img_n, $iSource, 0, 0, 0, 0, 200, 200, $org_width, $org_height);
//output to resized image to file.
imagepng($iSourceR,"images/resized.png");
?>
can anyone shed some light on this. I have verified that the director is chmod 777 I also have verfied that the image I am trying to resize exists at the correct location.
thank you,
chris