Created
December 5, 2020 00:55
-
-
Save aschmelyun/86a51ab85a7b6eeb9c6f8a5e405286bb to your computer and use it in GitHub Desktop.
Bash script to convert CR2 images to JPG using dcraw
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
#!/usr/bin/bash | |
# usage ./cr2_to_jpg.sh /path/to/cr2/images/ /path/to/converted/jpgs/ | |
i=1 | |
total=$(find $1 -type f | wc -l) | |
for file in $1*.CR2 | |
do | |
dcraw -c -w -b 1.5 $file | pnmtojpeg > $2$(basename $file .CR2).jpg | |
ls -l | echo "$(basename $file) - $i/$total" | |
i=$((i + 1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment