Skip to content

Commit 54cbed1

Browse files
committed
Print Exif, Icc available in decode example
As we do not handle them internally it is also useful to get this information when checking bugs, as these could be indicators for a buggy color pipeline.
1 parent 944c783 commit 54cbed1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/decode.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ fn main() {
2121
let mut data = decoder.decode().expect("Decoding failed. If other software can successfully decode the specified JPEG image, then it's likely that there is a bug in jpeg-decoder");
2222
let info = decoder.info().unwrap();
2323

24+
eprintln!("{:?}", info);
25+
eprintln!("Exif: {}", decoder.exif_data().is_some());
26+
eprintln!("ICC: {}", decoder.icc_profile().is_some());
27+
2428
let output_file = File::create(output_path).unwrap();
2529
let mut encoder = png::Encoder::new(output_file, info.width as u32, info.height as u32);
2630

0 commit comments

Comments
 (0)