libraw 0.1.1

Rust wrapper for libraw failed to build libraw-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure builds.
If you believe this is' fault, open an issue.


The libraw crate provides a safe wrapper around the native libraw library.


In order to use the libraw crate, you must have the libraw_r library installed where it can be found by pkg-config. libraw_r is the reentrant version of LibRaw. Linking against the non reentrant libraw is not supported.

On Debian-based Linux distributions, install the libraw-dev package:

sudo apt-get install libraw-dev

On OS X, install libraw with Homebrew:

brew install libraw

On FreeBSD, install the libraw package:

sudo pkg install libraw


Add libraw as a dependency in Cargo.toml:

libraw = "0.1"

Import the libraw crate. Open an image with Image::open() and then use the methods on Image to operate on and inspect the raw image data.

extern crate libraw;

use std::path::Path;

fn main() {
    let mut image = libraw::Image::open(Path::new("image.nef")).unwrap();

    let raw = image.raw_pixmap().unwrap();

    let sum = raw.pixels().fold(0, |accum, pixel| {
        accum + pixel.value() as usize

    println!("average pixel brightness = {:.3}", sum as f64 / raw.len() as f64);


Copyright © 2015 David Cuddeback

Distributed under the MIT License.

Note: By using this crate, your executable will link to the libraw C library, which is available under the LGPL version 2.1, CDDL version 1.0, or LibRaw Software License.