Created
September 18, 2019 12:21
-
-
Save artoliukkonen/3b0d6fb46dd4321376fc534581502e56 to your computer and use it in GitHub Desktop.
Script to create 2000x thumbnails from Canon RAW images, and store those in same hierarchy under "thumbs" folder. Also preserves metadata info from original RAW.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
cd /mnt/usb/ | |
for d in */; do | |
echo $d | |
if [ ! -d "$d/thumbs" ]; then | |
echo "generating thumbs" | |
exiftool -b -PreviewImage -w "$d/thumbs/%f.jpg" -ext CR2 -r "$d" | |
exiftool -tagsfromfile "$d/%f.CR2" -all:all -r -overwrite_original -ext jpg "$d/thumbs" | |
mogrify "$d/thumbs/*.jpg" -resize 2000x "$d/thumbs/*" | |
else | |
echo "has thumbs, skipping" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment