📝 Edit page
➕ Add page
Image Magick
Create, edit, compose, or convert digital images in a variety of formats
About
Download
- Download page.
Install from source
$ wget https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.gz
Debian or Ubuntu
sudo apt-get install imagemagick
Or
$ sudo add-apt-repository ppa:isage-dna/imagick
$ sudo apt-get update
$ sudo apt-get upgrade
macOS
$ brew install imagemagick
Help
$ magick --help
Usage: magick tool [ {option} | {image} ... ] {output_image}
Usage: magick [ {option} | {image} ... ] {output_image}
magick [ {option} | {image} ... ] -script {filename} [ {script_args} ...]
magick -help | -version | -usage | -list {option}
$ convert --help
Version: ImageMagick 7.0.11-13 Q16 x86_64 2021-05-17 https://imagemagick.org
...
Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
Image Settings:
-adjoin join images into a single multi-image file
...
Usage
See CLI doc.
$ magick image.jpg image.png
With options:
$ magick label.gif +matte \
\( +clone -shade 110x90 -normalize -negate +clone -compose Plus -composite \) \
\( -clone 0 -shade 110x50 -normalize -channel BG -fx 0 +channel -matte \) \
-delete 0 +swap -compose Multiply -composite button.gif");
Size
$ magick -size 640x480
-size width[xheight][+offset]
Crop
$ magick '*.jpg' -crop 120x120+10+5 thumbnail%03d.png
$ # More efficient
$ magick '*.jpg[120x120+10+5]' thumbnail%03d.png
Shadow
-shadow percent-opacity{xsigma}{+-}x{+-}y{%}