Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to decode this image? #2

Closed
perlix opened this issue Oct 26, 2021 · 2 comments
Closed

How to decode this image? #2

perlix opened this issue Oct 26, 2021 · 2 comments

Comments

@perlix
Copy link

perlix commented Oct 26, 2021

Thanks for this well documented library! Works great, also for transparent images.

However, there's a certain type of png files that I didn't manage to decode properly so far.
For example: https://tiles.wmflabs.org/hillshading/10/526/340.png

Looks like it's being rendered as fully transparent, although hasAlpha() returns 0.
The library further reports: image specs: (256 x 256), 8 bpp, pixel type: 3;

I should add that the image from the above link is strange anyway, as it looks OK in web browsers and in Microsoft applications (e.g MS Paint), but not in tools like Gimp or Irfanview. Wonder if there's a way to decode it properly with PNGdec?

@perlix
Copy link
Author

perlix commented Oct 26, 2021

Guess I found it. Looks like there's so little contrast in the image that every pixel becomes white in RGB565.

@perlix perlix closed this as completed Oct 26, 2021
@bitbank2
Copy link
Owner

Thank you for sharing your experiences with PNGdec - I'm glad it mostly works for your needs.
That makes sense - on a good monitor I could barely see any variations in the pixels when rendered as RGB888.

@Cvjark Cvjark mentioned this issue Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants