Quickly resize digital camera photos from the command line with ImageMagick

  • Place the photos you want to resize in a folder, for me that was christmas2008.
  • In the folder that contains your images, use find to run the same command on them.
  • find is capable of searching the filesystem for directories, files, etc. that contain specific strings in the name.
  • We are using find to find all JPG files, and then resizing them with ImageMagick‚Äôs convert command.
  • We are placing the resized images in a christmas2008.out directory.

First try setting the size to 50% of the original

find -iname '*.jpg -exec convert {} -resize 50% ../christmas2008.out/{} ';

In the end, I set the width to 800px

find -iname '*.jpg -exec convert {} -resize 800 ../christmas2008.out/{} ';

find . -maxdepth 1 -iname '*.jpg -exec convert {} -resize 800 for_internet/{} ';
categories: imagemagick |