流媒体图像 [英] streaming images

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

问题描述

全部,


我有一个ADO.NET数据集,其中包含一个jpeg(blob数据)和一些描述jpeg的字段

。我想直接将blob数据流式传输到我的

ASP.NET 1.1 webform而不先保存到磁盘并显示字段为

同一页面上的标签这是可能的?


谢谢

Msuk

解决方案

如果您有数据读取器在记录中打开并且图像字段是记录中的第一个
,您只需要:


System.Data.SqlTypes.SqlBinary image = reader.GetSqlBinary(0);


if(!image.IsNull&& image.Value.Length 0)


{


this.Response.ContentType =" image / gif";


this.Response.BinaryWrite(image.Value);


}


-

Eliyahu Goldin,

软件开发人员&顾问

Microsoft MVP [ASP.NET]


" msuk" < ms ** @ discuss.microsoft.com写信息

news:87 ************************** ******** @ microsof t.com ...


全部,


我有一个ADO .NET数据集包含一个jpeg(blob数据)和一些描述jpeg的字段

。我想直接将blob数据流式传输到

我的

ASP.NET 1.1 webform,而不先保存到磁盘并显示字段为

同一页面上的标签是可能的吗?


谢谢

Msuk





我有一个远程组件,我调用它返回一个数据集,其中

第一个字段是图像 - 这仍然是使用你的方法工作?


谢谢

Msuk


Eliyahu Goldin写道:


如果您在记录上打开了数据阅读器并且图像字段是记录中的第一个,那么您需要的只是只是:


System.Data.SqlTypes.SqlBinary image = reader.GetSqlBinary(0);


if(!image.IsNull& ;& image.Value.Length 0)


{


this.Response.ContentType =" image / gif";


this.Response.BinaryWrite(image.Value);


}


-

Eliyahu Goldin,

软件开发人员&顾问

Microsoft MVP [ASP.NET]


" msuk" < ms ** @ discuss.microsoft.com写信息

news:87 ************************** ******** @ microsof t.com ...


全部,


我有一个ADO .NET数据集包含一个jpeg(blob数据)和一些描述jpeg的字段

。我想直接将blob数据流式传输到

我的

ASP.NET 1.1 webform,而不先保存到磁盘并显示字段为

同一页面上的标签是可能的吗?


谢谢

Msuk




该示例显示如何将二进制数据提供给响应流。由你来决定如何获得数据。

-

Eliyahu Goldin,

软件开发人员&安培;顾问

Microsoft MVP [ASP.NET]


" msuk" < ms ** @ discussion.microsoft.com写信息

news:88 ************************** ******** @ microsof t.com ...





我有一个遥控器我调用的组件返回给我一个数据集



第一个字段是图像 - 这仍然可以使用你的方法吗?


谢谢

Msuk


" Eliyahu Goldin"写道:


>如果您在记录中打开了数据阅读器并且图像字段是记录中的第一个,那么您只需要:

System.Data.SqlTypes.SqlBinary image = reader.GetSqlBinary(0);

if(!image.IsNull&& image.Value.Length 0)



this.Response.ContentType =" image / gif";

this.Response.BinaryWrite(image.Value); <

- Eliyahu Goldin,
软件开发人员&顾问
Microsoft MVP [ASP.NET]

" msuk" < ms ** @ discussion.microsoft.com写信息
新闻:87 ****************************** **** @ microso ft.com ...


全部,


我有一个ADO.NET数据集包含jpeg(blob数据)和一些描述jpeg的
字段

。我想直接将blob数据流式传输



我的

ASP.NET 1.1 webform,而不先保存到磁盘并显示字段

as

同一页面上的标签是可能的吗?


谢谢

Msuk





All,

I have a ADO.NET dataset that contains a jpeg (blob data) and some fields
that describe the jpeg. I would like to stream the blob data straight to my
ASP.NET 1.1 webform without first saving to disk and display the fields as
labels on the same page is this possible?

Thanks
Msuk

解决方案

Provided you have a data reader open on the record and the image field is
the first in the record, all you need is just:

System.Data.SqlTypes.SqlBinary image = reader.GetSqlBinary(0);

if (!image.IsNull && image.Value.Length 0)

{

this.Response.ContentType = "image/gif";

this.Response.BinaryWrite (image.Value);

}

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"msuk" <ms**@discussions.microsoft.comwrote in message
news:87**********************************@microsof t.com...

All,

I have a ADO.NET dataset that contains a jpeg (blob data) and some fields
that describe the jpeg. I would like to stream the blob data straight to
my
ASP.NET 1.1 webform without first saving to disk and display the fields as
labels on the same page is this possible?

Thanks
Msuk



Hi,

I have a remote component that I call that returns me a Dataset whereby the
first field is the image - will this still work using your method?

Thanks
Msuk

"Eliyahu Goldin" wrote:

Provided you have a data reader open on the record and the image field is
the first in the record, all you need is just:

System.Data.SqlTypes.SqlBinary image = reader.GetSqlBinary(0);

if (!image.IsNull && image.Value.Length 0)

{

this.Response.ContentType = "image/gif";

this.Response.BinaryWrite (image.Value);

}

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"msuk" <ms**@discussions.microsoft.comwrote in message
news:87**********************************@microsof t.com...

All,

I have a ADO.NET dataset that contains a jpeg (blob data) and some fields
that describe the jpeg. I would like to stream the blob data straight to
my
ASP.NET 1.1 webform without first saving to disk and display the fields as
labels on the same page is this possible?

Thanks
Msuk




The example shows you how to get binary data to the response stream. It is
up to you how to derive the data.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"msuk" <ms**@discussions.microsoft.comwrote in message
news:88**********************************@microsof t.com...

Hi,

I have a remote component that I call that returns me a Dataset whereby
the
first field is the image - will this still work using your method?

Thanks
Msuk

"Eliyahu Goldin" wrote:

>Provided you have a data reader open on the record and the image field is
the first in the record, all you need is just:

System.Data.SqlTypes.SqlBinary image = reader.GetSqlBinary(0);

if (!image.IsNull && image.Value.Length 0)

{

this.Response.ContentType = "image/gif";

this.Response.BinaryWrite (image.Value);

}

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"msuk" <ms**@discussions.microsoft.comwrote in message
news:87**********************************@microso ft.com...

All,

I have a ADO.NET dataset that contains a jpeg (blob data) and some
fields
that describe the jpeg. I would like to stream the blob data straight
to
my
ASP.NET 1.1 webform without first saving to disk and display the fields
as
labels on the same page is this possible?

Thanks
Msuk





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

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