PNG Transparency and HTML5 Canvas Alpha Corruption

How premultiplied alpha inside HTML5 Canvas 2D silently alters semi-transparent RGB pixels and destroys A=0 data—and how KBLimit preserves straight-RGBA PNGs with 0 pixel diffs.

Diagram comparing KBLimit UPNG.js Web Worker straight-RGBA pipeline with 0 pixel diffs against HTML5 Canvas 2D premultiplied alpha corruption
Straight-RGBA binary decoding/encoding vs. HTML5 Canvas 2D premultiplied alpha round-trip.

Frequently Asked Questions

Why does HTML5 Canvas turn transparent pixels black (0,0,0,0)?

HTML5 Canvas 2D stores pixels in premultiplied alpha format (R×A/255). When alpha is 0, all three color channels multiply to 0, permanently erasing hidden RGB values needed by texture filters and compositors.

How does KBLimit avoid PNG alpha corruption?

KBLimit bypasses HTML5 Canvas 2D for lossless PNG optimization and raw PNG cropping, decoding and encoding straight-RGBA buffers directly in a dedicated UPNG.js Web Worker.

Related KBLimit Tools