Skip to content

Instantly share code, notes, and snippets.

@ebeigarts
Created September 27, 2011 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebeigarts/1245145 to your computer and use it in GitHub Desktop.
Save ebeigarts/1245145 to your computer and use it in GitHub Desktop.
Resizing images

Resizes and converts pictures in the current directory to out/.

ImageMagick provides the mogrify command.

Options:

  • -colorspace RGB - converts CMYK to RGB (needed for TIFFs)
  • -density 72 - sets DPI to 72 (needed for TIFFs)
mkdir -p out &&
rm -rf out/* &&
mogrify -colorspace RGB -density 72 -format jpg -resize "1024x1024>" -quality 75 -strip -verbose -path out/ *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment