DEBUG and RELEASE modeTrying to open a specific bitmap file created with Magick.NET fails with an exception. Other files created in the same way don't.
Selecting ImageMagick.MagickFormat.Bmp2 or ImageMagick.MagickFormat.Bmp3 resolves the issue. The issue is with ImageMagick.MagickFormat.Bmp specifically, which uses, according to the docs, version 4 of the format.
The image in question _does_ open without issues in other Windows programs (Paint, Photos, Photoshop) and Dropbox.
Download the file.
Try to open it:
using (var image = Image.Load("bitmap.bmp"))
{}
generates
Exception has occurred: CLR/System.NotSupportedException
An unhandled exception of type 'System.NotSupportedException' occurred in SixLabors.ImageSharp.dll: 'Does not support this kind of bitmap files.'
at SixLabors.ImageSharp.Formats.Bmp.BmpDecoderCore.Decode[TPixel](Stream stream)
at SixLabors.ImageSharp.Image.Decode[TPixel](Stream stream, Configuration config)
at SixLabors.ImageSharp.Image.WithSeekableStream[T](Configuration config, Stream stream, Func`2 action)
at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, Stream stream, IImageFormat& format)
at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, String path)
@wc-matteo
Yeah, bitmap support covers the more common types so far. @dlemstra Is there code we can use as inspiration from ImageMagick?
I think we should be able to add support for this. And the file coders/bmp.c could give some insight on how this is done in ImageMagick.
That's good news! 馃帀
If we update the support listed in #320 we can fix this
@wc-matteo: would you mind sharing the image here again? The drop box link does not work anymore. Just attaching it to this ticket would be helpful to reproduce it.
@brianpopow fixed the link. Don't know what happened there.
Most helpful comment
@brianpopow fixed the link. Don't know what happened there.