更新时间:2023-02-25 16:41:48
您不需要创建图像对象;你只是想返回原始数据。结果
该浏览器将读取原始数据转换成图像。
You don't need to create an image object; you just want to return the raw data.
The browser will read the raw data into an image.
return File(byteArray, "image/png");
显然,你需要通过正确的内容类型,具体取决于图像格式是字节数组中
Obviously, you need to pass the correct content type, depending on what image format is in the byte array.