| 1 |
|
| 2 |
|
| 3 |
// exr imports |
| 4 |
extern crate exr; |
| 5 |
|
| 6 |
/// Print the custom meta data of a file, excluding technical encoding meta data. |
| 7 |
/// Prints compression method and tile size, but not purely technical data like chunk count. |
| 8 |
fn main() { |
| 9 |
use exr::prelude::*; |
| 10 |
|
| 11 |
let meta_data = MetaData::read_from_file( |
| 12 |
"generated_rgba_with_meta.exr", |
| 13 |
false // do not throw an error for invalid or missing attributes, skipping them instead |
| 14 |
).expect("run example `1_write_rgba_with_metadata` to generate the required file"); |
| 15 |
|
| 16 |
for (layer_index, image_layer) in meta_data.headers.iter().enumerate() { |
| 17 |
println!( |
| 18 |
"custom meta data of layer #{}:\n{:#?}", |
| 19 |
layer_index, image_layer.own_attributes |
| 20 |
); |
| 21 |
} |
| 22 |
} |