have no idea how to deal with thumbnails.. i have seen a lot of tutorials but is like none of them make sense at all..is there any place where i can find a nice detialed tutorial on how to make thumbnails of pictures that are already in a directory..or when they are been uploaded to the site.. and how to out put them becuase i t ried to use the code in the same page and it show all the page source code..
i use windows i'm with yahoo.. i just dont know how to do thumbnails with php i want a detialed tutorials.. cuz i'm new so i can just look at a code and breake it down..
Last edited by richard181; 07-10-2006 at 02:00 PM..
1. Read php manual on how to manage file uploads
2. Upload image
3. Resize it with imagemagick's mogrify or convert (they are supported by most *x servers) by calling the program through exec().
What can be simplier?
E.g. exec("convert $_FILES['userfile']['tmp_name'] -scale $width -format jpg $path_to_thumbnail") will resize the uploaded image to $width pixels wide, convert it to jpg and write to $path_to_thumbnail file.
I prefer ImageMagik (but dont know what kind of support it has on windows) for it is much more flexible and has much more stuff I can use to make better images.