Rotate and resize images using Imagemagick
January 11, 2006Let's assume that you have a bunch of images for which you want to create thumbnails. The thumbnails should be rotated 90 degrees counter clockwise (that is 270 degrees clockwise), scaled to a specific size and renamed from abc_large.png to abc_thumb.png.
The following snippet crops all images in the current working directory to 222px x 185px. Furthermore the image type will be changed from gif to jpeg using the original image name. And all in one line of shell script.
Theconvert command is part of the Imagemagick software package.
See http://www.imagemagick.org/ for download and install instructions.