02-05-2021



ImageMagick is a free and open-source cross-platform software suite for displaying, creating, converting, modifying, and editing raster images.Created in 1987 by John Cristy, it can read and write over 200 image file formats.It and its components are widely used in open-source applications.

  1. Source and binary distributions are available for download.
  2. ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes. The current release is ImageMagick 7.0.11-8. It runs on Linux, Windows, Mac Os X, iOS, Android OS, and others. The authoritative ImageMagick web site is https://imagemagick.org.

Linux Binary Release • Mac OS X Binary Release • iOS Binary Release • Windows Binary Release

You can install ImageMagick from source. However, if you don't have a proper development environment or if you're anxious to get started, download a ready-to-run Linux or Windows executable. Before you download, you may want to review recent changes to the ImageMagick distribution.

ImageMagick source and binary distributions are available from a variety of FTP and Web mirrors around the world.

Linux Binary Release

These are the Linux variations that we support. If your system is not on the list, try installing from source. Although ImageMagick runs fine on a single core computer, it automagically runs in parallel on multi-core systems reducing run times considerably.

VersionDescription
magickComplete portable application on Linux, no installation required. Just download and run. AppImages require FUSE and libc to run. Many distributions have a working FUSE setup out-of-the-box. However if it is not working for you, you must install and configure FUSE manually.
ImageMagick-7.0.11-8.x86_64.rpmRedhat / CentOS 8.3 x86_64 RPM
ImageMagick-libs-7.0.11-8.x86_64.rpmRedhat / CentOS 8.3 x86_64 RPM
ImageMagick RPM'sDevelopment, Perl, C++, and documentation RPM's.
ImageMagick-i386-pc-solaris2.11.tar.gzSolaris Sparc 2.11
ImageMagick-i686-pc-cygwin.tar.gzCygwin
ImageMagick-i686-pc-mingw32.tar.gzMinGW

Verify its message digest.

ImageMagick RPM's are self-installing. Simply type the following command and you're ready to start using ImageMagick: Mali music job experience download.

You'll need the libraries as well:

Note, if there are missing dependencies, install them from the EPEL repo.

For other systems, create (or choose) a directory to install the package into and change to that directory, for example:

Next, extract the contents of the package. For example:

Set the MAGICK_HOME environment variable to the path where you extracted the ImageMagick files. For example:

If the bin subdirectory of the extracted package is not already in your executable search path, add it to your PATH environment variable. For example:

On Linux and Solaris machines add $MAGICK_HOME/lib to the LD_LIBRARY_PATH environment variable:

Finally, to verify ImageMagick is working properly, type the following on the command line:

Congratulations, you have a working ImageMagick distribution under Linux or Linux and you are ready to use ImageMagick to convert, compose, or edit your images or perhaps you'll want to use one of the Application Program Interfaces for C, C++, Perl, and others.

Mac OS X Binary Release

We recommend Homebrew which provides pre-built binaries for Mac (some users prefer MacPorts). Download HomeBrew and type:

ImageMagick depends on Ghostscript fonts. To install them, type:

The brew command downloads and installs ImageMagick with many of its delegate libraries (e.g. JPEG, PNG, Freetype, etc). Homebrew no longer allows configurable builds; if you need different compile options (e.g. librsvg support), you can download the ImageMagick Mac OS X distribution we provide:

VersionDescription
ImageMagick-x86_64-apple-darwin20.1.0.tar.gzmacOS High Sierra

Verify its message digest.

Create (or choose) a directory to install the package into and change to that directory, for example:

Next, extract the contents of the package. For example:

Set the MAGICK_HOME environment variable to the path where you extracted the ImageMagick files. For example:

If the bin subdirectory of the extracted package is not already in your executable search path, add it to your PATH environment variable. For example:

Set the DYLD_LIBRARY_PATH environment variable:

Finally, to verify ImageMagick is working properly, type the following on the command line:

Note, the display program requires the X11 server available on your Mac OS X installation DVD. Once that is installed, you will also need to set export DISPLAY=:0.

The best way to deal with all the exports is to put them at the end of your .profile file

Congratulations, you have a working ImageMagick distribution under Mac OS X and you are ready to use ImageMagick to convert, compose, or edit your images or perhaps you'll want to use one of the Application Program Interfaces for C, C++, Perl, and others.

iOS Binary Release

~Claudio provides iOS builds of ImageMagick.

Download iOS Distribution

You can download the iOS distribution directly from ImageMagick's repository.

There are always 2 packages for the compiled ImageMagick:

  • iOSMagick-VERSION-libs.zip
  • iOSMagick-VERSION.zip

The first one includes headers and compiled libraries that have been used to compile ImageMagick. Most users would need this one.

ImageMagick compiling script for iOS OS and iOS Simulator

To run the script:

where VERSION is the version of ImageMagick you want to compile (i.e.: 7.0.11-8, svn, ..)

This script compiles ImageMagick as a static library to be included in iOS projects and adds support for

  • png
  • jpeg
  • tiff

Upon successful compilation a folder called IMPORT_ME is created on your ~/Desktop. You can import it into your Xcode project.

Xcode project settings

After including everything into Xcode please also make sure to have these settings (Build tab of the project information):

  • Other Linker Flags: -lMagickCore-Q16 -lMagickWand-Q16 -ljpeg -lpng -lbz2 -lz
  • Header Search Paths: $(SRCROOT) - make it Recursive
  • Library Search Paths: $(SRCROOT) - make it Recursive

On the lower left click on the small-wheel and select: Add User-Defined Setting

  • Key: OTHER_CFLAGS
  • Value: -Dmacintosh=1
Sample project

A sample project is available for download. It is not updated too often, but it does give an idea of all the settings and some ways to play around with ImageMagick in an iOS application.

Windows Binary Release

ImageMagick runs on Windows 10 (x86 & x64), Windows 8 (x86 & x64), Windows 7 (x86 & x64), Windows Server 2012, Windows Vista (x86 & x64) with Service Pack 2, Windows Server 2008 (x86 & x64) with Service Pack 2, and Windows Server 2008 R2 (x64).

The amount of memory can be an important factor, especially if you intend to work on large images. A minimum of 512 MB of RAM is recommended, but the more RAM the better. Although ImageMagick runs well on a single core computer, it automagically runs in parallel on multi-core systems reducing run times considerably.

The Windows version of ImageMagick is self-installing. Simply click on the appropriate version below and it will launch itself and ask you a few installation questions. Versions with Q8 in the name are 8 bits-per-pixel component (e.g. 8-bit red, 8-bit green, etc.), whereas, Q16 in the filename are 16 bits-per-pixel component. A Q16 version permits you to read or write 16-bit images without losing precision but requires twice as much resources as the Q8 version. Versions with dll in the filename include ImageMagick libraries as dynamic link libraries. Unless you have a Windows 32-bit OS, we recommend this version of ImageMagick for 64-bit Windows:

VersionDescription
ImageMagick-7.0.11-8-Q16-HDRI-x64-dll.exeWin64 dynamic at 16 bits-per-pixel component

Or choose from these alternate Windows binary distributions:

VersionDescription
ImageMagick-7.0.11-8-Q16-x64-static.exeWin64 static at 16 bits-per-pixel component
ImageMagick-7.0.11-8-Q8-x64-dll.exeWin64 dynamic at 8 bits-per-pixel component
ImageMagick-7.0.11-8-Q8-x64-static.exeWin64 static at 8 bits-per-pixel component
ImageMagick-7.0.11-8-Q16-x64-dll.exeWin64 dynamic at 16 bits-per-pixel component
ImageMagick-7.0.11-8-Q16-HDRI-x64-dll.exeWin64 dynamic at 16 bits-per-pixel component with high dynamic-range imaging enabled
ImageMagick-7.0.11-8-Q16-HDRI-x64-static.exeWin64 static at 16 bits-per-pixel component with high dynamic-range imaging enabled
ImageMagick-7.0.11-8-Q16-x86-dll.exeWin32 dynamic at 16 bits-per-pixel component
ImageMagick-7.0.11-8-Q16-x86-static.exeWin32 static at 16 bits-per-pixel component
ImageMagick-7.0.11-8-Q8-x86-dll.exeWin32 dynamic at 8 bits-per-pixel component
ImageMagick-7.0.11-8-Q8-x86-static.exeWin32 static at 8 bits-per-pixel component
ImageMagick-7.0.11-8-Q16-HDRI-x86-dll.exeWin32 dynamic at 16 bits-per-pixel component with high dynamic-range imaging enabled
ImageMagick-7.0.11-8-Q16-HDRI-x86-static.exeWin32 static at 16 bits-per-pixel component with high dynamic-range imaging enabled
ImageMagick-7.0.11-8-portable-Q16-x64.zipPortable Win64 static at 16 bits-per-pixel component. Just copy to your host and run (no installer, no Windows registry entries).
ImageMagick-7.0.11-8-portable-Q16-x86.zipPortable Win32 static at 16 bits-per-pixel component. Just copy to your host and run (no installer, no Windows registry entries).
ImageMagick-7.0.11-8-portable-Q8-x64.zipPortable Win64 static at 8 bits-per-pixel component. Just copy to your host and run (no installer, no Windows registry entries).
ImageMagick-7.0.11-8-portable-Q8-x86.zipPortable Win32 static at 8 bits-per-pixel component. Just copy to your host and run (no installer, no Windows registry entries).
ImageMagick-7.0.11-8-portable-Q16-HDRI-x64.zipPortable Win64 static at 16 bits-per-pixel component with high dynamic-range imaging enabled. Just copy to your host and run (no installer, no Windows registry entries).
ImageMagick-7.0.11-8-portable-Q16-HDRI-x86.zipPortable Win32 static at 16 bits-per-pixel component with high dynamic-range imaging enabled. Just copy to your host and run (no installer, no Windows registry entries).

Verify its message digest.

To verify ImageMagick is working properly, type the following in an Command Prompt window:

If you have any problems, you likely need vcomp120.dll. To install it, download Visual C++ Redistributable Package.

Imagemagick.org

Note, use a double quote (') rather than a single quote (') for the ImageMagick command line under Windows:

Use two double quotes for VBScript scripts:

Congratulations, you have a working ImageMagick distribution under Windows and you are ready to use ImageMagick to convert, compose, or edit your images or perhaps you'll want to use one of the Application Program Interfaces for C, C++, Perl, and others.

ImageMagick Examples - Introductory Notes

What is ImageMagick? A No-Holds-Barred Summary

ImageMagick isdesigned for batch processing of images. That is, it allow you to combineimage processing operations in a script (shell, DOS, Perl, PHP, etc.) sothe operations can be applied to many images, or asa sub-system of some other tool, such as a Web application, videoprocessing tool, panorama generator, etc. It is not a GUI imageeditor. ImageMagick is, first of all, an image-to-image converter. That is what it wasoriginally designed to do. That is, it will convert an image in just aboutany image format (tell us if it can't) to any other image format. But it is also a library of image processing algorithms. These can beaccess via the command line and shell/DOS scripts (which these example pagesdemonstrate), or via a large number of programming languages, such as C, C++,Perl, Ruby, PHP, etc. See: ImageMagick APIs. Speed was never a major feature of IM, which places more emphasis on thequality of the images it generates. That is not to say that it can'ttransform images in a reasonable amount of time. It's just not blindinglyfast. Because of this, IM can be slow to perform certain processingoperations, especially when attempting to compress images into image formatsthat have limited capabilities. ImageMagick concerns itself mainly with images in the form of a rectangulararray of pixels, commonly called a 'raster.' It will handle 'vector'image formats like Postscript or PDF, but at the cost of converting thoseimages into a raster when loading them, and generating a vector image wrapperaround the raster when saving it. As a result, vector images are oftenprocessed badly when using the default settings. However, specific optionscan be used to improve this situation. See: A word about vector image formats.

About These Examples of ImageMagick Usage

These pages were developed from, and are a continuation of, my Collection of ImageMagick Hints and Tips page I first started in 1993,and placed on the new fangled world-wide-web making its appearance around thesame time. Information on many aspects of IM, and notes not included in thesepages, are still present in that document. However, while the present pageswere designed for you to look at, the hints and tips document was only for myown edification. So, it may be vague or chaotic in places. You are welcometo look at it, learn, and make comments on it. Other examples were grabbed or developed from answers to users' questions onhe IMForums, or contributed to me as solutions to various problems. I look forward to suggestions and e-mail from other IM users. Such e-mailgenerally results in improvements and expansions to these example pages.

Command Line Environments

All examples are written for use on UNIX, and specifically GNU/Linux systems,using BASH scripting. As a consequence, some examples use shell 'for-do'loops. Most examples use a backslash '' at the end of a line tocontinue that command on the next line. The longer commands are broken intoseparate lines to try to further highlight the steps being applied. However, you can still use these examples from PC Windows batchscripts, with some changes to the handling of certain characters. Withsome slight adaptation, the examples can also be run directly from'system' calls in PHP scripts. See Windows Usage and APIsand Scripting for more information on using the ImageMagick commands inthese alternative environments. Contributions and test examples are welcome.

PerlMagick, and Other APIs

It should also be possible to adapt any of these examples to use the IM APIfrom languages such as Perl, C, C++, Ruby, PHP, and so on. I recommend tryingthings out on the command line first, until you get them right, and thenconverting the operations to the specific API you are using. Although the situation has improved enormously with IM version 6, the commandline really only deals with a single image sequence at any one time. However,APIs do not have this limitation, and allow you to manipulate multiple imagesequences, separately or together, to perform more complex operations. Thisability makes it simpler to implement these examples using the IM API, andremoves the need to save images as temporary files, as many of the commandline examples require. When using an API, only permanent and semi-permanentimages need be saved to disk. Basically, let the example pages give you a start, to let you see whatis possible with ImageMagick. Then, formulate what you want to do onthe command line, before coding the operations in scripts and APIcode, where it is harder to make extensive changes. I also recommend that you comment your API code, heavily, adding thecommand line equivalents to what you are trying to do, if possible. That way,you can check and compare the results against those using the command line.This lets you debug problems that you may come across later, especially asimprovements are made to image processing in the Core ImageMagick Library.

Downloading Input Images and Results

As much as possible, I try to use images built-into IM (such as'logo:

Imagemagick Convert

' or 'rose:

Imagemagick Convert

') as input images for IM examplecommands, or to generate input images using IM commands. I also often re-usethe output of previous commands in later examples. Because of this, youusually don't need to download any 'test' images in order to try out theexamples yourself. However, such generated or built-in images are not always convenient. So,when I do use an external image, I tend to re-use that input image, or theresults of previous examples, for later examples in that section. Sometimes the original source image will be displayed or for larger imagesa link to the source image is provided. More commonly only the final resultingimage will be shown, as the input is well known or obvious. Almost all the IM example commands shown are executed in the same webdirectory in which they appear. That is, the command you see is the commandthat was actually used to generate the image. Because of this you can modifythe page's URL to download or view the input image(s) used by an example.Extra copies of the external source images have also been placed in the 'images' and 'img_photos'sub-directories. See also the example of a Fancy Photo Index of those images. If text output or image information is produced by an example, it is saved toa text file, and an image of it is generated for display on the Web page.Selecting the text output image will link you to a copy of the actual textoutput by the command. In all these examples, selecting the output image should let you download theimage which was actually created by the example command. But be warned, notall browsers understand all image formats used.

External Image Sources

By the way, most of the source images used in these examples come from Anthony's IconLibrary, particularly the background tiles, largeclip-art, and dragons sections of the library. (I like dragons!). ASIDE: these pagesmay be offline as the web site slowly moves to a new server. This library actually predates the WWW. I created it in 1991, due to the lackof good, clean iconic images for use on the X Window System. The advent ofthe WWW has of course changed this, but my original library still exists andremains available as a source of images, even though it is not activelygrowing. Some specific images, and larger images, are contributed by the authors ofspecific examples. The authors of such examples are listed in the contributedsection, or at the bottom of the page. If you are looking for a specific image, I recommend using Google Image Search (or similar) tofind something appropriate. You can, of course, convert or resize such imagesusing IM for your own purposes. However, you should be careful aboutcopyright if you plan to use such images commercially.

PNG Images on Web Pages

In many examples, I use an image in PNG format, such as that shown to theright of this text. The PNG image format supports images withsemi-transparent pixels, a feature few other image formats provide. It isalso a very well-understood image format and, as such, is usable by most oftoday's image programs and Web browsers. Some Web browsers, however, do NOT handle transparent PNG images correctly(most notably Microsoft Internet Explorer v6). Because of this, I generallyuse the JPEG and GIF formats for images on the Web, and only use the PNGformat when generating images with semi-transparent pixels, or when exactcolors are needed for later examples. To allow IE v6 browsers to display PNG images, I use a special 'style sheet'using complex JavaScript. For information on this, see PNG withtransparency for IE. Technically, this is only problem with IE, notImageMagick.

Displaying Images on Your Screen

Display problems can also occur when displaying images on-screen. Because ofthis, I recommend using a command like the following to tilea 'checkerboard' pattern underneath the image, to highlight anytransparent or semi-transparent pixels in it.
The image displayed in the above example is a special PNG-format test image, which was generated using the shellscript 'generate_test'.Normally, the command would output the results to your display, not onto a Webpage like this. If you look carefully, you can see the checkerboard pattern though thesemi-transparent colors. However, the image, as a whole, is fully opaque. So,this technique should work on all displays, Web browsers, and image viewers.As of IM v6.0.2, the 'display' program performs something likethis automatically. However, it does not seem to handle images using colortables (i.e., GIF) in this way. Using the 'x:' output image format(as above) causes an image to be displayed directly to the screen, withouthaving to save it. See Show Output Display for moreinformation.

Font Usage

The fonts I use in these examples are from a small collection of TrueType fontsI have found over the years, and saved for my own use. Some of these are undercopyright, so I cannot publish them online. You are, however, welcome to substitute other fonts that you have available.The examples should work (perhaps with some changes to image size) with anyappropriate font you have available on your system. Microsoft 'Arial' font, oreven 'Times-BoldItalic', should work on most systems. To see what fonts are currently available to your version of IM, run thefollowing command..WARNING: If the font requested is not found, ImageMagick used to silentlysubstitute a default font, typically Arial or Times. It still does this, but awarning is now given. So, test the font beforehand, to make sure that it isthe one you want, and not the default font. On my Linux system, I use a special Perl script, '

Imagemagick For Windows

imagick_type_gen', togenerate a file, 'type.xml', saved in the '.magick'sub-directory of my home directory. ImageMagick uses that file, which containsa font list in XML format, to find fonts. The script '

Imagemagick

locate's(run 'updatedb' first, if you have just added new fonts), anddescribes all the fonts available on my system. With this setup, I only needto specify the name of the font I want to use, and not the full path to aspecific font file. For example..
Before IM v6.1.2-3, the 'type.xml' file was named 'type.mgk'. If you are using an earlier version of IM.
The fonts used in these IM examples are listed in a Montage of Example Fonts Example. Mypersonal favorite is Candice, so it gets used quite a bit.
If you also like the 'Candice' font, or any of the other fonts I use, grab them from Free Fonts or 1001 Fonts .com.

Example Page Updates

These example pages are in an on-going cycle of improvement. Generally, I findI stop adding to these pages for long periods of time, when my interests becomefocused on other things. Often these examples are re-built using the latest beta release of IM, allowingme to see changes and bugs that may appear in each version of IM, before it isgenerally released. However, the example images shown are what the given IMcommand produces on myImagemagick v7 system. If you get something different, your IMis probably a much older version (with old bugs), or is not correctlyinstalled. Note that e-mailing me, or discussing some aspect of ImageMagick on the IM Users Forum will generally result in newexamples, or whole new sections, being added to these examples. The morediscussion there is, the better the examples become. If you are doing anything interesting with IM, please share, and allow me toprovide examples of your technique to the rest of the IM community. Some of thebiggest advances in IM usage have come from users just like you.

Special Thanks

A special thank you goes to Cristy, who has tirelessly spent months, upgrading,bug-fixing, and putting up with my off-the-wall suggestions.. especially withregards to my major suggestions for the command line processing, parenthesis,image sequence operators, and GIF animation processing. He has done a marvelous job making Version 6 the best and most advanced commandline image processing program available. While most users will not showappreciation for that, I certainly do appreciate the effort he has put into IM.I also want to thank Gabe Schaffer, who has been most helpful in discussionsinvolving the JPEG format and library, affine matrix operators, and MagickVector Graphics in general. And to Glenn Randers-Pehrson, who looks after the PNG coder module and has ainterest in Color Quantization and Dithering. He was the first to add'halftone' dithering to IM, which I later revised and extended further, toadded new dithers to the ordered dither configuration file. And finally, I want to thank the huge number of people with problems,suggestions, and solutions, who generally lurk on the IM User Forum. Many now have their names ascontributors of ideas and suggestions throughout IM Examples. I also want to thank the people who regularly answer questions on the forums,such as 'Bonzo', and his web site RubbleWebs, detailing use of IM commands from PHP scripts. Also 'scri8e' and his Web site, Moons Stars, for glitter and starhandling. Also a thank you goes to Pete 'el_supremo' A special thanks goes to Fred Weinhaus, a researcher from the early days of image processing, whowas a major help in the initial implementation of the General Image Distortion Operator. You can seeFred's ImageMagick scripts on Fred's ImageMagick Site, often as a proof of concept for future IMadditions. Also to Nicolas Robidoux, an expert in digital image processing, for reworkingthe Elliptical Weighted AverageResampling, which vastly improves the output of General Image Distortion. And finally to the many users of ImageMagick who, had allowed others to seethe IM commands they use as part of some project, either on the forums, or onthe web. You are all to be commended on your willingness and openness to shareyour findings.
Well enough 'Yadda, yadda, yadda.' Go look at some of the examples.