Import & export

Import a Sprite Sheet with Margins and Spacing

Split a regular sprite sheet into frames without cutting off pixels or pulling invisible gaps into the wrong cells.

Measure the cell, the starting point, and the gap

Suppose you receive a 36 × 36 PNG with four 16 × 16 cells. The first cell starts two pixels in from the top and left. There is one pixel of spacing between cells in each direction. The frame size is the full box for one pose, including transparent space inside that box. It is not the size of the character's visible outline.

Keep the margin and spacing separate when you write down the numbers. The margin before the first cell sets where the grid starts. The spacing tells SpriteOpal how far to skip between neighboring cells. In this example, the second cell starts at x = 19, not at x = 18, because the one-pixel gap comes after the first 16-pixel cell.

Enter the values and read the preview

Choose File → Import sprite sheet... and open the PNG. Set Frame width and Frame height to 16, Origin X and Origin Y to 2, and both spacing values to 1. Start with Traversal set to Rows and leave Include partial cells off. The preview should show four boxes that surround the four poses without crossing the gaps.

Sprite sheet import dialog with 16 by 16 frames, a two-pixel origin, one-pixel spacing, and four outlined cells
Four complete cells fit inside the sheet. The outline of each cell marks the rectangle that becomes a frame.

Diagnose the kind of misalignment you see

If every box is shifted by the same amount, adjust the origin. If the first box looks right but each later box drifts a little farther away, check the frame dimensions and spacing. If all boxes line up but the animation reads in the wrong order, change Traversal to Columns when the poses run down the sheet first. Do not change the geometry to fix playback order.

Enable Include partial cells only if the sheet really contains an intended frame that is cut off at the right or bottom edge. SpriteOpal pads the missing area with transparency; the option cannot recover pixels outside the source image.

If the original character seems to jump between frames even though the boxes line up, compare the drawings inside the cells. A foot may sit higher in one source pose than in the next. Changing the origin shifts every crop equally and will not fix that difference. Import the correctly aligned cells first, then use onion skin to see which pose needs a local adjustment.

Verify the imported frames before saving

Choose Import frames, then step through the new artwork in the timeline. Check the first and last poses, confirm that the expected number of frames arrived, and look for pixels from neighboring cells. Use frame durations to set timing that the PNG cannot provide. If the source uses irregular rectangles from a packed atlas, ask for a regular grid sheet or use an importer that can read its metadata rather than forcing a fixed grid onto it.