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 |
$ bash ./convert_arw_to_jpg.sh 07
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
10/30
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
20/30
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
Processing "07/2024-07-25-???.arw"...
30/30
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
10枚ずつ Sony Alpha Raw データを JPG に変換するスクリプト。並列数は増やしてもよいが上げすぎないこと。枚数が多いとメモリ不足でPCがスタックする