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