The usual question about premultiplied alpha is which convention to pick. Mine is narrower: where do you put the check that tells you the convention you assumed is still the one being applied? I came at it from a small run on one cutout PNG, and the short answer is the resize call, not the stored images.
The input is a portrait photo from Wikimedia Commons (Dmitry Makeev, CC BY-SA 4.0), resized to 1330×2000. I ran it through the AI background removal in ImgIng, a browser tool at https://imging.ai/ , and exported a PNG. My part of that product is in-browser decoding and model loading, so this is about what I measured after the export. All portrait numbers are one image, one machine (Apple M4), one run, Chromium 149 and sharp 0.35.5.
Three libraries, three answers to the same resize
I shrank the cutout 4× and scaled it back up, then compared each result to two references written in numpy: one that scales R, G, B and A separately, and one that premultiplies first.…