Browse Source

Fix #369 and update test

af/merge-core
James Jackson-South 9 years ago
parent
commit
6345da1acc
  1. 2
      src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs
  2. 2
      tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs

2
src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs

@ -247,7 +247,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
var color = default(TPixel); var color = default(TPixel);
var rgba = default(Rgba32); var rgba = new Rgba32(0, 0, 0, 255);
using (var buffer = Buffer2D<byte>.CreateClean(width, height)) using (var buffer = Buffer2D<byte>.CreateClean(width, height))
{ {

2
tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Tests
public class BmpDecoderTests : FileTestBase public class BmpDecoderTests : FileTestBase
{ {
[Theory] [Theory]
[WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgb24)] [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgba32)]
public void DecodeBmp<TPixel>(TestImageProvider<TPixel> provider) public void DecodeBmp<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {

Loading…
Cancel
Save