来自记忆的图像 [英] Image from memory

查看:66
本文介绍了来自记忆的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能进行网页控制,即将图像绘制到

网页而无需将其保存到文件中?

(例如,我会将图片保存到数据库服务器,我想显示它

而不将其保存到文件系统文件中)


谢谢

Is there a posibility to make web control, that is drawing an image to
webpage without needing to save it into a file?
(for example, i will save picture into db server and I want to show it
without saving it into file on file system)

Thanks

推荐答案

这很简单......如果你这样做:


< img src =" someImage.aspx" />


然后您可以转到someImage.aspx并从数据库中获取内容,并将
直接写入Response.OutputStream。


您可以简单地将blob数据放入byte []数组并使用Response.WriteBinary输出

..确保调用REsponse.Clear()并设置

正确的内容类型:)


Karl


-
http://www.openmymind.net/


Mirek Endys <弥**** @ community.nospam>在消息中写道

新闻:eK ************** @ TK2MSFTNGP11.phx.gbl ...
It''s prety easy...if you do:

<img src="someImage.aspx" />

you can then goto someImage.aspx and get the contents from the database and
write them directly to the Response.OutputStream.

You can probably simply get the blob of data into a byte[] array and output
it using Response.WriteBinary.. make sure to call REsponse.Clear() and set
the proper content-type :)

Karl

--
http://www.openmymind.net/

"Mirek Endys" <Mi****@community.nospam> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
是否有可能制作网页控制,即将图像绘制到网页而无需将其保存到文件中?
(例如,我将图片保存到数据库服务器中,我想将其显示
将其保存到文件系统文件中)

谢谢
Is there a posibility to make web control, that is drawing an image to
webpage without needing to save it into a file?
(for example, i will save picture into db server and I want to show it
without saving it into file on file system)

Thanks



好吧,但在这种情况下我需要一个页面someImage。 aspx...但我需要把它变成

作为webcontrol.dll。它看起来像图像,但源不能是一个

的URL,而是一个内存流。是否可能???


" Karl Seguin [MVP]" < karl REMOVE @ REMOVE openmymind REMOVEMETOO。 ANDME

net>在留言新闻中写道:%2 **************** @ TK2MSFTNGP12.phx.gbl ...
well, but in this case i need an page "someImage.aspx"... but I need make it
as webcontrol.dll. It will looks like image, but the source cannot be an
URL, but an memory stream. Is it possible???

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
这很容易...如果你这样做:

< img src =" someImage.aspx" />

然后你可以转到someImage.aspx并从数据库中获取内容
并将它们直接写入Response.OutputStream。

你可能简单地将blob数据放入byte []数组并使用Response.WriteBinary输出它。确保调用REsponse.Clear()
并设置正确的内容类型:)

Karl

http:/ /www.openmymind.net/

Mirek Endys <弥**** @ community.nospam>在消息中写道
新闻:eK ************** @ TK2MSFTNGP11.phx.gbl ...
It''s prety easy...if you do:

<img src="someImage.aspx" />

you can then goto someImage.aspx and get the contents from the database
and write them directly to the Response.OutputStream.

You can probably simply get the blob of data into a byte[] array and
output it using Response.WriteBinary.. make sure to call REsponse.Clear()
and set the proper content-type :)

Karl

--
http://www.openmymind.net/

"Mirek Endys" <Mi****@community.nospam> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
是否可以进行网页控制,即将图像绘制到
网页而无需将其保存到文件中?
(例如,我将图片保存到数据库服务器中,我想将其显示
而不将其保存到文件中在文件系统上)

谢谢
Is there a posibility to make web control, that is drawing an image to
webpage without needing to save it into a file?
(for example, i will save picture into db server and I want to show it
without saving it into file on file system)

Thanks




不是100%肯定你在问什么。如果您想将图像流式传输到

浏览器,则需要在单独的请求中。如果你的页面是文字,并且你想要在那里有一个图像,你需要一个图像标签..你不能混合普通的

文本和二进制数据在一个单一的响应中。


如果您唯一担心的是代码需要在一个程序集中而不是页面的
,那么您的最佳解决方案可能是建立一个HttpHandler。


Karl


-
http://www.openmymind.net/
http://www.fuelindustries.com/

" Mirek Endys" <弥**** @ community.nospam>在消息中写道

news:ur ************** @ TK2MSFTNGP12.phx.gbl ...
Not 100% sure what you are asking. If you want to stream an image to a
browser, it needs to be in a separate request. If you page is text, and you
want to have an image in there, you need an image tag..you can''t mix plain
text and binary data within a single response.

If your only concern is that the code needs to be inside an assembly instead
of a page, your best solution is probably to build an HttpHandler.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Mirek Endys" <Mi****@community.nospam> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
好吧,但在此我需要一个页面someImage.aspx...但我需要把它作为webcontrol.dll。它看起来像图像,但源不能是一个URL,而是一个内存流。是否有可能???

Karl Seguin [MVP]" < karl REMOVE @ REMOVE openmymind REMOVEMETOO。 ANDME
net>在留言新闻中写道:%2 **************** @ TK2MSFTNGP12.phx.gbl ...
well, but in this case i need an page "someImage.aspx"... but I need make
it as webcontrol.dll. It will looks like image, but the source cannot be
an URL, but an memory stream. Is it possible???

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
这很容易...如果你这样做:

< img src =" someImage.aspx" />

然后你可以转到someImage.aspx并从数据库中获取内容
并将它们直接写入Response.OutputStream。

你可能简单地将blob数据放入byte []数组并使用Response.WriteBinary输出它。确保调用REsponse.Clear()
并设置正确的内容类型:)

Karl

http:/ /www.openmymind.net/

Mirek Endys <弥**** @ community.nospam>在消息中写道
新闻:eK ************** @ TK2MSFTNGP11.phx.gbl ...
It''s prety easy...if you do:

<img src="someImage.aspx" />

you can then goto someImage.aspx and get the contents from the database
and write them directly to the Response.OutputStream.

You can probably simply get the blob of data into a byte[] array and
output it using Response.WriteBinary.. make sure to call REsponse.Clear()
and set the proper content-type :)

Karl

--
http://www.openmymind.net/

"Mirek Endys" <Mi****@community.nospam> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
是否可以进行网页控制,即将图像绘制到
网页而无需将其保存到文件中?
(例如,我将图片保存到数据库服务器中,我想将其显示
而不将其保存到文件中在文件系统上)

谢谢
Is there a posibility to make web control, that is drawing an image to
webpage without needing to save it into a file?
(for example, i will save picture into db server and I want to show it
without saving it into file on file system)

Thanks





这篇关于来自记忆的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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