我正在从服务器获取ArraySegment,该服务器已编码H264视频流,并将其转换为已编码H264视频流的byte [],现在我正尝试将此byte []写入图像文件,如图所示
byte[] bytes = recvBuffer.ToArray<byte>();
using (MemoryStream ms = new MemoryStream(bytes))
{
Image img = System.Drawing.Image.FromStream(ms);
img.Save(@"D:\myImage.bmp",System.Drawing.Imaging.ImageFormat.Bmp);
}
但myImage.bmp大小仍为0KB