Created
April 14, 2025 12:06
-
-
Save edhelas/865becfad76e9a219b4e1a45f2856e87 to your computer and use it in GitHub Desktop.
A little script to extract JPG from CR2 files and copy the EXIF metadate to them
This file contains hidden or 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/bash | |
echo "Convert $1 directory" | |
exiftool -b -PreviewImage -orientation -w .jpg -ext cr2 -r "$1" | |
echo "Copy EXIF" | |
cd "$1" | |
for file in *.CR2; do | |
exiftool -tagsFromFile "$file" ${file::-4}.jpg | |
done | |
echo "Cleaning up" | |
rm *_original | |
if [ "$2" = "clean" ] | |
then | |
echo "Removing the CR2 files" | |
rm *.CR2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment