2 releases

0.1.1 Feb 26, 2023
0.1.0 Mar 17, 2022

#506 in Images

Download history 40/week @ 2024-03-15 45/week @ 2024-03-22 98/week @ 2024-03-29 44/week @ 2024-04-05 30/week @ 2024-04-12 22/week @ 2024-04-19 24/week @ 2024-04-26 23/week @ 2024-05-03 23/week @ 2024-05-10 29/week @ 2024-05-17 25/week @ 2024-05-24 26/week @ 2024-05-31 31/week @ 2024-06-07 66/week @ 2024-06-14 91/week @ 2024-06-21 21/week @ 2024-06-28

213 downloads per month
Used in 4 crates (3 directly)

Apache-2.0

69KB
1.5K SLoC

Aseprite Reader

❕ Note: This, aseprite-reader2, is a fork of https://github.com/TheNeikos/aseprite-reader.

aseprite-reader2 is a parsing crate for .aseprite files, made by the Aseprite Editor.

It's focus is on speed and completeness[^1].

It exports a main Aseprite type, through which the parsed contents can be accessed.

[^1]: Currently embedded ICC profiles are not supported

Examples

use aseprite_reader::Aseprite;

fn load_character() {
    let aseprite = Aseprite::from_path("assets/sprites/character.aseprite")
        .expect("Could not read aseprite file.");

    let tags = aseprite.tags();

    let walk_tag = &tags["walk"];
    println!("This tag uses these frames: {:?}", walk_tag.frames); // `.frames` is a range

    let all_frames = aseprite.frames();
    let frames = all_frames.get_for(&walk_tag.frames);
    let images = frames.get_images();
}

Dependencies

~12MB
~74K SLoC