chilifrei64 Posted October 18, 2005 Posted October 18, 2005 I have downloaded a simple php code for an online photo album. This script has everything I need except the autocreation of thumbnails. The author appears to have attempted to include support for this but has commented out the lines and when uncommented.. it still doesnt workI am mildly familiar with php.. normally getting code and modifying it to fit my needs but I am by no means a programmer. The he has commented out is as follows// THUMBNAIL DOESN'T EXIST - LET'S CREATE ONE! (Fun, Eh?) // $new_w=100; // $new_h=100; // header("Content-type: image/gif"); // $dst_img=ImageCreate($new_w,$new_h); // $src_img=ImageCreateFromGif("./imgtest.gif"); // ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img)); // ImageGif($dst_img);I am using jpg instead of gif's so I attempted to modify the code for jpg but am unsuccessful. I keep ending up with gibberishhere is my code//THUMBNAIL DOESN'T EXIST - LET'S CREATE ONE! (Fun, Eh?) $new_w=100; $new_h=100; header("Content-type: image/jpeg"); $dst_img=ImageCreateTrueColor($new_w,$new_h); $src_img=ImageCreateFromJpeg("$photoDir/&photoFile"); ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img)); ImageJpeg($dst_img,'',100);here is the url to the full codehttp://www.ravis.org/code/album/I have been messing with this for hours and I continually end up with this http://danfrei.com/beta/photoalbum/1/index...hotoDir=kitten/anybody with any ideas?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now