Command Reference
A quick-lookup cheat sheet. See the linked page for each section for full
explanations and examples.
| Command | Description |
magick -version | Print version and build info |
magick identify <file> | Print format, size, depth, colorspace |
magick identify -verbose <file> | Full metadata dump |
| Flag | Description |
-resize 50% | Scale by percentage |
-resize 800x600 | Fit within box, keep aspect ratio |
-resize 800x600! | Force exact size, ignore aspect ratio |
-resize 800x600^ | Fill box, may overflow one side |
-resize 800x600> | Only shrink, never enlarge |
-thumbnail 200x200 | Faster resize for thumbnails (strips profiles) |
| Flag | Description |
-crop WxH+X+Y | Crop a region at offset X,Y |
-gravity <dir> | Set anchor: center, north, southeast, ... |
-rotate <deg> | Rotate clockwise (negative = counter-clockwise) |
-flip / -flop | Vertical / horizontal flip |
-auto-orient | Apply and clear EXIF orientation |
| Flag | Description |
-quality N | Lossy compression quality, 0-100 |
-strip | Remove EXIF/ICC/XMP metadata |
-define jpeg:extent=200KB | Target an approximate output file size |
-colorspace sRGB | Convert colorspace |
-depth 8 | Set bit depth per channel |
| Flag / command | Description |
magick composite | Overlay one image on another |
-composite | Same, as a chained operator |
-annotate +X+Y "text" | Draw text at an offset |
-pointsize N | Set font size for annotation |
-fill <color> | Set fill color for text/shapes |
| Command | Description |
magick mogrify [opts] *.jpg | Apply an operation to many files in place |
magick mogrify -path out/ ... | Write batch output to a separate folder |
magick mogrify -format webp ... | Batch-convert format, keep originals |
magick montage ... -tile 4x | Arrange images into a contact-sheet grid |
Color & effects
| Flag | Description |
-grayscale Rec709Luma | Convert to grayscale |
-blur 0x8 | Gaussian blur (radiusxsigma) |
-sharpen 0x1 | Sharpen |
-brightness-contrast 10x5 | Adjust brightness/contrast |
-modulate 100,150,100 | Adjust brightness,saturation,hue |