Sprite Sheet Size vs Frame Size
Sprite size describes one cell or visible subject; sprite sheet size describes the complete texture. A 64 by 64 frame does not imply a 64-pixel sheet. Eight columns and four rows of 64-pixel cells produce 512 by 256 pixels before spacing or padding. Confusing these two measurements is the most common reason an importer cuts the wrong rectangles.
For equal cells, width equals two times outer padding plus columns times frame width plus one fewer horizontal gap than columns. Height uses the same formula with rows, frame height, and vertical gaps. A four-column sheet has three internal horizontal gaps, not four. The outer margin belongs to padding and is counted on both sides.
Example: sixteen 128 by 128 frames in a 4×4 grid, with two pixels of spacing and eight pixels of padding. Width is 16 + 512 + 6, or 534. Height is also 534. The useful sprite sheet dimensions are therefore 534 by 534, even though neither value is a traditional power of two.
Use actual cell dimensions rather than visible character bounds. A 70-pixel-tall character can live in a 96-pixel-high cell to preserve a baseline and room for movement. Cropping every pose to its visible pixels changes origins and produces an unstable animation unless separate alignment metadata is stored.
