Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Image.decoder offsets colors with an indexed png input #12

Open
Bastes opened this issue Jun 1, 2020 · 0 comments
Open

Image.decoder offsets colors with an indexed png input #12

Bastes opened this issue Jun 1, 2020 · 0 comments

Comments

@Bastes
Copy link

Bastes commented Jun 1, 2020

Hi,

Tinkering with this (awsome) lib, I encountered an issue decoding attached file.
Apple

Since I don't know much about the png encoding format I fumbled around the file, and saved it with rgb colors instead of indexed and tadaaaa! this one works:
Apple-rgb

So I guess there might be cases where the indexed colors don't work for some reason.

Testing some more, I tried to shift all pixels 8 bits on the left (adding 0xFF for opacity) and got the right colors (except for transparent pixels that were black, unsurprisingly).

So, here's the best I can tell you about this for now. I hope it helps. Since indexed colors files are smaller, I guess this might be a bigger deal for optimization purposes, fortunately it's not for what I mean to do at the moment ; since image formats are not my forte, I guess that's all I can do to help for now, but I'll be sure to return with more when I've dug in a bit futher.

Have fun, thanks for the lib :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant