Wednesday, October 5, 2011

Imagemagick: crop all image files

The code below crops all tif images to 61x61 pixels measured from upper left corner of an image (+0+0) and converts and image to 8-bit gray-scale levels.
for f in *.tif; do convert -colorspace Gray -depth 8 +gravity -crop 61x61+0+0 +repage $f ../california2/$f; done

1 comment: