Crate aseprite_reader2

Source
Expand description

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

  1. Currently embedded ICC profiles are not supported 

Modules§

error
Errors used in this crate
raw
Raw data types

Structs§

Aseprite
Data structure representing an Aseprite file
AsepriteCel
A single cel in a frame in a layer
AsepriteFrameInfo
Information about a single animation frame
AsepriteFrameRange
A range of frames in an aseprite
AsepriteFrames
The frames contained in an aseprite
AsepriteLayers
The layers inside an aseprite file
AsepritePalette
The palette entries in the aseprite file
AsepriteSlice
A single Aseprite slice
AsepriteSliceImage
A single slice image
AsepriteSlices
The slices contained in an aseprite
AsepriteTag
A single Aseprite tag
AsepriteTags
All the tags defined in the corresponding aseprite

Enums§

AsepriteLayer
An aseprite layer
NineSlice
The nine slices in a nine-patch image