Today I used a couple of bash commands, a small C++ program, and ImageMagick to add borders to images to get them into the 3:2 ratio of 4R. I need them at this size because I don't want them auto-cropped, and I want them photo printed (via snapfish).
All my images are in one directory, and they're all jpgs (with extension .jpg). They're mostly different sizes and shapes, portrait and landscape.
The identify command from ImageMagick lets us query the resolution of the image, and writes the result to stdout:
identify image.jpg
results in:
image.jpg JPEG 1224x1632 1224x1632+0+0 DirectClass 8-bit 610.512kb
being printed in the shell.
We need just the name, and the resolution, and we need this for all images in the directory:

Recent comments
6 weeks 5 days ago
13 weeks 6 days ago
14 weeks 6 days ago
34 weeks 1 day ago
40 weeks 2 hours ago
40 weeks 1 day ago
41 weeks 6 days ago
42 weeks 7 hours ago
42 weeks 4 days ago
42 weeks 4 days ago