kornelski / pngquant

Lossy PNG compressor — pngquant command based on libimagequant library

Home Page:https://pngquant.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why RGB values on transparent pixels is (71,112,76)

shanegxxiao opened this issue · comments

After compare several pairs images processed by pngquant, it seems pixel with rgba = (0, 0, 0, 0) was modified to (71, 112, 76, 0), How is it happen? It makes premultiply alpha works failed.

No, it's not a failure. When alpha=0 these values have no meaning. They're visible only in software that incorrectly drops the alpha channel, and in that case they're useful for diagnosing the error.

Thanks first, and sorry for the late reply. Is it possiable to keep the original RGB values event alpha is zero in the images processed by pngquant?

I've intentionally made it completely impossible. Indexed 8 bit color can't afford it, so RGB of transparent colors is the first thing pngquant completely clears.