I've decided to start displaying my images efficiently, and well this way is efficient!
header("Content-type: image/jpeg");
$img1 = imagecreatefromjpeg("http://brent.fatcake.com/pictures/graal/graal-2.JPG");
$img2 = imagecreatetruecolor("85", "64");
$img1_w = imagesx($img1);
$img1_h = imagesy($img1);
$img2_w = "85";
$img2_h = "64";
imagecopyresized($img2, $img1, "0", "0", "0", "0", $img2_w, $img2_h, $img1_w, $img1_h);
imagejpeg($img2);
imagedestroy($img1);
imagedestroy($img2);
Now this works marvelously when on a page all on it's own, but where I want it isn't alone. I'll try to explain some more:
pictures.php loads a template according to the category picked. This template simply slides in between the header.tpl and footer.tpl. This template contains text, images, links, tables.. you know just ur plain xhtml page. My old method works just fine without any headers needed in the php script. I add this code and the images come as a whole bunch of crap you would find if you opened an image in wordpad. What do I need to do to get into image mode and then out so it will display the image and not the code of the image? I do believe it has to do with headers() but I am lost. Assistance please? The php manual confuses me.