📅  最后修改于: 2022-03-11 14:48:43.097000             🧑  作者: Mango
public static byte[] ImageToByte2(Image img)
{
using (var stream = new MemoryStream())
{
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
return stream.ToArray();
}
}