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

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

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