Expand description
§Aseprite Loader
This crate implements a zero-copy parser for aseprite files according to the Aseprite File Format (.ase/.aseprite) Specifications:
https://github.com/aseprite/aseprite/blob/main/docs/ase-file-specs.md
§Usage
ⓘ
use aseprite_loader::loader::{AsepriteFile, LayerSelection};
let data = std::fs::read("sprite.aseprite")?;
let file = AsepriteFile::load(&data)?;
let (width, height) = file.size();
let mut rgba = vec![0u8; usize::from(width) * usize::from(height) * 4];
file.render_frame(0, &mut rgba, &LayerSelection::Visible)?;§License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Modules§
- binary
- This module contains a parser for the .aseprite file specification in
version 1.3 as described in the
aseprite/asepriterepository on GitHub: https://github.com/aseprite/aseprite/blob/main/docs/ase-file-specs.md - loader
- This module contains the actual loader API. This API is based on the
binary-module of this crate and does provide a convenience API for accessing layers, frames, tags and fully blended images.