Setting up the skills and environment before image automation begins: comfort in the bash/zsh terminal, basic shell scripting, and an understanding of pixel concepts, color channels, and image formats. It ends with installing ImageMagick 7 (magick), choosing a Q8, Q16, or Q16-HDRI build, and creating practice images in PNG, JPEG, and WebP.

Welcome to the Learn ImageMagick series! This series will take you to master ImageMagick — the open-source software suite for creating, editing, converting, and displaying images (200+ formats) from the command line — starting from your first conversion to a safe and optimized production image pipeline.
But before typing your first magick command, there are some basic skills and tools you must prepare. Why are prerequisites important? Because ImageMagick is a pure Command Line Interface (CLI) tool: all of its power is accessed through the terminal, and its output is most valuable when wired into scripts and pipelines — not when clicked manually.
Imagine wanting to become a professional chef in a commercial kitchen: a great recipe alone is not enough without mastering the knife, cutting techniques, and ingredient knowledge. Episode 0 prepares your "knife": comfort in the terminal, an understanding of shell scripting basics, knowledge of digital image concepts (pixels, channels, color depth), and then making sure ImageMagick 7 is installed and verified.
ImageMagick has no GUI button. A simple analogy: a GUI is like a TV remote control — simple, but limited to the buttons available. A CLI is like an aircraft control panel — scary at first, but it gives you full control. All DevOps work — processing images, automating thumbnails, building pipelines — starts from a command in the terminal.
You are free to use bash or zsh — both are valid shells for this entire series. These four commands are enough as a starting point:
| Command | Purpose |
|---|---|
pwd | Show the current working directory |
ls | List the directory contents |
cd | Change to another directory |
man magick | Read the ImageMagick 7 manual |
One concept you must understand from the start: stdout. Many commands write their results to stdout — the terminal screen. This output can be redirected to a file with > (redirect) or forwarded with | (pipeline). You'll keep using this pattern, for example magick -list format | wc -l to count the supported formats — so understand it early on.
ImageMagick is most powerful when called repeatedly from scripts. You don't have to be a shell expert, but these four concepts must be familiar:
| Concept | Example | Why It Matters |
|---|---|---|
| Variable | name="logo" | Stores values you reuse |
| Loop | for f in *.png | Processes many files at once |
| Exit code | $? | Tells you whether a command succeeded |
| Condition | if magick ...; then | Makes decisions based on results |
The simple script below — which you'll fully understand in the batch processing episode — shows the most common pattern: a loop that processes all PNG files at once.
for f in *.png; do
magick "$f" -resize 800x thumb-"$f"
done$f is a variable that holds the file name on each iteration of the loop. You'll keep using this pattern throughout the series to process images in bulk.
ImageMagick works at the pixel level, so without the following basic concepts, its options will feel like a black box:
| Concept | Explanation |
|---|---|
| Pixel | The smallest point of a raster image; raster = a collection of pixels |
| Color channel | The color component per pixel, e.g., R, G, B for sRGB |
| Alpha channel | The transparency level per pixel (0 = fully transparent) |
| Color depth | How many bits per channel (8 bits = 0-255 per channel) |
| Resolution | The number of pixels (width x height), e.g., 1920x1080 |
| File format | How pixel data is packaged, e.g., PNG, JPEG, WebP |
The 200+ formats that ImageMagick often claims means: it can read and write many different containers, but inside them everything is still processed as a collection of pixels with a certain set of channels and depth. This is why understanding the pixel model matters more than memorizing a list of formats — understand the model, and 200 formats become nothing more than packaging details.
Open your terminal and type:
magick --versionVersion: ImageMagick 7.1.1-44 Q16-HDRI x86_64 2026-05-08 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5)
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pango png raqm raw rsvg tiff webp wmf xml zlibThere are three things you should read from this output:
magick. This is the unified command of ImageMagick 7. If instead you see convert, you are still using ImageMagick 6 (legacy) — we'll discuss the difference in episode 2.Q16-HDRI determines the color processing precision (discussed below).png, jpeg, webp, heic, and gslib (Ghostscript). From this you can infer which formats are fully supported.If magick --version shows command not found, install it through your system's package manager:
sudo apt update
sudo apt install imagemagickNote: the package manager installs the version curated by your distribution — convenient, but sometimes a few releases behind. If you need the latest ImageMagick 7 with a Q16-HDRI build and complete delegates, download the official build from the project's download page at https://imagemagick.org and follow its installation instructions — the best choice for production and development that depends on the latest features.
When installing, you'll encounter the term quantum depth — how many bits are used for a single channel per pixel. This is not a trivial detail; it determines precision and memory usage:
| Build | Precision per Channel | Characteristics |
|---|---|---|
| Q8 | 8 bits (0-255) | Most memory-efficient, sufficient for most web needs |
| Q16 | 16 bits (0-65535) | High precision, reduces banding in smooth gradients |
| Q16-HDRI | Float (can exceed 0-100%) | Supports values beyond the normal range for HDR and advanced compositing |
An analogy: Q8 is like a scale that only shows kilograms, Q16 is a scale that shows grams, and Q16-HDRI is a scale that can weigh "more than full" — important when you combine many images and intermediate results exceed the normal range.
Tip
For learning ImageMagick in general, any build will work. But most official releases and package managers today already use Q16-HDRI — so you don't need to worry about choosing; what matters is making sure the major version is 7.x so that all the examples in this series apply.
Throughout the series we need images to test with. The most practical and license-free way: let ImageMagick create them itself. Run these three commands:
magick -size 640x480 gradient:skyblue-white sample.png
magick -size 800x600 plasma:fractal sample.jpg
magick -size 320x320 xc:tomato sample.webpgradient: creates a two-color gradient, plasma:fractal creates an interesting random texture to test, and xc:tomato creates a plain colored canvas. These three files — PNG, JPEG, WebP — you'll keep using until the final episodes. You may also add a real photo with a free license to test more realistic images.
pwd, ls, cd.> redirect, and | pipeline.magick --version shows ImageMagick version 7.x.sample.png, sample.jpg, and sample.webp for practice.In this episode 0 you've laid the foundation for the entire series: basic CLI and shell scripting skills, an understanding of digital image concepts, and ImageMagick 7 installed and verified with an understanding of build variants and practice images.
The key takeaways:
magick and the version is 7.x.In the next episode 1, we'll discuss the history, background, and why the world needs ImageMagick — born in 1990 in the hands of John Cristy while working at DuPont, the journey from ImageMagick 6 (legacy) to ImageMagick 7 (unified command), and the real problems it solves around the world. Make sure your environment is ready, because the Learn ImageMagick journey has only just begun!