readme.md

The CRaw2 framework

A C and Python framework for Canon Raw v2 hacking

Origin

Because I was curious about how my holidays pictures are written to the memory card by my Canon camera, I started to write the Canon Raw v2 specification, based on others' work.

But is was not enough to 'open' this proprietary format, the next obvious step is to write code that can be used by others to play with CR2 file content. Python is easy to write and elegant to read, and C is efficient, let's use the best mix of them!

Design

The CRaw2 framework is composed of 3 parts: the libcraw2 library written in C, craw2tool a CLI tool and PyCRaw2 a Python extension.

Libcraw2 has two kind of interfaces:

an C API, mainly used by crawtool, to offer CR2 data handling in a Camera agnostic way

an Python extension, PyCraw2 a simpler API which goal is to offer all required functions to render RAW data into a 16bits RGB image, either from RAW (RGGB) or sraw/mraw (YCbCr) data.