Why an Out-of-Bounds Canvas Sprite Crop Leaves Empty Pixels
Use a 32 by 16 test image to verify how an out-of-bounds source crop clips the destination proportionally.


A sprite export has the right canvas size but an unexpected transparent strip on the right. Canvas clips the destination proportionally when the source rectangle extends outside the source image. Use a solid-color fixture to locate the missing pixels.
Draw the same source into two fresh canvases
Make a 32 by 16 image with a red left half and a blue right half. Make two empty 32 by 16 canvases and turn smoothing off on both. In A, source rectangle (16, 0, 16, 16) maps to destination rectangle (0, 0, 32, 16). In B, change just the source width from 16 to 32. Half of the requested source width now lies beyond the image.
Read the output instead of judging the preview
A should be blue throughout. In B, blue should occupy the left half and the right half should remain transparent. Compare alpha at x=8 and x=24 with getImageData. If the right half is opaque, check whether the destination started empty or whether background paint was applied. Wrong colors call for a source-dimension and crop-coordinate check.
Decide whether the gap belongs in the asset
For fixed-size frames, deliberate padding can preserve alignment when you record the sprite origin. For edge-to-edge artwork, constrain the source rectangle first and choose how to scale the remaining valid pixels. Produce a representative source in the sprite cutter, then apply the boundary fixture to your own Canvas export.
Recommended tools

Automatic Sprite Slicing and ZIP Export: A Faster Way to Prepare 2D Game Assets
Learn how automatic sprite slicing and one-click ZIP export can help indie game developers turn character sheets, icon collections, and AI-generated 2D artwork into organized PNG assets faster.

From AI Sprite Cutter to Sprite Sheet Maker: A Complete 2D Asset Workflow
A practical workflow guide for turning raw 2D images into sliced PNG files, downloading them as a ZIP package, and using those files to create sprite sheets for Unity, Cocos, Godot, and custom game engines.

AI Sprite Cutter: How Indie Game Developers Can Split 2D Game Assets Faster
A practical guide for indie game developers, 2D artists, and prototype teams. Learn how an AI sprite cutter can split character sheets, UI icons, white-background assets, and AI-generated artwork into clean PNG files for Unity, Cocos, Godot, and sprite sheet workflows.
Ready to try "Why an Out-of-Bounds Canvas Sprite Crop Leaves Empty Pixels"?
Use our online tools to apply this tutorial to your indie game project right away.
