📅  最后修改于: 2022-03-11 14:49:06.485000             🧑  作者: Mango
public byte[] ImageToByteArray(System.Drawing.Image imageIn)
{
using (var ms = new MemoryStream())
{
imageIn.Save(ms,imageIn.RawFormat);
return ms.ToArray();
}
}