A Stray Alpha Pixel Can Make Your Sprite Trim Too Large
Use a two-image PNG fixture to isolate the speck that expands an otherwise transparent sprite’s atlas bounds.


A cutout can look clean while occupying a surprisingly large atlas rectangle. A packer that trims to nonzero alpha can include a faint pixel far from the artwork. A small fixture makes it easier to distinguish a stray pixel from padding or disabled trimming.
Check what your packer considers visible
On a 128×128 transparent image, paint an opaque 40×40 square with room around it. Add a faint pixel well away from the square. Export two PNGs, leaving the pixel in only one, and pack both with identical settings. If only the first rectangle grows, inspect its alpha channel and the reported crop. If both rectangles are the same, check whether trimming is enabled or whether a threshold already excludes the pixel.
Keep the edges you intended to ship
- Inspect the isolated region in a working copy. Identify sparks or glows that actually belong to the asset before removing any pixels.
- Erase the unwanted fleck locally and compare the new crop dimensions. Composite over both light and dark backgrounds to inspect the preserved edge.
- Check the anchor and original-size information in the receiving project. Step through adjacent frames if each one trims to a different rectangle.
Test an asset with real soft edges before applying the cleanup broadly. A global threshold change can remove details that the game needs.
Prepare a sample with the Tooliva tool and run the comparison in your target environment.
Ready to try "A Stray Alpha Pixel Can Make Your Sprite Trim Too Large"?
Use our online tools to apply this tutorial to your indie game project right away.
