ImageMagick Command-line suite for creating, converting, and editing raster images

Getting Started

This page covers installing ImageMagick and the one thing that trips people up most: which command to actually type.

1. Install ImageMagick

PlatformCommand
Arch Linuxsudo pacman -S imagemagick
Debian / Ubuntusudo apt install imagemagick
Fedorasudo dnf install ImageMagick
openSUSEsudo zypper install ImageMagick
macOS (Homebrew)brew install imagemagick
WindowsInstall from the official Windows binaries

Verify it installed correctly:

magick -version

2. magick vs. convert

ImageMagick 7 consolidated its separate binaries (convert, identify, mogrify, composite, montage, compare) into a single magick command, used with a subcommand:

magick convert input.png output.jpg     # explicit subcommand form
magick input.png output.jpg             # convert is also the implicit default
magick identify photo.jpg               # print format/size/depth info
magick mogrify -resize 50% *.png        # in-place batch edit

On many Linux distributions the legacy standalone binaries (convert, mogrify, etc.) are still installed for backward compatibility and behave identically to magick convert / magick mogrify. If convert isn't found on your system, or resolves to an unrelated program (this happens on some Windows setups where convert.exe is a built-in disk utility), use the magick form — it's also the form the project recommends going forward. This guide uses magick throughout.

3. Run your first conversion

magick photo.heic photo.jpg      # convert by changing the output extension
magick photo.jpg -resize 50% small.jpg

ImageMagick infers input and output formats from file extensions by default; you can override either with an explicit format prefix, e.g. magick png:- when piping through stdin/stdout.

4. Inspect an image before editing it

magick identify photo.jpg
# photo.jpg JPEG 4032x3024 4032x3024+0+0 8-bit sRGB 2.1MB 0.010u 0:00.009
magick identify -verbose photo.jpg | less

Continue to Common Operations for resizing, cropping, format conversion, and batch processing, or jump straight to the Command Reference for a cheat sheet.