From wikinotes

Imagemagick is a program similar to ffmpeg, except instead of primarily targeting videos, imagemagick's primary focus is images.


Imagemagick is built on a handful of base commands:

  • identify
  • convert
  • mogrify


Suitable for simple operations like cropping/resizing.

pacman -S graphicsmagick
gm display img.png  # right click for options

identify format

Using identify format you can pick out the information you'd like to obtain from the image.

identify -format '%[scene] ' file.psd  # in this case layer-number

image sequence to gif/mng

convert \
   -resize 100x100! /path/frame-01.png \
   -resize 100x100! /path/frame-02.png \  

convert -delay 20 F_*.png -loop 0 movie.gif

flat colour with title

convert \
    -size 64x64 \
    xc:rgba(200,100,100,255) \
    -gravity Center -annotate 0 'your title' \

generating .ico files

convert logo.png -define icon:auto-resize=256,64,48,32,16 logo.ico

extracting PSD layers

for i in $(identify -format "%[scene] " <filename>.psd); do 
    convert <filename>.psd[$i] <extracted-filename>-$i.png;