This commit is contained in:
gallant 2023-08-01 16:35:40 -05:00
parent 2356cb5406
commit 0edc112241
2 changed files with 4 additions and 3 deletions

1
README.md Normal file
View file

@ -0,0 +1 @@
run `cargo run -- output.gif`

View file

@ -9,8 +9,8 @@ use x11rb::protocol::xproto::CreateGCAux;
use std::collections::VecDeque;
fn main() {
let _arg = std::env::args().next().unwrap();
let input = OpenOptions::new().read(true).open("output.gif").unwrap(); // Grabs image from arguement
let arg = std::env::args().skip(1).next().unwrap();
let input = OpenOptions::new().read(true).open(arg).unwrap(); // Grabs image from arguement
let mut de_options = DecodeOptions::new();
de_options.set_color_output(gif::ColorOutput::RGBA);
@ -42,7 +42,7 @@ fn main() {
while let Some(frame) = decoder.read_next_frame().unwrap() {
v_frames.push_back(frame.clone());
} //Putting gif frames into a vector
println!("{:?}", v_frames.get(0));
//println!("{:?}", v_frames.get(0));
loop {
let popd = &v_frames.pop_front().unwrap();