Skip to content

Commit 0a52ee7

Browse files
committed
Try fix build issue with ubuntu latest and net9.0
1 parent 5cfa2bc commit 0a52ee7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/ImageSharp.Tests/Formats/WebP/WebpCommonUtilsTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private static void RunCheckNoneOpaqueWithNoneOpaquePixelsTest()
106106
174, 183, 189, 255,
107107
148, 158, 158, 255,
108108
};
109-
Span<Bgra32> row = MemoryMarshal.Cast<byte, Bgra32>(rowBytes);
109+
Span<Bgra32> row = MemoryMarshal.Cast<byte, Bgra32>((Span<byte>)rowBytes);
110110

111111
bool noneOpaque;
112112
for (int length = 8; length < row.Length; length += 8)
@@ -188,7 +188,7 @@ private static void RunCheckNoneOpaqueWithOpaquePixelsTest()
188188
174, 183, 189, 255,
189189
148, 158, 158, 255,
190190
};
191-
Span<Bgra32> row = MemoryMarshal.Cast<byte, Bgra32>(rowBytes);
191+
Span<Bgra32> row = MemoryMarshal.Cast<byte, Bgra32>((Span<byte>)rowBytes);
192192

193193
bool noneOpaque;
194194
for (int length = 8; length < row.Length; length += 8)

tests/ImageSharp.Tests/Image/ImageFrameTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void CopyPixelDataTo_Success(bool disco, bool byteSpan)
112112
}
113113

114114
byte[] expected = TestUtils.FillImageWithRandomBytes(image);
115-
byte[] actual = new byte[expected.Length];
115+
Span<byte> actual = new byte[expected.Length];
116116
if (byteSpan)
117117
{
118118
image.Frames.RootFrame.CopyPixelDataTo(actual);

tests/ImageSharp.Tests/Image/ImageTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public void CopyPixelDataTo_Success(bool disco, bool byteSpan)
190190
}
191191

192192
byte[] expected = TestUtils.FillImageWithRandomBytes(image);
193-
byte[] actual = new byte[expected.Length];
193+
Span<byte> actual = new byte[expected.Length];
194194
if (byteSpan)
195195
{
196196
image.CopyPixelDataTo(actual);

0 commit comments

Comments
 (0)