lvandeve / lodepng

PNG encoder and decoder in C and C++.
zlib License
2.03k stars 420 forks source link

Deocing PNG with 1 bit alpha is not supported #157

Open CedricGuillemet opened 2 years ago

CedricGuillemet commented 2 years ago

PNGs with 1 bit alpha are not properly loaded. They are considered RGB image and not alpha is provided. Take for example this image : https://playground.babylonjs.com/textures/pack1.png

lvandeve commented 2 years ago

It seems to work for me, it's an image with a color key (set to black), and when decoding to RGBA, it sets the alpha channel to 0 for those pixels in my case.

Which color format do you decode the image to, and do other images with alpha work, only this one giving issues?