1 Comment

.NET Power Tip 13: Converting Images with ImageMagick

Very often, .NET applications need to convert images.

Meet ImageMagick!

 

 

What is Image Magick?

Say you have an image of the hulk in JPG format that you want to convert:

 

hulk_thumb

hulk.jpg

 

How would you programmatically convert this image in to another format, say *.png? ImageMagick does the trick:

image

And thats it! ImageMagick figures out what you want based on the file extension and just does it! *Magick* 🙂

 

But, you are not at all restricted to the common formats. ImageMagick can deal with over 200(!) formats, including PDF, TIFF, DPX, EXT, WebP, Postscript, DFAX and many more.

Say you want to convert jpg to pdf? No problem:

image

It is almost too easy. 🙂

image_thumb[5]

 

Of course ImageMagick allows you to add parameters for scaling, rotation, alpha and anything else that you would like to to. The list of parameters is huuuge:

http://www.imagemagick.org/script/magick.php

 

If you are working with images, you just need it. Get it at:

http://www.imagemagick.org/script/index.php