views:

109

answers:

3

I know there is a lot of discussion over GD or ImageMagick for a LAMP setup.

I can't seem to get a solid answer on the best one though so I will explain my specific needs and maybe someone can help.

I will be using on a social networking site where users uploads photos to there image gallery.

All I need it to do is upload the file and make 2 thumbnails from the file, then save it, so there will be 3 images all together for every upload.

I need to resize the source image as well but only if it is wider then X amount of pixels.

Now I have this coded in php using GD but I am wondering if imagemagick would be better or not. I know imagemagick supports many more filetype and can do more special features to an image but as you can see I don't need all the fancy stuff, just some resizing pretty much. Since files being uploaded will be pretty high traffic, I am hoping to use whichever one would probably be the best performance in speed but retainning quality. So far the quality of the GD images is just fine so I know imagemagick would be evn better, so it comes down to speed and system resources.

I have read that imagemagick might be a little faster, can anyone give there experience or opinnions?

A: 

Well, as a user I'd vote for the one that supports more image formats. I'm always really annoyed with media sites that refuse to accept my .pngs and .oggs.

T.E.D.
A: 

I use suggest using the simplest tool to do what you need, and in my experience libgd is a fantastic library, especially if you are just resizing, and perhaps converting to a known format.

Use the KISS principle.

If you find that you need more than what GD can do then go to using Imagemagik, but until then I would suggest libgd.

If you are really concerned you can install both, and just run some unit tests to compare speed and resources. Just use a large number of large files to compare.

The unit test will help you to determine how fast, and by printing out the resources used before and after the test you can then make a comparison based on hard data.

James Black
A: 

What about keeping the namespaces for large amounts of images , should we create a folder each time a 'listing' is created with associated images ? Or is it best to have all the images in one folder and then simply give each image a random name ?

landed