I had a wad of images that I needed to resize from 300dpi and high-resolution jpg to 4.5×6 (or 6×4.5) low resolution at 72 dpi.
First, I installed ImageMagick:
sudo aptitude install imagemagick
Then I opened GIMP and determined the pixel width and height of one image. (Image -> Canvas Size). In my case, it was 3264×2448.
Next, I resized the image to the size I wanted. That turned out to be 432×324.
In other words, I wanted my new images to be 0.132352941 of the original image. A quick test told me I was on the right track:
convert P4250049.JPG -resize 13.2352941% test.jpg
The first time I did this I forgot the % sign and got a 13×10 pixel image – not exactly what I wanted.
So, on to batch-converting everything in a directory:
for i in *.JPG; do
convert $i -resize 13.235941% -quality 20 ./resized/$i
And all my resized images were in the resized directory below the image directory. (Did I mention I wanted to reduce the quality so my images would be smaller too? Yep, that’s what the -quality line does.)