Resize Images Using PHP and GD Library
The article along with complete code sample demonstrates the use of GD library to generate thumbnails. The script first saves the uploaded image in a specific location, it then generates a thumbnail version of the image and finally saves the generated thumbnail image in JPEG format. The article also includes explanation of the calculations involved and a few other tips.