Premultiplied Alpha Resizing Affects Edge Colour in Cut-Out Thumbnails, Tests Show
A developer testing a thumbnail pipeline that shrinks cut-out PNGs asked whether premultiplying RGB by alpha before resizing matters. Using two AI cut-outs from Wikimedia Commons photos, a portrait and a white dog, they shrank and re-enlarged each image with and without premultiplication. Alpha values were identical either way, so the softer edge comes from interpolation shared by both methods, while the RGB beneath the edge is what changes. The portrait showed substantial edge colour error, with pale fringing, whereas the dog showed much smaller differences, because the colours hidden under its transparent edge differed. The author notes that two images cannot establish how typical files behave, and that other scalers and browser APIs produced varying results.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in