如何从Byte数组中显示图像? [英] How to show image from Byte array?

查看:763
本文介绍了如何从Byte数组中显示图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有通过将输入参数作为字节数组从函数返回图像的代码。如何捕捉到这种形象&用asp控件在aspx页面上显示它。 ASP控件具有imageurl属性&没有图片属性。

I have the code which returns image from function by taking input parameter as a byte array. How to catch that image & show it on aspx page with asp control. ASP control have imageurl property & not have image property.

请回复....

问候,
Girish

Regards, Girish

推荐答案

您可以将图像字节直接写入响应流 - 这可以在下载图像时完成 - 或者您必须将其保存在您的应用程序可以访问的某个位置,然后为其物理路径生成虚拟路径并提供页面控制的URL。

You can either write image byte directly into response stream - this can be done when image is downloaded - or you have to save it in some location that can be accessed by your application, then generate virtual path for it's physical path and provide url for page control.

这篇关于如何从Byte数组中显示图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆