From Photo or AI Render to Game Sprite: A Browser-Only Cleanup Pipeline
Photos and AI renders aren't sprites yet: they have backgrounds, wrong sizes, fuzzy edges, and five different lighting setups. A five-step pipeline — cut out, resize, clean up, unify, pack — that turns arbitrary images into a consistent, engine-ready set.
Not every sprite starts life as pixel art. Sometimes the fastest path to a usable game asset is a photograph of a real object, a scanned pencil sketch, or an AI render that's 90% right. The problem is that none of those are sprites yet: they have backgrounds, they're the wrong size, their edges are fuzzy, and they don't match anything else in your project. This post walks the cleanup pipeline we use to turn arbitrary source images into consistent, engine-ready sprites — five steps, all in the browser, with nothing uploaded anywhere.
Why Raw Images Don't Read as Sprites
Drop a photographed prop straight into a game scene and it looks pasted-on. Three things give it away. First, the background: even a "clean" white background isn't transparency, and rough manual cutouts leave halos. Second, the scale and detail density: a 3000-pixel-wide image crushed to 128 pixels by the engine's renderer produces mushy, aliased results that no in-engine filter fixes. Third, consistency: a photo has lighting, perspective, and color temperature baked in, and five photos from five sources have five different versions of each. The pipeline below addresses these in order — and order matters, because each step works better on the output of the previous one.
Step 1: Start From the Best Source You Can
Detail survives downscaling; it cannot be invented by upscaling. Shoot or generate large, with the subject well-lit and clearly separated from its background — for photos, a plain contrasting backdrop; for AI renders, prompt for a plain or solid-color background explicitly, which makes the next step dramatically cleaner. If you're generating a set of sprites, generate them in one session with consistent style prompts, for the same reason you'd draw a set with one palette.
A note on AI renders specifically: check the license terms of whatever generator you use before shipping its output in a commercial game. Policies differ between services and change over time, and "it's transformed through my pipeline" is not a substitute for actually reading the terms.
Step 2: Remove the Background — Locally
The Background Remover runs a segmentation model in your browser: the model weights download to your machine and inference happens there, so the image itself is never uploaded. Feed it the full-resolution source and you get a transparent PNG of the subject. Two practical tips: run it before any downscaling, because the model has more edge information to work with at full resolution, and inspect the result at 200% zoom around hair, fur, and thin protrusions — those are where any segmentation model earns or loses its keep. Minor flaws are fine; you'll fix them in step 4 after the image is small.
Step 3: Scale to the Size Your Game Actually Renders
Decide the sprite's on-screen size in your game and resize the asset to that size — or exactly 2× it for high-DPI displays — rather than letting the engine scale a huge texture down every frame. For most 2D games that's somewhere between 64 and 256 pixels on the long edge. The Sprite Resizer batches this across a whole set, which is the point: a character, her three animation poses, and her props should all pass through the same settings so their pixel density matches. Mismatched density — one crisp sprite next to one soft one — is one of those things players can't name but always notice.
Step 4: Clean Up at Final Size
Now the flaws that matter are visible and fixable, pixel by pixel. Open the resized sprite in the Pixel Art Editor and do three passes. Edges: erase leftover halo pixels — semi-transparent fringe from the cutout that shows against dark scenes. Shapes: simplify details that turned to noise at small size; a belt buckle that became four gray pixels reads better as none. Palette: nudge colors toward your project's palette so the imported asset stops looking imported. This step is also where a photographic asset can be deliberately pushed toward pixel-art style — flatten shading into two or three tones and the photo origin disappears.
Step 5: Pack the Finished Set
Individual PNGs are fine for a prototype; for anything real, pack the finished sprites into a texture atlas with Images to Atlas. You get one texture, one draw call, and a metadata file with each sprite's coordinates for your engine. If some of your images are duplicates — the same prop reused across scenes — the packer detects and stores them once. For the engine-specific import steps, our texture atlas guide covers Unity, Godot, and Phaser in detail.
The Consistency Checklist
Before calling the set done, check it as a set, not as individual images: light direction roughly agrees across sprites; the palette doesn't jump temperature between assets; pixel density matches; and every sprite has the same treatment at its edges — either all crisp, or all softened, never mixed. Consistency is the difference between "assets from five sources" and "an art style." The individual tools are quick; the checklist is what makes the output look intentional.
Total cost of this pipeline: zero, and about ten minutes per asset once you've done it twice. Everything runs client-side in a browser tab — the same no-upload principle as the rest of our tools — which also means it works fine on the coffee-shop Wi-Fi where indie games are actually made.