Function exr::image::read::read[][src]

pub fn read() -> ReadBuilder
Expand description

Create a reader which can be used to load an exr image. Allows you to exactly specify how to load the image, for example:

    use exr::prelude::*;

    // the type of the this image depends on the chosen options
    let image = read()
        .no_deep_data() // (currently required)
        .largest_resolution_level() // or `all_resolution_levels()`
        .all_channels() // or `rgba_channels(constructor, setter)`
        .all_layers() // or `first_valid_layer()`
        .all_attributes() // (currently required)
        .on_progress(|progress| println!("progress: {:.1}", progress*100.0)) // optional
        .from_file("image.exr").unwrap(); // or `from_buffered(my_byte_slice)`

You can alternatively use one of the following simpler functions:

  1. read_first_flat_layer_from_file
  2. read_all_rgba_layers_from_file
  3. read_all_flat_layers_from_file
  4. read_all_data_from_file