Crates.io | hdrldr |
lib.rs | hdrldr |
version | 0.1.2 |
source | src |
created_at | 2019-05-27 07:52:36.43446 |
updated_at | 2019-05-28 08:47:08.599136 |
description | Radiance HDR loader in Rust |
homepage | |
repository | https://github.com/TechPriest/hdrldr |
max_upload_size | |
id | 137271 |
size | 10,039 |
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.
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