版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/HK_JY/article/details/80320381
/// <summary>
/// 将byte[]输出为图片
/// </summary>
/// <param name="path">输出图片的路径及名称</param>
/// <param name="picByte">byte[]数组存放的图片数据</param>
public void Write(string path,byte[] picByte)
{
FileStream fs = new FileStream(path, FileMode.Create);
BinaryWriter bw = new BinaryWriter(fs);
//开始写入
bw.Write(picByte, 0, picByte.Length);
//关闭流
bw.Close();
fs.Close();
}
调用:

string path = @"F:\testpic.jpg";

Write(path,picByte);
---------------------
作者:灬Change
来源:CSDN
原文:https://blog.csdn.net/HK_JY/article/details/80320381
版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章:

  • 2021-05-22
  • 2022-01-11
  • 2021-12-23
  • 2021-04-08
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
猜你喜欢
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2021-07-27
  • 2021-07-24
相关资源
相似解决方案