#animation #gif #macroquad #graphics #image #binary-file

bin+lib quad-gif

Display GIF animations with Macroquad

2 unstable releases

Uses new Rust 2024

0.3.0 Feb 20, 2025
0.2.0 Jun 22, 2022

#484 in Images

Download history 1/week @ 2024-12-04 7/week @ 2024-12-11 6/week @ 2025-02-12 119/week @ 2025-02-19 8/week @ 2025-02-26

133 downloads per month

MIT license

480KB
141 lines

quad-gif

Cross-compile Crates.io docs.rs Crates.io

Display looping GIF animations with Macroquad.

The animation will loop forever, regardless of how many iterations are set in the file.

Documentation on docs.rs

Usage

There is a binary file included that can be used to show a GIF file.

quad-gif 0.2.0
Display a GIF file.

Usage: quad-gif <file>

API usage

The library can be used in a Macroquad application to show an animation.

use macroquad::prelude::*;
use quad_gif;

#[macroquad::main("quad-gif")]
async fn main() {
    let mut animation = quad_gif::GifAnimation::load("animation.gif".to_string()).await;

    clear_background(WHITE);
    loop {
        animation.draw();
        animation.tick();
        next_frame().await
    }
}

License

Copyright 2022 Olle Wreede, released under the MIT License.

Attribution

Animated Ferris in Action by A. L. Palmer

Happy as a Rustacean at Rust Fest Berlin 2016 (www.rustfest.eu)

Dependencies

~13MB
~282K SLoC