views:

24

answers:

1

I am using ImageMagick from Commandline in .Net? Although a .Net wrapper (ImageMagick.Net in codeplex) is available but it is still in alpha and does not have implementation for all the command line options e.g Distort, Montage. Therefore I am using System.Diagnostics.Process class to invoke the ImageMagick command line.

What are the Pros/Con of this approach? I can see a performance issue if I have to perform multiple transformation on the same image and if I invoke the command twice then the commandline will load the Image twice. Is there a way I can chain the commands so that output of the first transformation is feed into the second command?

+1  A: 

It will definitely be slower, and when you chain commands, you are going to be encoding and decoding the image into a format unnecessarily -- if you do this, make sure you use a lossless format like PNG for intermediate formats. To speed it up, use one without compression.

Two other choices

  1. Use ImageMagick.NET and then wrap anything else you need from imagemagick yourself, probably by contributing to the project

  2. My company, Atalasoft, has a free .NET imaging SDK with a lot of overlap with ImageMagick. You can download here: http://atalasoft.com/photofree -- Montage is basically the same as our Overlay commands and Distort is a 2D transformation, which are all included. If ImageMagick.NET can accept and produce .NET Bitmap objects, then you can use both together fairly easily.

Lou Franco