Fork me on GitHub

refinery by adamhooper

A fast, usable RAW image processing library

Every expensive digital camera has its own special RAW format, the most unrefined and detailed format it can use to store photographs. This is useful because RAW files lose less detail and add fewer imperfections than your camera's JPEGs. But at some point you'll want to view and manipulate these RAW files.

Raw formats are:

Refinery makes these problems less painful. Refinery strives to be a fast, easy-to-use component of great image-processing programs.

Here's what refinery does. (This list is detailed because refinery doesn't do much, nor is it meant to.)


Runtime dependencies: None. You may install Exiv2 to read image metadata,, but it's not essential.

Additional compile-time dependencies:

On Ubuntu, you can install these like this: sudo apt-get install libgtest-dev libboost-dev cmake


This project's Makefile is generated by CMake.

To regenerate the Makefile, run "cmake -D CMAKE_BUILD_TYPE=Release .".

To make a debug-suited Makefile, use "Debug" instead of "Release".

Finally, "make" and (if installing) "sudo make install".


Read the full API documentation to start refining.


This code is public-domain. With no reservations I allow anybody to use it to do anything. (I'd prefer you don't boil any oceans with it, but if you did so you wouldn't be breaking copyright law.)

Several components are inspired by dcraw, written by Dave Coffin. dcraw is also free for all uses. It's available here:


Adam Hooper, with contact details at


You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://