Prerequisites
ImageSharp version
v2.0.0
Other ImageSharp packages and versions
ImageSharp.Drawing v1.0.0beta14
Environment (Operating system, version and so on)
Windows 10, Rider
.NET Framework version
6.0.1
Description
When loading an image that contains an sBIT chunk, the Identify phase throws an exception stating that the data is invalid. The switch statement in the identify function (around line 250 of PngDecoderCore.cs) does not include the PngChunkType.SignificantBits as a case, nor does it have a default clause. Adding a default clause as follows fixes the issue:
default: this.SkipChunkDataAndCrc(chunk); break;
I may try to submit a PR if I can figure out how to do so.
Unfortunately, I don't have permission to upload the image that is causing this problem.
Steps to Reproduce
Image.Load(stream) from a stream that has a PNG with a sBIT chunk.
Images
No response