uncategorized

Batch resize photos to thumbnail size

On OpenSolaris, make sure SUNWimagick is installed

1
pfexec pkg install SUNWimagick

Script

This script will resize all photos (ending in JPG) to a 200x150 size thumbnail.
These will overwrite the files in the current folder! Make sure you have a copy of the photos to preserve as original size.

1
2
3
4
5
6
#!/bin/bash
FN=$( find . -type f -name "*JPG" -exec echo {} \; )
for i in $FN ; do
echo mogrify -resize 200x150 $i
mogrify -resize 200x150 $i
done
Share