Browse Source

Handle Bmp encoder padding.

pull/1409/head
James Jackson-South 5 years ago
parent
commit
1ad9fcdad6
  1. 4
      src/ImageSharp/Common/Helpers/SimdUtils.Shuffle.cs
  2. 2
      tests/ImageSharp.Tests/Common/SimdUtilsTests.cs

4
src/ImageSharp/Common/Helpers/SimdUtils.Shuffle.cs

@ -225,9 +225,9 @@ namespace SixLabors.ImageSharp
"Output span must be divisable by 3!");
DebugGuard.IsTrue(
source.Length == dest.Length * 4 / 3,
dest.Length >= source.Length * 3 / 4,
nameof(source),
"Output span must be 3/4 the length of the input span!");
"Output span must be at least 3/4 the length of the input span!");
}
public static class Shuffle

2
tests/ImageSharp.Tests/Common/SimdUtilsTests.cs

@ -164,8 +164,6 @@ namespace SixLabors.ImageSharp.Tests.Common
public static readonly TheoryData<int> ArraySizesDivisibleBy8 = new TheoryData<int> { 0, 8, 16, 1024 };
public static readonly TheoryData<int> ArraySizesDivisibleBy4 = new TheoryData<int> { 0, 4, 8, 28, 1020 };
public static readonly TheoryData<int> ArraySizesDivisibleBy3 = new TheoryData<int> { 0, 3, 9, 36, 957 };
public static readonly TheoryData<int> ArraySizesDivisibleBy32 = new TheoryData<int> { 0, 32, 512 };
public static readonly TheoryData<int> ArbitraryArraySizes =

Loading…
Cancel
Save