Crate radiant[−][src]
Radiant
Load Radiance HDR (.hdr, .pic) images.
This is a fork of TechPriest’s HdrLdr,
rewritten for slightly better performance. May or may not actually perform better.
I’ve restricted the API so that it only accepts readers that implement
BufRead.
The original crate, which does not have this restriction, is in turn a 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 radiant to your dependencies of your Cargo.toml:
[dependencies]
radiant = "0.2"
And then, in your rust file:
fn main() { // ... let f = File::open("foo.hdr").expect("Failed to open specified file"); let f = BufReader::new(f); let image = radiant::load(f).expect("Failed to load image data"); // Use your image data // ... }
For more complete example, see Simple HDR Viewer application
Structs
| Image | A decoded Radiance HDR image. |
| RGB | The decoded R, G, and B value of a pixel. You typically get these from the data field on an
|
Enums
| LoadError | The various types of errors that can occur while loading an |
Functions
| load | Load a Radiance HDR image from a reader that implements |
Type Definitions
| LoadResult | An alias for the type of results this crate returns. |