📜  c# 字节数组到位图 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:43.097000             🧑  作者: Mango

代码示例4
public static byte[] ImageToByte2(Image img)
{
    using (var stream = new MemoryStream())
    {
        img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
        return stream.ToArray();
    }
}