Skip to content

Instantly share code, notes, and snippets.

@sergebat
Created December 15, 2013 21:08
Show Gist options
  • Save sergebat/7978130 to your computer and use it in GitHub Desktop.
Save sergebat/7978130 to your computer and use it in GitHub Desktop.
ImageMagick: Convert all PNG files from "input" sub-directory of any size to the 768x1024 images in output directory, cropping it vertically, or extending vertically if image is too small (filling with specified color), converting to JPG
mogrify -path "output" -background "#ff0000" -format jpg -resize 768x4096^ -gravity center -extent 768x1024 input/*.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment