From 6345da1acc2c37320be9a7e15347d4ff57c4cd8a Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 12 Oct 2017 08:08:27 +1100 Subject: [PATCH] Fix #369 and update test --- src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs | 2 +- tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {