Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Created October 15, 2010 17:14
Show Gist options
  • Save xeoncross/628563 to your computer and use it in GitHub Desktop.
Save xeoncross/628563 to your computer and use it in GitHub Desktop.
# To batch process a whole folder of images you just copy them to a thumbnail folder and use ImageMagick to crop them to the size you want.
cd /home/user/photos/holidays
mkdir thumbs
cp /home/user/photos/holidays/* /home/user/photos/holidays/thumbs/
cd thumbs
# To cut out a section of the image (not resizing it) widthXheight+xoffset+yoffset
mogrify -crop 940x300+0+50 *
# or to resize the image keeping the aspect ratio
mogrify -resize 940x300^ *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment