Page 1 of 1

Creating thumbnails in PHP

Posted: Mon Jun 05, 2006 7:31 am
by vivekjain
Hi,
I am using PHP and the GD2 library, to create thumbnails of the images that have been uploaded. Actually, I need to have 2 images, one is the thumbnail and the other a larger image, so how do I go about this?
I am uploading 5 images and uploading it to a folder, when uploading I am resizing it to say 550 px. Now I want to create a thumbnail as well, how do I?

Thanks

Regards,
Vivek

Re: Creating thumbnails in PHP

Posted: Mon Jun 05, 2006 8:28 am
by aerodromoi
vivekjain wrote:Hi,
I am using PHP and the GD2 library, to create thumbnails of the images that have been uploaded. Actually, I need to have 2 images, one is the thumbnail and the other a larger image, so how do I go about this?
I am uploading 5 images and uploading it to a folder, when uploading I am resizing it to say 550 px. Now I want to create a thumbnail as well, how do I?

Thanks

Regards,
Vivek
Since you're already using a php script to resize the images, why don't you put the gd part into a function,
thus allowing you to specify the name of the resized image and its size. Or did I get something wrong?

aerodromoi

PHP Thumbnails

Posted: Mon Jun 05, 2006 9:44 am
by vivekjain
Thanks for your response. I tried that, but it doesnt seem to be working.
Is there a way to achieve this, or some script that copies an image, resizes a copy of the image, and then resizes the original image?

Posted: Mon Jun 05, 2006 9:53 am
by pickle
Search the forums for thumbnailing. Others have had problems with it as well.