assess_sprite
Measure pixel-art quality from an Aseprite frame to find what to fix: count colors, ramps, noise, jagged edges, bounding box, fill, centering, symmetry, palette conformance, and tiling seams.
Instructions
Measure the drawing itself and say what is worth fixing.
`get_sprite_info` says what a sprite contains and `render_preview` returns a picture
a text-only model cannot read. This answers the question in between: is the art any
good, in the ways that can be counted.
Reports how many colours are in use and roughly how many ramps they form, pixels with
no neighbour of their own colour (noise), jagged corners on diagonals, the drawn
bounding box, how much of the canvas it fills, whether it sits centred, and how far
the silhouette is from its own mirror. Each measurement that is worth acting on comes
back with a line saying why, so the numbers do not have to be interpreted.
Args:
ramp: Declare the ramp the art should be on and the report adds palette
conformance: the fraction of drawn pixels sitting exactly on it. This is the
measurement that separates shading from filtering, and it is omitted rather
than reported as a meaningless 1.0 when no ramp is given. On an **indexed**
sprite the readings also say how much of the ramp the palette can actually
hold, because conformance cannot see a ramp step that collapsed onto its
neighbour: the colour it collapsed to is still on the ramp, so banded
shading still scores 1.0.
check_tiling: For a tile, also measure how much worse the wrapping edge looks
than the interior, per axis. Near 1.0 wraps; much above 1.0 has a seam.
layer: Measure one layer instead of the flattened frame.
Reads the whole frame in one Aseprite launch. None of the pixels are returned, only
the measurements, so this is cheap to call after every pass.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ramp | No | ||
| frame | No | Default: 1. | |
| layer | No | ||
| filename | Yes | ||
| check_tiling | No | Default: false. |