Skip to content

Instantly share code, notes, and snippets.

@njanakiev
Last active April 13, 2018 08:47
Show Gist options
  • Save njanakiev/5982a6000c49141abe20ce03bca21c7e to your computer and use it in GitHub Desktop.
Save njanakiev/5982a6000c49141abe20ce03bca21c7e to your computer and use it in GitHub Desktop.
Imagemagick Commands

Imagemagick Commands

Resize image (e.g. to size 800x800)

convert -resize 800x800 -quality 100 in.png out.png

Join images horizontally

convert +append *.png out.png

Stack images vertically:

convert -append *.png out.png

Crop image into two parts

convert -crop 50%x100% +repage in.png out.png

Combine multiple (equal sized images) as grid

convert \( img_01.jpg img_02.jpg +append \) \( img_03.jpg img_04 .jpg +append \) -append out.png

Extract frames of animated gif

convert -coalesce animation.gif target.png
convert -coalesce animation.gif target_%04d.png

Here is more information on the coalesce option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment