Spritesheet slicing
Cut a spritesheet into individual frames, then build and export animations
Overview
A spritesheet packs many frames into one image. AssetHoard slices that image back into its individual sprites so you can browse them, group them into animations, and export them, without opening a separate tool.
There are two ways to slice. Grid mode walks a fixed cell size across the sheet and suits anything laid out on an even grid. Auto mode looks at the pixels themselves and finds each sprite for you, which is what you want for trimmed or irregularly-packed sheets. You can switch between them freely and watch the boxes update.
Slicing is non-destructive. It is saved as metadata on the asset, so your original file on disk is never changed. You can re-slice or clear it whenever you like.
Opening the slicer
Select a spritesheet image in your library to open its preview, then:
- Flip the preview toggle from Image to Spritesheet.
- The slicer opens with the Grid and Auto toggle top right.
- Adjust the settings until every frame is boxed, then save.
Grid mode
Grid mode is the uniform slicer. Starting from the top-left, it places a cell, steps across by the cell size plus any spacing, and stops before it runs off the sheet. Frames come back in row-major order. Reach for this when your sheet is a clean, evenly-spaced grid.
| Option | Default | What it does |
|---|---|---|
| Cell Width | required | Width of each cell in pixels. |
| Cell Height | required | Height of each cell in pixels. |
| Margin | 0 | A blank border trimmed off all four edges before slicing. The grid starts this many pixels in from the top-left and stops the same distance short of the right and bottom. |
| Spacing | 0 | The gutter between adjacent cells. Set this for sheets with gaps between frames. |
| Offset X | 0 | An extra horizontal shift of the whole grid, added on top of the margin. |
| Offset Y | 0 | An extra vertical shift of the whole grid, added on top of the margin. |
| Skip empty | on | Drops cells that are entirely transparent. Trailing empty cells on a partly-filled last row are common, so this is on by default. |
Margin versus offset. Margin is symmetric, it pulls in from every edge. Offset X and Y only move where the grid begins, pushing content towards the bottom-right without reserving space at the far edges. Use margin for a border around the whole sheet, and offset to nudge a grid that starts a few pixels off.
About skip empty. It tests transparency only. A fully-opaque sheet with no transparency never has empty cells, so nothing is skipped.
Auto mode
Auto mode reads the sheet instead of assuming a grid. It builds a mask of the foreground pixels, groups the connected ones into blobs, and returns one box per blob. Frames are sorted into reading order, left to right and top to bottom, so a row reads correctly even when the sprite tops do not line up.
| Option | Default | What it does |
|---|---|---|
| Alpha | 8 | How solid a pixel must be to count as part of a sprite. A pixel counts when its alpha is above this value, on a 0 to 255 scale. Raise it to ignore faint anti-aliased edges, lower it to catch nearly-transparent pixels. |
| Dilate | 1 | Grows the mask outward by this many pixels before grouping. Bridges small gaps inside a single sprite so it is not split into pieces. Set 0 to disable. Large values risk fusing neighbouring sprites together. |
| Min area | 9 | Discards any detected box smaller than this area in pixels. Filters out specks and stray pixels. |
| Merge | on | Collapses overlapping boxes into one, repeatedly, until none overlap. Useful when dilation or the separate parts of one sprite produce overlapping boxes. |
Transparent versus opaque sheets. If the sheet has any transparency, Auto keys on the alpha channel using the Alpha setting above. If the sheet is fully opaque, it instead keys on the most common corner colour, treating that as the background, and the Alpha setting is ignored.
Tuning tips. If one sprite is coming out as two boxes, raise Dilate a little. If separate sprites are fusing together, lower it. If stray dots are being picked up as frames, raise Min area.
Building sprite sets
Once a sheet is sliced, every frame lands in a default All Frames set. From there you build your own named sets, one per animation, by picking the frames that belong to it in playback order.
To create a set:
- Click New under Sprite sets.
- Give the set a name, for example walk or attack.
- Click frames on the sheet in the order they should play. Each pick is numbered as you go.
- Alt-click or right-click a frame to remove it. Alt-drag removes a run. Space or middle-drag pans the sheet.
- Turn on Animated and set the FPS to preview the set as a moving loop, then Save.
Need to change the slicing after making sets? Click Edit slicing to reopen the Grid and Auto controls.
Does re-slicing reset my sprite sets? Not while you are adjusting. Switching between Grid and Auto, or changing any slice setting, only updates the live preview. Your saved sprite sets stay put until you save. Saving a new slicing rewrites the frames, so at that point it clears every sprite set on the sheet. If any sets exist, AssetHoard warns you first with a Save and reset prompt, so you can cancel and keep them. Either way, nothing on disk changes.
Exporting
A sprite set can be exported three ways, so it fits whatever your engine or workflow expects:
- Looping GIF. A single animated GIF at the set's frame rate.
- Packed spritesheet. A packed PNG with an optional atlas JSON describing each frame.
- Per-frame PNGs. The raw frames as individual PNG files.
Exports are copies. Your original sheet stays exactly as it was, and a notification links straight to the new file so you can open its folder.
Good to know
- Before you save, trying both modes is free. Switch between Grid and Auto and adjust settings as much as you like to see which reads your sheet better, since it only redraws the preview. Committing a different slicing means saving, which resets sprite sets once you have built any.
- The slicer shows a running count of frames, so you always know how many sprites you are about to save.
- Auto adds a pixel or two around each sprite when Dilate is on, so a dilated box is slightly larger than the visible pixels.
- Slicing lives with the asset, so it travels with the sheet in your library and is there next time you open it.