C# 图片文件文本string格式 传输问题

it2022-05-08  10

string file = @"E:\test.png"; byte[] bytes = File.ReadAllBytes(file); // 主要代码string datas = Convert.ToBase64String(bytes); byte[] filebytestt = Convert.FromBase64String(datas); // string imagename = @"E:\testTmp.png"; var imgFile = File.Create(imagename, filebytestt.Length); imgFile.Write(filebytestt, 0, filebytestt.Length); imgFile.Close(); imgFile = null;

转载于:https://www.cnblogs.com/tianciliangen/p/5457522.html


最新回复(0)