在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
public Image ByteArrayToImage(byte[] iamgebytes) { MemoryStream ms = new MemoryStream(iamgebytes); Image image = Image.FromStream(ms); return image; } public byte[] ImageToByteArray(Image image) { MemoryStream ms = new MemoryStream(); image.Save(ms, image.RawFormat); return ms.ToArray(); } public string ByteArrayToString(byte[] bytes) { return Convert.ToBase64String(bytes); } public byte[] StringToByteArray(string image) { return Convert.FromBase64String(image); }
|
请发表评论