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