3
A
回答
2
的MvcFutures http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=18459项目具有FileResult这是一种类型的ActionResult的。你可以用它来返回一个二进制流到浏览器。
0
您还可以使用一个控制器动作做到这一点倒也干脆自己:
public void RenderImage(int imageId)
{
// TODO: Replace this with your API to get the image blob data.
byte[] data = this.repo.GetImageData(imageId);
if (data != null)
{
// This assumes you're storing JPEG data
Response.ContentType = "image/jpeg";
Response.Expires = 0;
Response.Buffer = true;
Response.Clear();
Response.BinaryWrite(data);
}
else
{
this.ControllerContext.HttpContext.ApplicationInstance.CompleteRequest();
}
}
相关问题
- 1. 保存/显示图像在asp.net MVC
- 2. 图像分辨率为PPT和Photoshop
- 3. 图像分辨率
- 4. 保存图像在高分辨率与视网膜显示的iPhone照片库
- 5. 为iPad Pro显示器优化的网页图像分辨率
- 6. Android - 将ImageView保存为全分辨率图像文件
- 7. 将一个图像保存为很多分辨率
- 8. iPhone - 操作/编辑和保存图像(高分辨率)
- 9. Matplotlib - 无法在相同的分辨率的图像保存为原始图像
- 10. 在保持分辨率的同时保存URI图像或转换为位图
- 11. 同时支持高分辨率和低分辨率图像
- 12. 高分辨率图像和视网膜显示
- 13. 以C保存图像保留分辨率#
- 14. 以特定分辨率保存MATLAB图
- 15. 分辨率的图像
- 16. 如何将高分辨率图像转换为低分辨率图像?
- 17. 使用jQuery切换高分辨率图像和低分辨率图像
- 18. @ 2x和图像分辨率的混淆
- 19. 旋转后保存图像。但保存后图片的分辨率降低
- 20. 从mongoDB保存的图像分辨率不好
- 21. 图像保存点位置的比例分辨率
- 22. 从高分辨率的opengl(pyqt)保存图像:
- 23. 在保存分辨率的画布中调整图像大小
- 24. 如何在matlab中保存高分辨率轴的图像GUI
- 25. Winform显示屏分辨率
- 26. 检测显示分辨率
- 27. 寻找图像分辨率?
- 28. iPhone图像分辨率
- 29. 检测图像分辨率?
- 30. 更改图像分辨率