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();
}
Currently embedded ICC profiles are not supported ↩
Modules§
Structs§
- Aseprite
- Data structure representing an Aseprite file
- Aseprite
Cel - A single cel in a frame in a layer
- Aseprite
Frame Info - Information about a single animation frame
- Aseprite
Frame Range - A range of frames in an aseprite
- Aseprite
Frames - The frames contained in an aseprite
- Aseprite
Layers - The layers inside an aseprite file
- Aseprite
Palette - The palette entries in the aseprite file
- Aseprite
Slice - A single Aseprite slice
- Aseprite
Slice Image - A single slice image
- Aseprite
Slices - The slices contained in an aseprite
- Aseprite
Tag - A single Aseprite tag
- Aseprite
Tags - All the tags defined in the corresponding aseprite
Enums§
- Aseprite
Layer - An aseprite layer
- Nine
Slice - The nine slices in a nine-patch image