Spritesheet Detector
spritesheet_detector
is a Rust library that analyzes a spritesheet image and detects its grid layout and non-empty frame count. It can handle spritesheets with margin/padding (based on the color at the top-left pixel) and works even if the last row of frames is incomplete.
Features
- Detects sprite frame dimensions.
- Determines the number of columns and rows in the spritesheet.
- Counts only the valid frames (ignoring cells that are completely the margin color).
- Supports a shortcut for square frames when the image width is evenly divisible by its height.
it was made for this type of spritesheet:
Usage
use open;
use ;