You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImageSharp "Does not support this kind of bitmap files" #735
I have verified that I am running the latest version of ImageSharp
I have verified if the problem exist in both DEBUG and RELEASE mode
I have searched open and closed issues to ensure it has not already been reported
Description
Trying 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.
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)
System Configuration
ImageSharp version: 1.0.0-beta0005
Environment (Operating system, version and so on): Windows 10 x64 1803
@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.
Activity
JimBobSquarePants commentedon Oct 11, 2018
@wc-matteo
Yeah, bitmap support covers the more common types so far. @dlemstra Is there code we can use as inspiration from ImageMagick?
dlemstra commentedon Oct 12, 2018
I think we should be able to add support for this. And the file
coders/bmp.ccould give some insight on how this is done in ImageMagick.JimBobSquarePants commentedon Oct 12, 2018
That's good news! 🎉
JimBobSquarePants commentedon Nov 23, 2018
If we update the support listed in #320 we can fix this
brianpopow commentedon Dec 15, 2018
@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.
wc-matteo commentedon Dec 17, 2018
@brianpopow fixed the link. Don't know what happened there.
added test image for issue SixLabors#735
Decoding Bitmaps with BITFIELDS masks (#796)
Decoding Bitmaps with BITFIELDS masks (SixLabors#796)