Ah, command line tools, they’re so fast. And so easy to use on a Mac.
Given a bunch of image files in the same dimensions, that you want to crop to a fixed portion of the image:
1) Install imagemagick
brew install imagemagick
2) put all the images in a directory by themselves, and cd to that directory in the terminal
3) check the size of one of them using an imagemagick command-line utility:
→ identify IMG_1400.jpg
IMG_1400.jpg JPEG 960x1280 960×1280+0+0 8-bit sRGB 434KB 0.000u 0:00.000
Oh look, that one has a width of 960 and a height of 1280.
4) crop one of them, look at it, tweak the numbers, repeat until you get the dimensions right:
convert IMG_1400.jpg -crop 750x590+60+320 +repage test.jpg
The geometry works like this: move down by the y offset and to the right by the x offset. From this point, keep the portion below and to the right that is as wide as width and as tall as height.
5) Create an output directory.
mkdir output
6) Figure out how to list all your input files. Mine are all named IMG_xxxx.jpg so I can list them like this:
→ ls IMG_*.jpgIMG_1375.jpg IMG_1380.jpg IMG_1385.jpg…
7) Tell bash to process them all:[1]
for file in `ls IMG*.jpg`
do
echo $file
convert $file -crop 750x590+60+320 +repage output/$file
done
8) Find the results in your output directory, with the same names as the originals.
—–
[1] in one line:
for file in `ls IMG*.jpg`;> do echo $file; convert $file -crop 7750x590+60+320 +repage out/$file; done