kornelski / pngquant

Lossy PNG compressor — pngquant command based on libimagequant library
https://pngquant.org
Other
5.25k stars 487 forks source link

Transparent pixels are not transparent anymore when using color blend... #344

Closed BiggerWoo closed 5 years ago

BiggerWoo commented 5 years ago

I compressed 0.png 0 original↑

0 compressed↑

and trying to do some color blend with it, it works fine with src blend factor is "src_alpha" 0 but when I change it into "src_color" 1 looks like transparent pixels are not transparent anymore. but wait! it still works fine with this 1 after compressed: 2

so what happend with 0.png?

pngquant -v: pngquant, 2.12.0 (January 2018), by Kornel Lesinski, Greg Roelofs. Color profiles are supported via Little CMS. Using libpng 1.6.35. and with options: --ext=.png --force --nofs --skip-if-larger --speed=1 --quality=65-80

by the way, if I remove option --nofs, the same problem occured with 1.png after compressed 3 and I done this in cocosCreator, but it's not cocosCreator's problem right? :)

kornelski commented 5 years ago

The images look fine outside of cocosCreator, so it is cocosCreator's problem. Please let them know they need to improve handling of PNG8 with tRNS chunk.

BiggerWoo commented 5 years ago

ok ,thanks~~