v7.1.2-34 Latest Stable Release

Install from Source

Learn how to install ImageMagick from source on Linux, macOS, FreeBSD, Solaris, or Windows. Step-by-step instructions for compiling, configuring, and verifying your build, with guidance on optional libraries, advanced installation, and troubleshooting.

quickstart.sh
# Install via your favorite Package Manager
$ brew install imagemagick
# Convert PNG to WebP with compression
$ magick input.png -quality 85 output.webp
# Resize image maintaining aspect ratio
$ magick input.jpg -resize 800x600^ output.jpg

Chances are, ImageMagick is already installed on your computer if you use Linux, whereas it likely isn't if you are on Windows. In either case, you can check quickly by running:

magick identify -version

If the identify program executes successfully, you may not need to install from source unless you want to add support for specific image formats or upgrade. Alternatively, you can install a pre-compiled binary release. Before proceeding with a source build, you may want to review recent changes to the distribution. The authoritative repository is available at https://github.com/ImageMagick.

Install from Linux Source

ImageMagick builds seamlessly on Linux and Unix-like operating systems including Solaris, FreeBSD, and macOS. A compiler is required, and almost all modern systems include one.

1. Obtain the Source Code

Clone the latest release from the official repository:

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

Alternatively, download ImageMagick-7.1.2-34.7z from GitHub and verify its distribution against its provenance .

2. Configure and Compile

The pkg-config script is required to locate optional delegate libraries. Configure and compile by running:

cd ImageMagick-7.1.2-34

./configure
make

If the build fails, try running gmake instead. For advanced users, a modules build is recommended:

./configure --with-modules

3. Install and Verify

Administrator privileges are required for installation. Run the following commands:

sudo make install
sudo ldconfig /usr/local/lib

Verify that your installation functions properly:

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

For comprehensive verification, run the validation suite:

make check

Note: Ghostscript and FreeType are prerequisites; otherwise, tests involving text annotations and formats like EPS, PS, and PDF will fail. These unit tests require the open security policy to pass.

Congratulations! You have a working distribution ready to convert, compose, or edit images or use one of the APIs. For advanced questions, non-default installation paths, or troubleshooting, see Advanced Linux Source Installation.

Install from Windows Source

Recommendation: Uninstall any existing versions of ImageMagick first to avoid command conflicts with old binaries.

Building under Windows requires a modern version of Microsoft Visual Studio IDE (though Borland C++ has also been reported to work). If you do not have a compiler, you can install a pre-built binary release instead.

1. Clone or Download the Source

Clone the GitHub repository:

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

Then run CloneRepositories.cmd, or download ImageMagick-7.1.2-34.7z from GitHub and verify its provenance:

unzip ImageMagick-windows.zip

Be sure to unzip into a folder that does not require Administrator privileges so Visual Studio can build the solution successfully.

2. Compile via Visual Studio

Launch Visual Studio, choose File > Open > Project/Solution, open configure.sln located in the ImageMagick-7.1.2/VisualMagick/configure folder, and build the solution.

[configure]

Run the resulting configuration utility, select the multi-threaded static build option by clicking Next, and click Finish. Then, open the newly created VisualStaticMT workspace in ImageMagick-7.1.2/VisualMagick/ and build the complete solution.

You can also execute configure.exe from the command line; examples are available in our GitHub actions build.

3. Verify the Installation

Open an MS-DOS Command Prompt and run:

cd ImageMagick-7.1.2-34
magick logo: image.jpg

Consider adding the full path to VisualMagick\bin to your system PATH environment variable to call magick from any directory. For a thorough test, run the validation suite:

validate

Congratulations! You have a working Windows source build ready for use. For custom installation paths or troubleshooting compilation errors, consult Advanced Windows Source Installation.