3 releases

0.1.2 May 28, 2019
0.1.1 May 28, 2019
0.1.0 May 27, 2019

#602 in Images

Download history 2/week @ 2024-02-15 25/week @ 2024-02-22 18/week @ 2024-02-29 9/week @ 2024-03-07 4/week @ 2024-03-14

57 downloads per month

WTFPL license

9KB
223 lines

HdrLdr

Load Radiance HDR (.hdr, .pic) images. Slightly rustified version of C++ code by Igor Kravtchenko. If you need more image formats besides HDR, take a look at Image2 crate.

Example

Add hdrldr to your dependencies of your Cargo.toml:

[dependencies]
hdrldr = "0.1"

And then, in your rust file:


fn main() {
    // ...
    let f = File::open("foo.hdr").expect("Failed to open specified file");
    let image = hdrldr::load(f).expect("Failed to load image data");
    // Use your image data
    // ...
}

For more complete example, see Simple HDR Viewer application

No runtime deps