Inspect a transparent sprite before exporting

One original 16 × 16 character demonstrates two different problems: colors already mixed into partial-alpha edge pixels, and lossy JPEG export. Every image operation runs locally in this page.

Preparing the fixed original fixtures…

Compare edge colors on black and white

All six previews use nearest-neighbor 8× enlargement. Only the partial-alpha RGB differs. The same alpha is retained in every variant.

Clean / black
White matte / black
Dark matte / black
Clean / white
White matte / white
Dark matte / white

A separate mechanism: resampling

These previews use the same clean source over black. Compare the crisp 8× replication with smoothing enabled. Turning smoothing off does not remove a matte color already present in a source pixel.

Nearest: smoothing off
Smoothing on, quality low

Source PNGs: clean, white matte, dark matte.

Export the same pixels as PNG and JPEG

The transparent export is PNG. For a fair comparison of codec loss, both opaque reference PNG and JPEG use the same explicit white matte. JPEG quality is requested as 0.92; this is a browser setting, not a universal quality scale.

Transparent PNG export
Transparent PNG
Download PNG
White matte reference PNG export
White reference PNG
Download PNG
JPEG export on white matte
JPEG, quality 0.92
Download JPEG
JPEG decoded then saved as PNG
JPEG → PNG
Download PNG

Measured in this browser

Waiting for export…

Read README.md for concrete diagnosis/export steps, reproduction, sources and color/alpha limitations. Artwork and this example are CC0; see LICENSE.txt.