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); }
手拿菜刀砍电线,一路火花带闪电。
高楼大厦平地起,靠谁不如靠自己