Sunday, 12 June 2011

Batch file to convert RAW to JPEG using dcraw

This is more a note for myself really, so that I can't quickly batch convert my Olympus E-500 .ORF (raw) images quickly to .jpg (JPEG) using dcraw and exiftool.

Using dcraw you can convert from most RAW formats to lesser formats, like JPEG.

Code:   
for i in *.ORF; do newname=$(echo $(basename "$i" ".ORF").jpg); dcraw -c -w -W -v -h "$i" | cjpeg -quality 95 -optimize -progressive > "$newname"; exiftool -overwrite_original -tagsFromFile "$i" "$newname"; done
   

No comments: