...

View Full Version : php image resize thumbnails



alex57
07-12-2007, 08:21 PM
Hello,

I am putting together an image gallery using open source code. I have a script to generate thumbnails but it is not ideal because the quality loss from the original images is high. Secondly, ideally i would like the portrait images to resize to the same size as landscape images but i am not sure how to achieve this.

does anyone have or know of any code to create thumbnails like this??

Thanks

mlseim
07-12-2007, 08:40 PM
Alex ...

Give us a link to the gallery where you put your full-size images.
There is a PHP method using GD library that could do it for you.

alex57
07-12-2007, 09:01 PM
Im afraid the gallery isnt hosted yet, I am developing on my local machine. What is the PHP method you are refering to?

mlseim
07-12-2007, 09:05 PM
The PHP GD Library where you manipulate images.

You can use PHP to scan your directory and automatically create
another directory filled with thumbnails of the same name as the
full-size.

Your local PC needs all of the server stuff with GD.

http://us.php.net/gd

Specifically, this page:
http://us.php.net/manual/en/function.imagecopyresampled.php

Where there are good examples on creating thumbnails.

alex57
07-12-2007, 09:28 PM
Ah thank you, I will go through that as it seems to be exactly what I am looking for thanks. I will eventually move my work to my webspace which is hosted by Powweb. I dont expect you to have heard of it but would it be reasonable to assume that Powweb would include the GD libraries - it does offer a lot of support for server side scripting.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum