use bmp::{px, Image, Pixel}; use embedded_graphics::{prelude::RgbColor, pixelcolor::Rgb888}; use std::fs; use nu_pretty_hex::Hex; use tinygif::{lzw::Decoder, *}; const CLR: u16 = u16::MAX - 1; /// End of Information const EOI: u16 = u16::MAX; const MAX_CODESIZE: u8 = 9; const MAX_ENTRIES: usize = 1 << MAX_CODESIZE as usize; type Code = u16; fn main() { // let input = include_bytes!("../cat2.gif"); let input = include_bytes!("../kiss.gif"); /* let mut input0 = &input[0x30d..]; loop { let (input1, seg) = Segment::parse(input0).unwrap(); println!("seg: {:?}", seg); input0 = input1; } */ // panic!("fuck"); let gif: Gif = Gif::from_slice(input).unwrap(); for f in gif.frames() { println!("Frame: {}", f.is_transparent); } }