Skip to content

Commit

Permalink
decode: Print the file format
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 725735808
  • Loading branch information
vigneshvg authored and copybara-github committed Feb 11, 2025
1 parent 2689533 commit bc23322
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/crabby_decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ fn print_vec(data: &[u8]) -> String {
fn print_image_info(decoder: &Decoder) {
let image = decoder.image().unwrap();
let mut image_data = vec![
(
0,
"File Format",
format!("{:#?}", decoder.compression_format()),
),
(0, "Resolution", format!("{}x{}", image.width, image.height)),
(0, "Bit Depth", format!("{}", image.depth)),
(0, "Format", format!("{:#?}", image.yuv_format)),
Expand Down

0 comments on commit bc23322

Please sign in to comment.