DEBUG and RELEASE mode
I try to load PNG image that displays normally. It also loads normally with .NET Framework's System.Drawing.Image.FromFile().
There was similar issue that has been closed: #127
Simple code:
Image.Load("banner.png");
With image banner.zip cause an ImageSharp.ImageFormatException with stacktrace:
at ImageSharp.Formats.PngDecoderCore.ReadChunkCrc(PngChunk chunk)
at ImageSharp.Formats.PngDecoderCore.ReadChunk()
at ImageSharp.Formats.PngDecoderCore.Decode[TPixel](Stream stream)
at ImageSharp.Image.Decode[TPixel](Stream stream, Configuration config)
at ImageSharp.Image.WithSeekableStream[T](Stream stream, Func`2 action)
at ImageSharp.Image.Load[TPixel](Configuration config, Stream stream, IImageFormat& format)
at ImageSharp.Image.Load[TPixel](Configuration config, String path)
at ImageSharp.Image.Load(String path)
at ImageSharpTest.Program.Main(String[] args) in c:\users\user
\documents\visual studio 2017\Projects\ImageSharpTest\Program.cs:line 12
dotnet --info output:.NET Command Line Tools (1.0.4)
Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e6684fd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.4
Just did a quick test to see if the image was actually corrupt. ImageMagick can read it without any issues and ImageMagick normally is very strict about errors inside an image. Means this is most likely an issue inside the decoder.
Any updates on this?
None yet I'm afraid, we've not had the opportunity (sickness, time constraints etc). You'll see something here as soon as we do.
Hi guys, got the same issue. Here's another image that fails. TweakPng has no issues reading the file as well as System.Drawing.
Hope it helps.
Thanks. Yeah images that break our decoder are always useful. I'll get stuck in asap. Stuck doing stuff for my day job just now.
I've checked everything and the new fix works. Enjoy!
Most helpful comment
Hi guys, got the same issue. Here's another image that fails. TweakPng has no issues reading the file as well as System.Drawing.
zincartabstract_smallbar.zip
Hope it helps.