LibRaw: RAW image decoder library

LibRaw is a library for reading RAW files from digital photo cameras (CRW/CR2, NEF, RAF, DNG, MOS, KDC, DCR, etc.; virtually all RAW formats are supported). It pays special attention to correct retrieval of data required for subsequent RAW conversion.

The library is intended for embedding in RAW converters, data analyzers, and other programs using RAW files as the initial data.


  1. Copyright
  2. Overview of LibRaw API (C++)
  3. Compilation and Installation
  4. Data Structures, Error Codes, and Constants
  5. C++ API
  6. C API
  7. Notes on API (error code conventions, memory usage)
  8. Examples


LibRaw library, Copyright (C) 2008-2020 LibRaw LLC (
The library includes source code from
dcraw.c, Dave Coffin's raw photo decoder
Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net

LibRaw is distributed for free under two different licenses:

You may use one of these licensing modes and switch between them.