public static byte[] CopyAllPixels(this BitmapSource bs) { var bytes = new byte[bs.GetStride() * bs.PixelHeight]; bs.CopyPixels(bytes, bs.GetStride(), 0); return(bytes); }
public static byte[] CopyAllPixels(this BitmapSource bs) { var bytes = new byte[bs.GetStride() * bs.PixelHeight]; bs.CopyPixels(bytes, bs.GetStride(), 0); return(bytes); }