-
Notifications
You must be signed in to change notification settings - Fork 1
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
Some color types aren't correct #1
Comments
Yes - lodepng has numerous optimizations that can change colortypes/etc. Sorry about that. I updated the README. I want to fix this, but I'll have to see if lodepng supports disabling all its optimizations. (Or find or write another writer.) It's really clear that we do need a robust list of random PNG's for testing/fuzzing. I couldn't find any on the net so I uploaded this repo. |
Found this in lodepng: unsigned auto_convert; /automatically choose output PNG color type. Default: true/ I'm working on improving this. Thanks again for pointing this out! |
I've pushed up a new set of images, this time as a .7z file which is more manageable. What I plan on doing is putting up the little C++ program that uses lodepng to generate them. It's difficult to figuring out exactly how to feed lodepng's encoder in just the right way to generate this data. |
Sounds good, thanks 🙂 |
FWIW I mostly use windows so 7z is a bit of a pain (would need to install 7zip on all my Windows machines and include node bindings to it), using zip or putting the images in a folder would be easier. |
Just trying this out, you might not be aware that some of the file names aren't actually correct. I'm guessing the method used to encode with lodepng made some optimizations or something? Decoding
rand_9_7_8_3_0_1_0.png
for example which is meant to use indexed color type (3), it's actually truecolor and alpha (6). I've also notice bit depth isn't necessarily kept the same.It's probably worth clarifying this in the readme if it's by design so people don't bother trying to test properties that could be optimized away. My tool (Luna Paint) has an upcoming feature to inspect the files which is why it would be beneficial to test props like this, but it doesn't matter so much as I already have plenty of coverage from other suites.
See details output by my tool below which calls out the color type and lack of PLTE/tRNS chunks.
rand_9_7_8_3_0_1_0.png
Details
Metadata
No recognized metadata
Raw chunks
The text was updated successfully, but these errors were encountered: