Forum Moderators: coopster

Message Too Old, No Replies

Creating ThumbNails in PHP without GD

         

omoutop

12:25 pm on Jul 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi to everyone....

I want to create an image upload script were the user will upload 1 photo while the script will store it in 2 different locations...
/pictures
/thumbs
the script must alo create a second version of the original photo and the new version must be resized into certain width/height....I pretty much know what to do till here...however, what I am asking is that the new version will be resized as well as decreased in terms of quality in order to have a smaller size (but still be fairly viewable)...can this be feasible?
thank you in advance.........

omoutop

12:40 pm on Jul 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



......HARD TO DO WITHOUT GD....
I am currenlty trying the GD path to create the script....

shamboo

2:16 pm on Jul 11, 2005 (gmt 0)

10+ Year Member



Hi, omoutop

Iam having problem with setting up GD library. Iam using LINUX(DEBIAN) , could you please suggest me the steps, how to get the package and to configure with php.

Thanks
Shamboo

jatar_k

4:28 pm on Jul 11, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



omoutop,

take a look at msg 29 in this thread
PHP Bag of Tricks II [webmasterworld.com]

>> oops, missed the without gd

dcrombie

4:47 pm on Jul 11, 2005 (gmt 0)



Try using ImageMagick [imagemagick.org] - a lot of people report better quality thumbnails as well using it over using GD.

mincklerstraat

11:38 pm on Jul 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



shamboo, try typing apt-get install php4-gd in a shell prompt, and then rebooting (or just restarting apache, if that's not difficult for ya)

Mr_Fern

3:39 am on Jul 22, 2005 (gmt 0)

10+ Year Member



>> Try using ImageMagick - a lot of people report better quality thumbnails as well using it over using GD.

In follow up to this post, I'd have to also mention that GD's abilities are very poor in comparison to ImageMagick. I've had problems with GD reading my images properly. I would have a valid jpg, verified by php's image information function, but GD would report invalid jpg file and couldn't thumbnail it. In the end, the move to ImageMagick has been a very good one.

ergophobe

4:20 pm on Jul 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've always preferred the simplicity of ImageMagick, but the GD2 library produces similar results to IM and NetPBM. The big quality differences were from old comparisons with GD1 and those other packages.

Still, a one-line call to IM does what it takes many lines to do in GD and it seems much faster.

Birdman

2:27 am on Jul 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I second ergophobe. GD is fine. Seems like most of the problems come from the differences in what PHP version you have. You have to use imagecreatetruecolor() or imagecreate(), depending on PHP versions.

I also agree that ImageMagik is nice!