Skip to content

Commit fbe2a73

Browse files
committed
Use new Memory2D in helpers
1 parent 26a2c1e commit fbe2a73

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

BCnEncTests.Framework/Support/ImageLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ internal static unsafe Memory2D<ColorRgba32> FromBitmap(Bitmap bmp)
5454
ptr += 4;
5555
}
5656
bmp.UnlockBits(data);
57-
return pixels.AsMemory().AsMemory2D(bmp.Height, bmp.Width);
57+
return new Memory2D<ColorRgba32>(pixels, bmp.Width, bmp.Height);
5858
}
5959
}
6060

BCnEncTests.Framework/Support/TestHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public static void ExecuteHdrEncodingTest(HdrImage image, CompressionFormat form
183183
encoder.OutputOptions.Format = format;
184184

185185
var fs = File.OpenWrite(filename);
186-
encoder.EncodeToStreamHdr(image.pixels.AsMemory().AsMemory2D(image.height, image.width), fs);
186+
encoder.EncodeToStreamHdr(new Memory2D<ColorRgbFloat>(image.pixels, image.height, image.width), fs);
187187
fs.Close();
188188

189189
var rmse = DecodeKtxCheckRMSEHdr(filename, image);

0 commit comments

Comments
 (0)