# Aseprite Loader
[](https://crates.io/crates/aseprite-loader)
[](https://github.com/bikeshedder/aseprite-loader/actions?query=workflow%3ARust)

[](https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html)
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
```rust,ignore
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](../LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0)>
- MIT license ([LICENSE-MIT](../LICENSE-MIT) or <http://opensource.org/licenses/MIT)>
at your option.