ImageMagick / GraphicsMagick

From DigitWiki
Jump to: navigation, search


ImageMagick is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may use, copy, modify, and distribute in both open and proprietary applications. It is distributed under the Apache 2.0 license.

Scanned document images often need to be optimized in order to enhance their contrast or to scale them to a certain size. This step is usually part of the post-processing workflow where images are prepared for visual presentation or they are analyzed using OCR and text processing software. By integrating image manipulation software such as ImageMagick into the post-processing workflow, images can be automatically enhanced using all the operations and features that the software has to offer. They can be resized, optimized or otherwise edited in one single step without any manual intervention.


Operating system Windows, Linux, Mac OS X, iOS
Hardware dependencies -
Software dependencies -

Non-technical requirements

ImageMagick does not have a graphical user interface (GUI) and therefore requires some basic knowledge on how to use and execute the command-line programs.


ImageMagick is licensed under the Apache License, Version 2.0 ([1]).




Binary releases can be downloaded from the ImageMagick website at [2].

Installation Instructions

Installation instructions are available for Unix, Mac OS X, iOS and Windows systems. Please refer to [3] for detailed instructions.

Quick Start Guide

ImageMagick includes several command-line tools which serve different purposes. A short overview is given on the ImageMagick Website ([4]). The most relevant tool for image enhancement however is the “convert” executable. This tool allows you to convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Examples on how to use the tool can be found at [5] or in the “Examples” section.

To get started with ImageMagick just take a look at the other examples provided in the usage section of the ImageMagick website ([6]) or the command-line tool documentation ([7]).


Configuration and Customization

ImageMagick can be configured using command-line parameters. Please refer to the ImageMagick website at [8] and choose one of the available command-line tools for a complete list of the possible parameters.

Additionally, ImageMagick offers the ability to perform custom image processing tasks from a script written in the Magick Scripting Language (MSL) :

“MSL is XML-based and consists of action statements with attributes. Actions include reading an image, processing an image, getting attributes from an image, writing an image, and more.”

A short example can be found in the “Examples” section.

Workflow Integration

ImageMagick can be integrated into any workflow or application that allows the execution of command-line tools. See section “Configuration” for details on how the tool can be configured using parameters.


1) Convert

Resizing an image to 50% of its original size while converting it from JPEG to PNG can be achieved with the following command:

convert input.jpg -resize 50% output.png

2) Conjure

This simple MSL-example from the ImageMagick Website resizes a given image to 400x400 pixels:

<?xml version="1.0" encoding="UTF-8"?>
   <read filename="image.gif" />
   <get width="base-width" height="base-height" />
   <resize geometry="%[dimensions]" />
   <get width="resize-width" height="resize-height" />
   <print output="Image sized from %[base-width]x%[base-height] to %[resize-width]x%[resize-height].\n" />
   <write filename="image.png" />

It can be executed using the following command:

conjure -dimensions 400x400 incantation.msl

For more examples on how to use ImageMagick, please refer to [].