bitbank2 / PNGdec

Arduino PNG image decoder library
Apache License 2.0
162 stars 25 forks source link

No background mix getLineAsRGB565 when PNG_PIXEL_INDEXED and PNG_PIXEL_GRAYSCALE #6

Open spectrenoir06 opened 2 years ago

spectrenoir06 commented 2 years ago

The lib read correctly the tRNS block and store the alpha pPalette[768] But doesn't use it in getLineAsRGB565 ( only PNG_PIXEL_TRUECOLOR_ALPHA work )

spectrenoir06 commented 2 years ago

I made a dirty fix for my specific use case https://github.com/spectrenoir06/PNGdec

spectrenoir06 commented 2 years ago

example: https://static-cdn.jtvnw.net/emoticons/v2/1/default/dark/2.0

bitbank2 commented 2 years ago

working on a fix for 8-bit

bitbank2 commented 2 years ago

I added a fix for 8-bit palette images. Please give it a try:

https://github.com/bitbank2/PNGdec/commit/8abf6be9f75c42e6ad1679309812dd48b188c039