Browse Source

Try fix build issue with ubuntu latest and net9.0

pull/2878/head
Brian Popow 1 year ago
parent
commit
0a52ee7514
  1. 4
      tests/ImageSharp.Tests/Formats/WebP/WebpCommonUtilsTests.cs
  2. 2
      tests/ImageSharp.Tests/Image/ImageFrameTests.cs
  3. 2
      tests/ImageSharp.Tests/Image/ImageTests.cs

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

@ -106,7 +106,7 @@ public class WebpCommonUtilsTests
174, 183, 189, 255,
148, 158, 158, 255,
};
Span<Bgra32> row = MemoryMarshal.Cast<byte, Bgra32>(rowBytes);
Span<Bgra32> row = MemoryMarshal.Cast<byte, Bgra32>((Span<byte>)rowBytes);
bool noneOpaque;
for (int length = 8; length < row.Length; length += 8)
@ -188,7 +188,7 @@ public class WebpCommonUtilsTests
174, 183, 189, 255,
148, 158, 158, 255,
};
Span<Bgra32> row = MemoryMarshal.Cast<byte, Bgra32>(rowBytes);
Span<Bgra32> row = MemoryMarshal.Cast<byte, Bgra32>((Span<byte>)rowBytes);
bool noneOpaque;
for (int length = 8; length < row.Length; length += 8)

2
tests/ImageSharp.Tests/Image/ImageFrameTests.cs

@ -112,7 +112,7 @@ public class ImageFrameTests
}
byte[] expected = TestUtils.FillImageWithRandomBytes(image);
byte[] actual = new byte[expected.Length];
Span<byte> actual = new byte[expected.Length];
if (byteSpan)
{
image.Frames.RootFrame.CopyPixelDataTo(actual);

2
tests/ImageSharp.Tests/Image/ImageTests.cs

@ -190,7 +190,7 @@ public partial class ImageTests
}
byte[] expected = TestUtils.FillImageWithRandomBytes(image);
byte[] actual = new byte[expected.Length];
Span<byte> actual = new byte[expected.Length];
if (byteSpan)
{
image.CopyPixelDataTo(actual);

Loading…
Cancel
Save