Convert raw images to jpeg

What: Convert raw camera images (like in CR2 format) to jpeg
Why: Smaller image size and easier handling in other programms
How: Use dcraw and pnmtojpeg in Debian

Installation of tools

1
2
sudo apt-get install dcraw
sudo apt-get install pnmtopng

Small script to iterate over the raw image directory

1
2
3
4
for fn in /home/frank/images/*.CR2; do
    target="${fn/.CR2/.jpeg}"
    dcraw -c "$fn" | pnmtojpeg > "$target"
done