Decoding raw digital photos in Linux (1997)

· coding · Source ↗

TLDR

  • dcraw is a single ANSI C file (~10,500 lines) that decodes raw CCD photos from 731 cameras on any OS, born in 1997 as a vendor-software workaround.

Key Takeaways

  • Camera makers shipped raw decoders only for Windows and Mac with no source; dcraw reverse-engineered formats for 731 cameras in portable C.
  • Compile with one gcc line; optional deps are jasper, libjpeg, lcms2. Drop NODEPS flag to build self-contained.
  • Output quality can exceed vendor tools when used correctly; 16-bit linear output is for professional editors, not general viewers.
  • dcraw was adopted by Adobe Photoshop, Picasa, IrfanView, RawTherapee, LightZone, and dozens more as the de facto raw decoding reference.
  • Author deliberately kept it a CLI program, not a library, arguing separate-process composition beats embedded abstraction for rapidly changing formats.

Hacker News Comment Review

  • No substantive HN discussion yet.

Original | Discuss on HN