MCPcopy Index your code
hub / github.com/alpine-alpaca/asefile

github.com/alpine-alpaca/asefile @v0.3.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.8 ↗ · + Follow
426 symbols 1,113 edges 25 files 123 documented · 29% updated 1y ago★ 516 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

asefile

Build status crates.io Documentation

Utilities for loading Aseprite files. This library directly reads the binary Aseprite files (specification) and does not require you to export files to JSON. This should make it fast enough to load your assets when the game boots up (during development). You can also use it to build your own asset pipelines.

Documentation | Changelog

Example

use std::path::Path;

use asefile::AsepriteFile;
use image::{self, ImageFormat};

fn main() {
    let file = Path::new("input.aseprite");
    // Read file into memory
    let ase = AsepriteFile::read_file(&file).unwrap();
    // Write one output image for each frame in the Aseprite file.
    for frame in 0..ase.num_frames() {
        let output = format!("output_{}.png", frame);
        // Create image in memory, then write it to disk as PNG.
        let img = ase.frame(frame).image();
        img.save_with_format(output, ImageFormat::Png).unwrap();
    }
}

Unsupported Features

The following features of Aseprite 1.2.25 are currently not supported:

  • color profiles

Bug compatibility

  • For indexed color files Aseprite supports blend modes, but ignores them when exporting the image. The images constructed by asefile currently match the in-editor preview.

  • Aseprite has a bug in its luminance and color blend modes. Since this is the same in editor and in exported files, asefile reproduces this bug. (If Aseprite fixes this, asefile will fix this bug based on the version that the file was generated with.)

Core symbols most depended-on inside this repo

Shape

Function 195
Method 174
Class 45
Enum 12

Languages

Rust92%
C++8%

Modules by API surface

src/blend.rs71 symbols
src/tests.rs53 symbols
src/file.rs42 symbols
src/tileset.rs33 symbols
src/cel.rs31 symbols
src/layer.rs25 symbols
src/parse.rs21 symbols
ref/dummy.cc21 symbols
src/palette.rs16 symbols
ref/set_sat_tests.cc15 symbols
src/tilemap.rs14 symbols
src/reader.rs14 symbols

For agents

$ claude mcp add asefile \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page