byte[] arr = Convert.FromBase64String(temp.Substring(temp.IndexOf(",") + 1));
using (Stream stream = new MemoryStream(arr))
{
  //处理代码
}

  若前端传入base64参数携带前缀“data:image/png;base64,......”,则需将逗号前内容删除在进行转换。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
猜你喜欢
  • 2022-12-23
  • 2021-11-20
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案