Where can I find comprehensive image manipulation library information?

Go To StackoverFlow.com


I've spent a lot of time Googling and searching SO for information on image manipulation libraries with little success. Please direct me if this has been answered before and I just can't find it.

Basically I'm trying to resize an arbitrarily sized image to a couple of smaller thumbnail images, say 400px wide and 200px wide while maintaining the original aspect ratio. The original image is being uploaded via php (linux) and I've found that I can use Cairo, GD, GMagick, or ImageMagick but I've been unable to find comprehensive data on which is better suited for image manipulation. I have found comparisons for image creation, but that's functionality I won't be using.

I also have the option of uploading via php then performing the image manipulation via another method (perl/python/etc, for example) if that proves better suited.

Any pointers in the right direction are appreciated. Quality is my primary motivation followed by output image file size then library performance.

2012-04-03 21:36
by Isius
GD is perhaps the most prevalent, and really for the work you intend to do any library will be good enough. Depending on what you want to do, running an external binary might possibly be easier than writing the code. I suggest getting your hands dirty with GD and then coming back to the subject if it turns out there are issues - Jon 2012-04-03 22:04
I would agree that for simple image resizing, GD is probably the simplest (with good quality). You should find plenty of resources and tutorials for this extension with a simple google, and it's installed in lots of environments, making it quite portable with minimum effort - Adam 2012-04-03 22:08
Which library did you end up using - Kenny Linsky 2013-01-29 16:43


GD and ImageMagick are your best bets, so get some representative images and run some tests using:

Resizing images in PHP with GD and Imagick has some code samples to get you going.

Compare them visually and by filesize. If there's no obvious winner, then run some benchmarks based on your expected needs. How to benchmark efficiency of PHP script is a good reference point.

Also take a look at:

2012-10-05 15:53
by Kenny Linsky