Sunday, January 25, 2009

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

No comments:

Post a Comment