All,
As far as I have read this should be a fairly easy task. To load up two seperate jpeg files, make a blank image and copy the 1st into the top left corner followed by copying the second to an offset position to create a collage. Output the new image, then cleanup all the variables.
But I cant seem to get it to work. Whenever I try I get a typical internet explorer corupt image (so at least the header is working...)
Can anyone see any obvious errors? I still havent been able to verify if an GD functions work as I am not getting any error messages when I try to use the functions however do recieve the standard parse errors still.
The php doc is in the same folder as both jpeg images which are 600 X 450.
<?
$A = "a.jpg";
$B = "b.jpg";
header('Content-type: image/jpeg');
$newimage = imagecreate(900, 900);
$imageA = imagecreatefromjpeg($A);
$imageB = imagecreatefromjpeg($B);
imagecopyresized($newimage, $imageA, 0, 0, 0, 0, 600, 450, 600, 450);
imagecopyresized($newimage, $imageB, 300, 300, 0, 0, 600, 450, 600, 450);
imagejpeg($newimage);
imagedestroy($newimage);
imagedestroy($imageA);
imagedestroy($imageB);
?>
Thanks
Liaaam