ImageMagick-style image conversion and editing.

Synopsis

magick [input ...] [operations...] [output]

Description

Alias for convert. Applies a sequence of image operations (resize, rotate, crop, color adjustments, compositing) and writes the result. PDF inputs are rasterized with pdf.js at 72 DPI unless -density says otherwise, matching ImageMagick's own PDF handling; select a page with a bracket suffix (0-based).

Options

-resize GEOMETRY Resize; supports %, !, ^, >, and < modifiers.

-thumbnail GEOMETRY Create an optimized thumbnail.

-rotate degrees Rotate image by degrees.

-crop WxH[+X+Y] Crop, optionally positioned with signed offsets.

-quality N Set output quality (0-100).

-auto-orient Apply EXIF orientation.

-flip / -flop Mirror vertically / horizontally.

-strip / -trim Remove metadata / uniform edges.

-background COLOR Set the canvas background color.

-extent GEOMETRY Resize the canvas using background and gravity.

-alpha MODE Control alpha (set, remove, extract, off, ...).

-colorspace TYPE Convert color space (sRGB, Gray, CMYK, ...).

-transparent COLOR Make matching pixels transparent.

-blur / -sharpen R[xS] Apply a Gaussian effect.

-density DPI Rasterization DPI for PDF inputs (default 72).

-auto-gamma / -auto-level / -normalize / -negate

+append / -append Join images in the current sequence horizontally / vertically.

-gravity POSITION Set annotation anchor.

-fill COLOR Set annotation text color.

-annotate +X+Y TXT Draw text with the bundled Adobe Clean font.

Examples

$ magick input.jpg -resize 800x600 output.png

Resize an image.

$ magick doc.pdf[2] -resize 800x page3.png

Rasterize page 3 (0-indexed) of a PDF and resize it.

$ magick a.jpg b.jpg +append filmstrip.jpg

Join two images side by side.

Notes

Behaves identically to convert; both names point at the same implementation. Use pdftoppm to rasterize a whole PDF document in one pass instead of page by page.

See Also

convert, pdftoppm, pdftocairo