private static bool ConvertImageToImageBuffer(ImageBuffer imageBuffer, ImageFrame <Rgba32> imageFrame) { Rgba32[] pixelArray = new Rgba32[imageFrame.Width * imageFrame.Height]; imageFrame.CopyPixelDataTo(pixelArray); return(ConvertImageToImageBuffer(imageBuffer, imageFrame.Width, imageFrame.Height, pixelArray)); }