diff --git a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs index db9e90adf..e962d6df6 100644 --- a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs +++ b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs @@ -247,7 +247,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp where TPixel : struct, IPixel { var color = default(TPixel); - var rgba = default(Rgba32); + var rgba = new Rgba32(0, 0, 0, 255); using (var buffer = Buffer2D.CreateClean(width, height)) { diff --git a/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs index 8a50b760e..8f4b05108 100644 --- a/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs @@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Tests public class BmpDecoderTests : FileTestBase { [Theory] - [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgb24)] + [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgba32)] public void DecodeBmp(TestImageProvider provider) where TPixel : struct, IPixel {