Three numbers, not one
People describe a sprite sheet as "sixteen 32-pixel frames" and then find that frame nine is cut in half. The reason is almost always that the sheet has a margin, a spacing, or both. A cell in the grid starts at margin plus column index times frame width plus spacing, and if you assume the margin and spacing are zero when they are two, the error accumulates one gap at a time until the last column is missing a quarter of itself.
The two ways of describing the grid here are not equivalent, and that is deliberate. Columns and rows divides the usable area up and reports what did not fit, which suits a sheet you did not make. Frame width and height fits as many whole cells as it can, which suits a sheet you exported yourself and know the frame size of. If the two disagree, the sheet has spacing you have not accounted for.
Reading the leftover figure
The leftover pixels on the right and at the bottom are the diagnostic worth watching. Zero and zero means the grid describes the sheet exactly. One or two pixels is normal on hand-drawn artwork and on sheets exported by packers that round up. Anything larger, and one of three things is true: the column or row count is wrong, there is spacing between the cells that has not been entered, or the sheet has a border you are treating as part of the first frame.
Work it backwards when you are not sure. If the sheet is 168 pixels wide and you believe there are five columns of 32, then five frames account for 160, leaving 8 pixels across four gaps — so the spacing is 2 and the margin is 0. That arithmetic is faster than nudging numbers until the preview looks right.
Frames are cut, never scaled
Every frame is copied out at its source pixel size with image smoothing turned off, so pixel art comes through with hard edges rather than the soft mush a scaled draw would produce. The previews above are shrunk by CSS to fit the strip; the files you download are full size. Nothing is resampled at any point, which also means a frame cannot be larger than the region it came from.
Fully transparent cells are skipped by default, because a packed sheet routinely has empty tail cells in the last row. That check reads the alpha channel of each cut frame, so it does nothing for a JPEG output, where transparency has already been flattened to white.
Where this stops
- Uniform grids only. Sheets packed by an atlas tool with variable frame sizes and a JSON or XML map need that map, and this does not read one.
- 256 frames maximum. Each frame is a canvas plus a data URL held in memory, and a browser tab gives out well before a desktop tool would.
- One file at a time, and one grid per file. A sheet with two different frame sizes stacked in it has to be cropped apart first.
- No trimming of the transparent border inside a frame, and no pivot or hotspot detection.
Related pages
To cut a single region out rather than a grid, the ratio crop is the right tool, and image resizer changes frame dimensions after the fact. Going the other way — several separate images into one sheet — is what image collage does. If you need the frame ratio to match a target, aspect ratio calculator does that arithmetic, and image to base64 turns a single frame into something you can paste into a stylesheet.
Questions people ask
How do I work out the frame size if I do not know it?
Divide the sheet width by the number of columns you can count, and do the same for the height and rows. If both come out as whole numbers, the sheet has no margin or spacing and you are done. If they do not, the remainder is your clue: sheet width minus columns times frame width, divided by the number of gaps, gives the spacing. Entering the column and row counts here does that division for you and reports what was left over.
Why are some frames blank?
Packed sheets are usually a rectangle even when the animation does not fill one, so the last row often ends in empty cells. Those are skipped by default. If frames you expected to contain artwork come out blank, the grid is misaligned rather than the sheet being empty — check the leftover pixel figures and the margin.
Can I download all of them at once?
Not as a single archive, no. Each frame has its own button. Browsers deliberately throttle a page saving many files in a row and will ask for permission after the first two or three, so a sheet of sixty frames is tedious by design. For a batch that size, a command line tool that crops with a loop is the better instrument.
Does slicing lose quality?
The pixels are copied straight across with no scaling, so the frame is exactly the region it came from. What can change is the encode: choosing JPEG re-compresses each frame and flattens transparency, and WebP re-compresses as well. PNG is lossless, which is why it is the default and why sprite work stays in it.
What about a sheet with an atlas file?
This cannot use one. An atlas describes each frame by name and position, often with rotation and trimming applied, and none of that can be inferred from the image alone. If you have the atlas, the tool that produced it will cut the sheet correctly. This is for the common case where you have a picture of a grid and nothing else.