public static TT.Bitmap GetTTBitmap(IPixelMemory image, int width, int height) { if (image == null) { throw new ArgumentNullException(nameof(image)); } return(new TT.Bitmap(image.GetPixelByteSpan(), width, height, image.ByteStride)); }