Skip to content

TheNeikos/aseprite-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aseprite Reader

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

It's focus is on speed and completeness1.

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

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();
}

Footnotes

  1. Currently embedded ICC profiles are not supported

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages