Created
July 27, 2024 09:00
-
-
Save babarot/f66a31839c2d649c39be6abd91dd431b to your computer and use it in GitHub Desktop.
Convert Sony RAW to JPEG data
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
dir="${1:-.}" | |
cnt=1 | |
done=0 | |
files=() | |
for file in ${dir}/* | |
do | |
case ${file##*.} in | |
"ARW" | "arw") | |
true | |
;; | |
*) | |
continue | |
;; | |
esac | |
files+=(${file}) | |
done | |
for file in ${files[@]} | |
do | |
echo "Processing \"${file}\"..." | |
sips -s format jpeg ${file} --out "${file%.*}.jpg" &>/dev/null & | |
if (( (cnt++ % 10) == 0 )); then | |
((done+=10)) | |
echo "${done}/${#files[@]}" | |
wait | |
fi | |
done | |
wait |
Author
babarot
commented
Jul 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment