Over a million developers have joined DZone.

Convert Canon RAW ( .CRW) To Jpeg

·
This is adapted from http://www.howtofixcomputers.com/forums/digital-photo/my-humble-contribution-wrapper-script-dcraw-linux-4360.html to enable (I think) higher quality interpolation in dcraw and higher quality JPEGs.


DCRAW="dcraw -w -c "
while [ $# -ge 1 ]
do
OJPEG=$(echo $1| perl -pe 's/\.crw$//i' | tr 'A-Z' 'a-z')'.jpeg'
echo "${DCRAW} $1 | cjpeg > ${OJPEG}"
${DCRAW} -q 3 $1 | cjpeg -quality 95 > ${OJPEG} || echo " *PROBLEM*"
# transfer EXIF data from the original raw file
exiftool -overwrite_original -TagsFromFile "$1" "${OJPEG}" >/dev/null
# preserve timestamps as much as possible
# touch -r "$1" "${OJPEG}"
dcraw -z "${OJPEG}"
shift
done

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}