Skip to content

Commit 1ad9fcd

Browse files
Handle Bmp encoder padding.
1 parent 11cc6af commit 1ad9fcd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ private static void VerifyShuffle4Slice3SpanInput(ReadOnlySpan<byte> source, Spa
225225
"Output span must be divisable by 3!");
226226

227227
DebugGuard.IsTrue(
228-
source.Length == dest.Length * 4 / 3,
228+
dest.Length >= source.Length * 3 / 4,
229229
nameof(source),
230-
"Output span must be 3/4 the length of the input span!");
230+
"Output span must be at least 3/4 the length of the input span!");
231231
}
232232

233233
public static class Shuffle

tests/ImageSharp.Tests/Common/SimdUtilsTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ public void BasicIntrinsics256_BulkConvertNormalizedFloatToByte_WithNonRoundedDa
164164
public static readonly TheoryData<int> ArraySizesDivisibleBy8 = new TheoryData<int> { 0, 8, 16, 1024 };
165165
public static readonly TheoryData<int> ArraySizesDivisibleBy4 = new TheoryData<int> { 0, 4, 8, 28, 1020 };
166166
public static readonly TheoryData<int> ArraySizesDivisibleBy3 = new TheoryData<int> { 0, 3, 9, 36, 957 };
167-
168-
169167
public static readonly TheoryData<int> ArraySizesDivisibleBy32 = new TheoryData<int> { 0, 32, 512 };
170168

171169
public static readonly TheoryData<int> ArbitraryArraySizes =

0 commit comments

Comments
 (0)