-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Fix issue in PNG identify method to skip "uninteresting" chunks, incl… #2019
Fix issue in PNG identify method to skip "uninteresting" chunks, incl… #2019
Conversation
The call to SkipChunkDataAndCrc was in the wrong location to fix the problem. I've moved it to a location that should fix the problem. |
I moved the call to SkipChunkDataAndCrc back to the default switch clause based on how other chunks are handled in the switch statement. It's not wrapped in a check to see if the identification is for color metadata only, also based on other clauses. |
I have found an png with a sBit chunk: Would that reproduce the described issue in #2018? If so, it would be good to have a unit test covering this issue. See PngDecoderTests for an example howto do that. |
Unfortunately that image doesn't exhibit the problem. I'll see if I can put one together that can be used for testing. |
I'm actually happy to push this in without the offending image. As a performance optimization alone it's worth the addition. @flew2bits if you could supply an image at some point that would be really great. |
@JimBobSquarePants should we milestone this for 2.0.1, also? |
@brianpopow Yeah... Let's get it merged now. |
…uding sBIT.
Prerequisites
Description
Add a default clause in the PNG Identify method to skip over "uninteresting" chunks so that the data is properly read.
This fixes issue #2018