Color Modes

Install from Source

Install from Linux SourceInstall from Windows Source

Chances are, ImageMagick is already installed on your computer if you are using some flavor of Linux, and its likely not installed if you are using some form of Windows. In either case, you can type the following to find out:

magick identify -version

If the identify program executes and identifies itself as ImageMagick, you may not need to install ImageMagick from source unless you want to add support for additional image formats or upgrade to a newer version. You also have the option of installing a pre-compiled binary release. However, if you still want to install from source, choose a platform, Linux or Windows. Before installing from source, you may want to review recent changes to the ImageMagick distribution.

The authoritative source code repository is https://github.com/ImageMagick.

Install from Linux Source

ImageMagick builds on a variety of Linux and Linux-like operating systems including Linux, Solaris, FreeBSD, Mac OS X, and others. A compiler is required and fortunately almost all modern Linux systems have one.

Clone the latest release from the source repository:


    $
    git clone --depth 1 --branch [latest_release_tag] https://github.com/ImageMagick/ImageMagick.git ImageMagick-7.1.1

Or download ImageMagick.tar.gz from imagemagick.org or a mirror and verify the distribution against its message digest.

Next configure and compile ImageMagick. Note the pkg-config script is required so that ImageMagick can find certain optional delegate libraries on your system. To configure, type:


    $
    cd ImageMagick-7.1.1
    $
    ./configure
    $
    make

If build fails, try gmake instead.

For advanced users, we recommend a modules build:


    $
    ./configure --with-modules

If ImageMagick configured and compiled without complaint, you are ready to install it on your system. Administrator privileges are required to install. To install, type

sudo make install

You may need to configure the dynamic linker run-time bindings:

sudo ldconfig /usr/local/lib

Finally, verify the ImageMagick install worked properly, type

/usr/local/bin/convert logo: logo.gif

For a more comprehensive test, run the ImageMagick validation suite. Ghostscript and Freetype are prerequisites, otherwise expect the EPS, PS, PDF and text annotations tests to fail.

make check

Ghostscript and Freetype are prerequisites, otherwise certain unit tests that render text and the EPS, PS, and PDF formats will likely fail. These unit tests require the open security policy to pass.

Congratulations, you have a working ImageMagick distribution 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.

The above instructions will satisfy a great number of ImageMagick users, but we suspect a few will have additional questions or problems to consider. For example, what does one do if ImageMagick fails to configure or compile? Or what if you don't have administrator privileges and what if you don't want to install ImageMagick in the default /../usr/local folder? You will find the answer to these questions, and more, in Advanced Linux Source Installation.

Install from Windows Source

We recommend you first uninstall an existing ImageMagick, else you might be surprised that your magick/convert commands go to the old version.

Building ImageMagick source for Windows can be done with a modern version of Microsoft Visual Studio IDE. Users have reported success with the Borland C++ compiler as well. If you don't have a compiler you can still install a self-installing binary release.

Clone the Github repo:

git clone https://github.com/ImageMagick/ImageMagick-Windows.git ImageMagick-Windows-7

and run CloneRepositories.cmd. Or download ImageMagick-Windows.zip from imagemagick.org or a mirror and verify the distribution against its message digest.

unzip ImageMagick-windows.zip

Unzip in a folder that does not need Admin permissions, otherwise Visual Studio will not be able to build the solution.

Next, launch your Visual Studio IDE and choose Open->Project. Select the configure workspace from the ImageMagick-7.1.1/VisualMagick/configure folder and open configure.sln. Choose Build->Build Solution to compile the program and on completion run the program.

    [configure]

Press Next and click on the multi-threaded static build. Now press, on Next twice and finally Finish. The configuration utility just created a workspace required to build ImageMagick from source. Choose Open->Project and select the VisualStaticMT workspace from the ImageMagick-7.1.1/VisualMagick/ folder. Finally, choose Build->Build Solution to compile and build the ImageMagick distribution.

The configure.exe utility can also be run on the command line instead of through the GUI wizard. You can see an example in our GitHub actions build.

To verify ImageMagick is working properly, launch a MS-DOS Command Prompt window and type


    $
    cd ImageMagick-7.1.1
    $
    convert logo: image.jpg

You may want to add the full path to VisualMagick\bin for your environment PATH variable, so you can call Magick/convert from any directory.

For a more comprehensive test, run the ImageMagick validation suite:

validate

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.

The above instructions will satisfy a great number of ImageMagick users, but we suspect a few will have additional questions or problems to consider. For example, what does one do if ImageMagick fails to configure or compile? Or what if you want to install ImageMagick in a place other than the ImageMagick-7.1.1/VisualMagick/bin folder? You will find the answer to these questions, and more, in Advanced Windows Source Installation.