Expand description

A pure rust library to handle camera raw files.

quickraw is a pure rust library to decode and renderer image from camera raw files.

Examples

Export thumbnail
use quickraw::Export;
 
let raw_data = std::fs::read("sample.ARW").unwrap();
let (thumbnail_data, orientation) = Export::export_thumbnail_data(&raw_data).unwrap();
 
// notice that this function is available on feature `image` only.
quickraw::Export::export_thumbnail_to_file("sample.ARW", "sample.thumbnail.jpg").unwrap();
Get EXIF data
use quickraw::Export;
let info = Export::export_exif_info(Input::ByFile("sample.ARW")).unwrap();
 
// info is a `quickexif::ParsedInfo` type, for more info please check https://docs.rs/quickexif
let width = info.usize("width").unwrap();
Export image
use quickraw::{data, DemosaicingMethod, Input, Output, Export, OutputType};
 
let demosaicing_method = DemosaicingMethod::Linear;
let color_space = data::XYZ2SRGB;
let gamma = data::GAMMA_SRGB;
let output_type = OutputType::Raw16;
let auto_crop = false;
let auto_rotate = false;
 
let export_job = Export::new(
    Input::ByFile("sample.ARW"),
    Output::new(
        demosaicing_method,
        color_space,
        gamma,
        output_type,
        auto_crop,
        auto_rotate,
    ),
).unwrap();
 
let (image, width, height) = export_job.export_16bit_image();
 
// or you can also export an image with quality(only works when the output type is JPEG).
// notice that this function is available on feature `image` only.
export_job.export_image(92).unwrap();

Re-exports

pub use export::Export;

Modules

Contains predefined color spaces from XYZ to target, predefined gamma parameters and color spaces from CAM to XYZ for different cameras.
Contains all the functions needed to export image.

Structs

Contains options for image rendering.

Enums

All the demosaicing method currently supported.
Chooses the input from a file or a buffer.
Decides if the output should be 8bit or 16bit.
Errors of raw file reading.

Constants

A flag to enable benchmark for several key processes.

Functions

Gets RawImage from a buffer
Gets RawImage from a file