diff --git a/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs b/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs index 1315654c6..e9dc09989 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs @@ -30,10 +30,11 @@ namespace SixLabors.ImageSharp.Tests public static void MakeOpaque(this IImageProcessingContext ctx) where TPixel : struct, IPixel { + MemoryManager memoryManager = ctx.MemoryManager; ctx.Apply( img => { - using (var temp = new Buffer2D(img.Width, img.Height)) + using (Buffer2D temp = memoryManager.Allocate2D(img.Width, img.Height)) { Span tempSpan = temp.Span; foreach (ImageFrame frame in img.Frames)