|
|
@ -1,6 +1,7 @@ |
|
|
// Copyright (c) Six Labors.
|
|
|
// Copyright (c) Six Labors.
|
|
|
// Licensed under the Six Labors Split License.
|
|
|
// Licensed under the Six Labors Split License.
|
|
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
using System.IO; |
|
|
using System.IO; |
|
|
using SixLabors.ImageSharp.Formats; |
|
|
using SixLabors.ImageSharp.Formats; |
|
|
using SixLabors.ImageSharp.Formats.Bmp; |
|
|
using SixLabors.ImageSharp.Formats.Bmp; |
|
|
@ -350,6 +351,21 @@ namespace SixLabors.ImageSharp.Tests.Formats.Bmp |
|
|
Assert.Equal(expectedProfileBytes, actualProfileBytes); |
|
|
Assert.Equal(expectedProfileBytes, actualProfileBytes); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Theory] |
|
|
|
|
|
[InlineData(1, 66535)] |
|
|
|
|
|
[InlineData(66535, 1)] |
|
|
|
|
|
public void Encode_WorksWithSizeGreaterThen65k(int width, int height) |
|
|
|
|
|
{ |
|
|
|
|
|
Exception exception = Record.Exception(() => |
|
|
|
|
|
{ |
|
|
|
|
|
using Image image = new Image<Rgba32>(width, height); |
|
|
|
|
|
using var memStream = new MemoryStream(); |
|
|
|
|
|
image.Save(memStream, BmpEncoder); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
Assert.Null(exception); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
[WithFile(Car, PixelTypes.Rgba32, BmpBitsPerPixel.Pixel32)] |
|
|
[WithFile(Car, PixelTypes.Rgba32, BmpBitsPerPixel.Pixel32)] |
|
|
[WithFile(V5Header, PixelTypes.Rgba32, BmpBitsPerPixel.Pixel32)] |
|
|
[WithFile(V5Header, PixelTypes.Rgba32, BmpBitsPerPixel.Pixel32)] |
|
|
|