Created
April 15, 2025 17:49
-
-
Save uhthomas/767a390e7d073f1481d4ac3a536a15ac to your computer and use it in GitHub Desktop.
convert raw arw nef to jxl
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
#!/usr/bin/env bash | |
set -euo pipefail | |
while IFS= read -r -d '' file; do | |
echo "Processing: $file" | |
magick mogrify -format jxl "$file" | |
out="${file%.*}.jxl" | |
if [[ "${file,,}" == *".nef" ]]; then | |
cjxl --container=1 -d 0 "$out" "$out" | |
fi | |
/usr/bin/vendor_perl/exiftool -overwrite_original_in_place -tagsfromfile "$file" "$out" | |
echo "Successfully converted. Removing original..." | |
rm -f "$file" | |
done < <(find . -type f \( -iname "*.ARW" -o -iname "*.NEF" \) -print0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment