share
Stack OverflowWhat is the best image manipulation library?
[+84] [16] Steve Tranby
[2008-10-01 17:31:19]
[ image web-applications image-processing image-manipulation ]
[ http://stackoverflow.com/questions/158756/what-is-the-best-image-manipulation-library ] [DELETED]

I would love to find out which is the best image manipulation library for which platforms and languages. Likely you could use a library under multiple platforms with the right API or Plugin capabilities. I'm specifically looking for web based applications, but please answer for desktop apps as well if you like.

Libraries (and the common direct language support):

Also suggested:

I have created a site proposal to give questions like this an official home away from Stack Overflow. It's called Code Recommendations Help make it a reality by joining and asking questions now! - daviewales
[+16] [2008-10-01 18:16:35] Matt Schmidt

For Python, don't bother with PythonMagick. It's no longer maintained (afaik).

Instead, try the Python Imaging Library [1].

[1] http://www.pythonware.com/products/pil/

PIL is probably the easiest to use. - Joseph Le Brech
Or alternatively Pillow for something a bit more up-to-date. - Darth
1
[+15] [2008-10-01 18:32:30] reconbot

While I love imageMagick it's been usurped by a fork called GraphicsMagic [1] which is a multi threaded and signaficantly faster. It's not as popular but IIRC it's currently in use in production for livejournal or one of the other large blogging sites.

I also know ubuntu has a compatibility package that offers a drop in command line replacement of imagemagic with graphicsmagick.

[1] http://www.graphicsmagick.org/

2
[+12] [2008-10-01 18:08:05] Martin Beckett

What do you want to do?
If you want low level image processing ( as in finding objects, tracking motion etc) then OpenCV, it's free and open and the algorithms are well reviewed.
If you want to be able to read lots of proprietry formats - probably python image library


3
[+8] [2008-10-01 17:37:00] Lou Franco

Disclaimer: I work for Atalasoft

For .NET applications, Atalasoft DotImage [1] is written from the ground up for .NET (doesn't use COM Interop or non-assembly dlls), has 150+ different image processing commands, AJAX-based web viewing components, and run-time royalty-free licensing for desktop applications.

[1] http://www.atalasoft.com/products/dotimage/

(1) I have used GDI+, Aforge.Net, ASPJpeg and Atalasoft. Aside from the pricing (and licensing setup awkwardness) Atalasoft is seriously tops! - jessegavin
For common photo formats, image processing, and WinForms viewing we now offer DotImage Photo for free atalasoft.com/photofree - Lou Franco
Seems like the most full featured, but its complicated - I couldn't even figure out how to resize an image. - reach4thelasers
AtalaImage img = new AtalaImage("file.png"); ImageCommand cmd = new ResampleCommand(/*size here*/); AtalaImage img2 = cmd.Apply(img).Image; - Lou Franco
(1) List of frustrations: Installation of the free version does not integrate with Visual Studio 2012. (Install files for VS 2005 and VS 2008 only.) Their demo/sample program, which in my opinion is required to get started, has to be downloaded separately and doesn't work with the free version. And I've never before seen a Developer's Guide where 30 pages are dedicated to the subject of licensing. - RenniePet
4
[+7] [2008-10-01 18:57:56] MikeScott8

I have used LeadTools in the past, as well as Pegasus. We found a bug with their (Pegasus) library and they took forever to fix it and then when they did, they put it in a new version and were going to force us to upgrade to the new version. we went to find other librarys.

We are now using Atalasoft dotImage. We have run into some issues, one is bug we are waiting on fix for, the other they quickly helped me work around the issue. we are finding the AJAX thumbnail viewer and AJAX viewer are quite powerful, getting them to work in our application is tricky. I do like their library it is easy to use and quite well written and designed.

Their licensing on the other hand is quite expensive for servers, and devs. We had a PITA getting a license for a second developer so that he could dev and test the rest of the site (not the imaging part I work on). They wanted full dev seat even though he wasnt doing any image dev work. The server licensing is per core and then each addon is extra. It seems like they "nickle and dime" (VERY loose terms as we are talking hundreds to thousands not nickle and dime)

So in conclusion I would say if you are doing desktop app, definately go with Atalasoft, but anything server based, check into the pricing carefully. And Pegasus I would avoid due to their poor support and cust service, and they are harder to work with than Atalasoft. LEADTools was OK from what I remember but it was 2000-2004 when I really worked with it. And those are the only 3 I have really used and all in .Net


(I am from Atalasoft): We have written this KB article for working around the License Compiler issues when you need to build pieces that you aren't working on without a license: atalasoft.com/kb/article.aspx?id=10176&cNode=0H8E6T - Lou Franco
(I am not from Atalasoft) I agree with MikeScott8's assessment of each of these libraries - he's spot on. And while Atalasoft's library is the best of what, I feel, is a bad lot it's quite expensive, especially for a small shop like mine. - Bob Mc
5
[+6] [2011-05-28 15:56:21] Computer Linguist

For IIS or ASP.NET, I have to suggest my ImageResizing.Net [1] library. It's been around for 4 years, it's open-source, and it's well-maintained. It's been integrated into several dozen content management systems. I just released V3, which already has 21 plugins. It's lightweight, with a 120kb dll.

It's ideal for resizing, cropping, rotating, flipping, or converting images. It works well with the AForge library for doing advanced effects and manipulations. It's S3 & SQL friendly.

The key strength of the library is that it can be installed as an HttpModule, so you can resize images from the url:

image.jpg?width=500&height=300&crop=auto

The managed API is likewise simple:

ImageBuilder.Current.Build("image.jpg","destimage.jpg",
        new ResizeSettings("?width=500&height=300&crop=auto");

I've been listening to feedback from hundreds of people, and I think you'll find it refreshingly polished if you're used to the low quality of commercial APIs and documentation.

It's free, too. It's supported by add-on plugins and donations.

Link to home page [2]

It also avoids the 28 image resizing pitfalls [3] everyone seems to be making, despite the grave consequences for server stability.

[1] http://imageresizing.net/
[2] http://imageresizing.net
[3] http://nathanaeljones.com/163/20-image-resizing-pitfalls/

6
[+3] [2008-10-01 17:46:11] Andrew Queisser

I'm a big fan of AForge.Imaging (http://code.google.com/p/aforge/)

It has a lot of low-level image processing, is relatively fast and free. Does use unsafe code, though.


7
[+3] [2008-10-01 18:15:47] Yuval Peled

Another good library with high performance is Intel's IPL [1] - Image Processing Library. I used it. I think it has only a C language interface. It provides many algorithms and data manipulations. And you can checkout the LeadTools [2] that is commonly used in medical companies for medical CT/MR images processing. This one has .NET interface as well.

[1] http://www.developers.net/intelmcshowcase/view/382
[2] http://www.leadtools.com/SDK/Raster/Raster-Image-Processing.htm

I'm pretty sure this is the basis of OpenCV. Isn't it? - kenny
8
[+3] [2008-10-01 18:35:28] Rob

For C++ apps I would use CxImage, now at v6:

http://www.xdp.it/cximage.htm

Brilliant library.


9
[+3] [2008-10-24 01:56:18] geometrikal

My main experiences are with processing video streams.

I have used Intel Performance Primitives when writing c++ code and found it to be good. But this was back when it was free.

For writing C# .net stuff I have tried:

AForge - has a lot of functions but uses the Bitmap object for passing image data which makes it too slow for processing a video image. This is going to be changed in the future.

Emgu - is a wrapper around OpenCV. Has most of the OpenCV functions, takes a pointer to the image as an argument, as both an Image class and a CvInvoke class so you have the option of using the image object or just invoking the desired openCV function. Also easy to add OpenCV functions that are not already implemented.


10
[+2] [2009-05-16 00:22:55] Chris Henry

ImageMagick will definitely produce really sharp images, but it's not easy to install or manage. ImageMagick itself needs to be installed on the server, and then a compatinble version of MagickWand needs to be installed.

I've also found that it has a habit of creating massive temporary files of up to a GB or more and then dumping them into your /tmp directory, which you need to be careful of. It will also eat up a massive amount of memory unpredictably.

If you're working on a platform with plenty of memory, and don't need to worry about nuking your temp directly, ImageMagick is a good choice.


11
[+2] [2010-08-09 23:10:00] Alceu Costa

Matlab.

I have worked with OpenCV (also a great option) and a little with PIL (Python Imaging Library), but Matlab provides a much more complete range of image processing/image manipulation functions. Also, the documentation that is provided is just great.

Also, note that it is possible to convert your Matlab code to C (by linking to libraries provided with the software) if you have to integrate it with your C application.


12
[+1] [2009-02-17 17:33:43] unbeknown

For old-style CGI programs that were actual shell scripts back in time, I used netpbm [1]. It's not really a library but a toolkit of programs that you can chain together through pipes (or temporary files) to do all sorts of image manipulations. It uses an ASCII based intermediary format that you can actually edit with a text editor.

[1] http://netpbm.sourceforge.net/

13
[+1] [2009-03-15 11:08:27] rics

RoboRealm compiled a huge list [1] of vision software.

[1] http://www.roborealm.com/links/vision%5Fsoftware.php

14
[+1] [2009-06-15 18:23:20] Paul

Depends on your environment. For .NET development, either ImagXpress or ImageGear, both by Accusoft Pegasus.

The acquisition of Accusoft by Pegasus Imaging Corp. made it by far the largest provider of imaging SDKs.

ImageGear is also available in DLL form for C/C++ development. Both ImageGear and ImagXpress are available for ActiveX/COM development.

ImageGear also offers a Java toolkit.

For the fastest possible native image manipulation, PICTools is the optimal choice.


15
[+1] [2010-06-01 06:01:56] JKS

The CImg Library is an open source, C++ toolkit for image processing, http://cimg.sourceforge.net/ current version is CImg 1.3.4


16