By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 3,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

Display Images vertically via web service

P: n/a
I have to create a image web service that when it receives an imageid
parameter it will return a gif image from a file that has been stored on the
server.

The client will be an asp.net web page that calls the web service to render
a vertical strip of images.

After doing some research I am unable to find some vb.net code that can
assist in what I want to achieve.
The closest thing I found was
http://msdn.microsoft.com/library/de...mypicsvbvs.asp.

However its too complicated for me to work out the bits I really need. I
believe the web service needs to stream the image and the asp.net page
consumes this. Am I on the right track? Do I need to use IHttpHandler?

Can someone show me a basic code sample in vb.net so that I get images to
appear vertically as such:

Image #1
Image #2
::
::
Image #n

Regards
Peter
Jan 3 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Is there a reason it needs to be a webservice ?

just make an aspx page that changes the headers of the responce to

Content-Type: image/jpeg
then writes out the binary image to the response stream.

In your page would be:
<img src="image.aspx?id=5"> and that would grab the image from the ASPX.


Peter Lapic wrote:
I have to create a image web service that when it receives an imageid
parameter it will return a gif image from a file that has been stored on the
server.

The client will be an asp.net web page that calls the web service to render
a vertical strip of images.

After doing some research I am unable to find some vb.net code that can
assist in what I want to achieve.
The closest thing I found was
http://msdn.microsoft.com/library/de...mypicsvbvs.asp.

However its too complicated for me to work out the bits I really need. I
believe the web service needs to stream the image and the asp.net page
consumes this. Am I on the right track? Do I need to use IHttpHandler?

Can someone show me a basic code sample in vb.net so that I get images to
appear vertically as such:

Image #1
Image #2
::
::
Image #n

Regards
Peter

Jan 3 '06 #2

P: n/a
Thanks Matthew. The web service is designed to generate the images.
The source comes from vector based files that require conversions.
Since these files can change at any given time, the latest image must be
presented.
So the web services acts as a graphics layer much like database acts as a
data layer.

The client is foremost layer and must be separate from the complexity of the
graphics process.
So I really do need some sort of streaming mechanism.

Regards
Peter

"Matthew" <Ma*****@nospam.net> wrote in message
news:eN**************@TK2MSFTNGP15.phx.gbl...
Is there a reason it needs to be a webservice ?

just make an aspx page that changes the headers of the responce to

Content-Type: image/jpeg
then writes out the binary image to the response stream.

In your page would be:
<img src="image.aspx?id=5"> and that would grab the image from the ASPX.


Peter Lapic wrote:
I have to create a image web service that when it receives an imageid
parameter it will return a gif image from a file that has been stored on
the server.

The client will be an asp.net web page that calls the web service to
render a vertical strip of images.

After doing some research I am unable to find some vb.net code that can
assist in what I want to achieve.
The closest thing I found was
http://msdn.microsoft.com/library/de...mypicsvbvs.asp.

However its too complicated for me to work out the bits I really need. I
believe the web service needs to stream the image and the asp.net page
consumes this. Am I on the right track? Do I need to use IHttpHandler?

Can someone show me a basic code sample in vb.net so that I get images to
appear vertically as such:

Image #1
Image #2
::
::
Image #n

Regards
Peter

Jan 3 '06 #3

P: n/a
Hi Peter,

For such scenario, I think using ASP.NET HttpHandler to build such a image
generator service is the perfered approach. We can put the data accessing
code in httphandler's processMessage code to retrieve image streams and
flush them out .... Then, other pages can reference the httphandler's url
(which use querystring parameters to specify certain code logic
options....). Also, the ASP.NET 2.0's WebResource.axd is just such a
HttpHandler which help retreive resources from assembly and flush it
out....

Here are two web articles discussing on building a Image generation
httphandler in ASP.NET:

#A simple ASP.NET photo album
http://weblogs.asp.net/bleroy/archiv...08/424714.aspx

#Using ASP.NET HTTP Handlers to create a photo album
http://www.microsoft.com/belux/nl/ms...et/httphandler.
mspx

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Peter Lapic" <pl****@shop-a-docket.com.au>
| References: <Od**************@TK2MSFTNGP14.phx.gbl>
<eN**************@TK2MSFTNGP15.phx.gbl>
| Subject: Re: Display Images vertically via web service
| Date: Tue, 3 Jan 2006 15:11:50 +1000
| Lines: 59
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Response
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <eA*************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 61.88.17.230
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:368170
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks Matthew. The web service is designed to generate the images.
| The source comes from vector based files that require conversions.
| Since these files can change at any given time, the latest image must be
| presented.
| So the web services acts as a graphics layer much like database acts as a
| data layer.
|
| The client is foremost layer and must be separate from the complexity of
the
| graphics process.
| So I really do need some sort of streaming mechanism.
|
| Regards
| Peter
|
| "Matthew" <Ma*****@nospam.net> wrote in message
| news:eN**************@TK2MSFTNGP15.phx.gbl...
| > Is there a reason it needs to be a webservice ?
| >
| > just make an aspx page that changes the headers of the responce to
| >
| > Content-Type: image/jpeg
| > then writes out the binary image to the response stream.
| >
| > In your page would be:
| > <img src="image.aspx?id=5"> and that would grab the image from the ASPX.
| >
| >
| >
| >
| > Peter Lapic wrote:
| >> I have to create a image web service that when it receives an imageid
| >> parameter it will return a gif image from a file that has been stored
on
| >> the server.
| >>
| >> The client will be an asp.net web page that calls the web service to
| >> render a vertical strip of images.
| >>
| >> After doing some research I am unable to find some vb.net code that
can
| >> assist in what I want to achieve.
| >> The closest thing I found was
| >>
http://msdn.microsoft.com/library/de...us/dnmsde2kwrk
/html/mypicsvbvs.asp.
| >>
| >> However its too complicated for me to work out the bits I really need.
I
| >> believe the web service needs to stream the image and the asp.net page
| >> consumes this. Am I on the right track? Do I need to use IHttpHandler?
| >>
| >> Can someone show me a basic code sample in vb.net so that I get images
to
| >> appear vertically as such:
| >>
| >> Image #1
| >> Image #2
| >> ::
| >> ::
| >> Image #n
| >>
| >> Regards
| >> Peter
|
|
|

Jan 3 '06 #4

P: n/a
Hi Peter,

How are you doing on this issue or does my last reply helps you a little?
If there're anything else we can help, please feel free to post here.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 215291606
| References: <Od**************@TK2MSFTNGP14.phx.gbl>
<eN**************@TK2MSFTNGP15.phx.gbl>
<eA*************@TK2MSFTNGP10.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Tue, 03 Jan 2006 07:46:47 GMT
| Subject: Re: Display Images vertically via web service
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <OS**************@TK2MSFTNGXA02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 100
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:368194
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Peter,
|
| For such scenario, I think using ASP.NET HttpHandler to build such a
image
| generator service is the perfered approach. We can put the data accessing
| code in httphandler's processMessage code to retrieve image streams and
| flush them out .... Then, other pages can reference the httphandler's
url
| (which use querystring parameters to specify certain code logic
| options....). Also, the ASP.NET 2.0's WebResource.axd is just such a
| HttpHandler which help retreive resources from assembly and flush it
| out....
|
| Here are two web articles discussing on building a Image generation
| httphandler in ASP.NET:
|
| #A simple ASP.NET photo album
| http://weblogs.asp.net/bleroy/archiv...08/424714.aspx
|
| #Using ASP.NET HTTP Handlers to create a photo album
|
http://www.microsoft.com/belux/nl/ms...et/httphandler.
| mspx
|
| Hope helps. Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
| --------------------
| | From: "Peter Lapic" <pl****@shop-a-docket.com.au>
| | References: <Od**************@TK2MSFTNGP14.phx.gbl>
| <eN**************@TK2MSFTNGP15.phx.gbl>
| | Subject: Re: Display Images vertically via web service
| | Date: Tue, 3 Jan 2006 15:11:50 +1000
| | Lines: 59
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| | X-RFC2646: Format=Flowed; Response
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| | Message-ID: <eA*************@TK2MSFTNGP10.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: 61.88.17.230
| | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:368170
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | Thanks Matthew. The web service is designed to generate the images.
| | The source comes from vector based files that require conversions.
| | Since these files can change at any given time, the latest image must
be
| | presented.
| | So the web services acts as a graphics layer much like database acts as
a
| | data layer.
| |
| | The client is foremost layer and must be separate from the complexity
of
| the
| | graphics process.
| | So I really do need some sort of streaming mechanism.
| |
| | Regards
| | Peter
| |
| | "Matthew" <Ma*****@nospam.net> wrote in message
| | news:eN**************@TK2MSFTNGP15.phx.gbl...
| | > Is there a reason it needs to be a webservice ?
| | >
| | > just make an aspx page that changes the headers of the responce to
| | >
| | > Content-Type: image/jpeg
| | > then writes out the binary image to the response stream.
| | >
| | > In your page would be:
| | > <img src="image.aspx?id=5"> and that would grab the image from the
ASPX.
| | >
| | >
| | >
| | >
| | > Peter Lapic wrote:
| | >> I have to create a image web service that when it receives an
imageid
| | >> parameter it will return a gif image from a file that has been
stored
| on
| | >> the server.
| | >>
| | >> The client will be an asp.net web page that calls the web service to
| | >> render a vertical strip of images.
| | >>
| | >> After doing some research I am unable to find some vb.net code that
| can
| | >> assist in what I want to achieve.
| | >> The closest thing I found was
| | >>
|
http://msdn.microsoft.com/library/de...us/dnmsde2kwrk
| /html/mypicsvbvs.asp.
| | >>
| | >> However its too complicated for me to work out the bits I really
need.
| I
| | >> believe the web service needs to stream the image and the asp.net
page
| | >> consumes this. Am I on the right track? Do I need to use
IHttpHandler?
| | >>
| | >> Can someone show me a basic code sample in vb.net so that I get
images
| to
| | >> appear vertically as such:
| | >>
| | >> Image #1
| | >> Image #2
| | >> ::
| | >> ::
| | >> Image #n
| | >>
| | >> Regards
| | >> Peter
| |
| |
| |
|
|

Jan 5 '06 #5

P: n/a
Hi Peter,

We've received your mail and according to your current question(displaying
image vertically), here are some of my understanding on this:

Are you wantting to display serveral image vertically in a single DataGrid
cell? Also, if the image counts in each cell is fixed, we can just put a
html <table> to structure the <img> tags and peform databinding, else if
the counts is not fixed, we may need to use a n additional template
databound control (like Repeater ) to display those images....

BTW, since you're currently using a webservice together with a asp.net page
to output the image as binary stream, why don't you just use an HTTPhandler
to retrieve image bytes and output them as binary image stream as mentioned
in those articles provided in my last reply?

Please let me know if anything I didn't quite get. If convenient, you can
make a complete static html page to show what you want your client page to
finally display...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| X-Tomcat-ID: 224302808
| References: <Od**************@TK2MSFTNGP14.phx.gbl>
<eN**************@TK2MSFTNGP15.phx.gbl>
<eA*************@TK2MSFTNGP10.phx.gbl>
<OS**************@TK2MSFTNGXA02.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Thu, 05 Jan 2006 09:49:46 GMT
| Subject: Re: Display Images vertically via web service
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <$D**************@TK2MSFTNGXA02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 135
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:368691
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Hi Peter,
|
| How are you doing on this issue or does my last reply helps you a little?
| If there're anything else we can help, please feel free to post here.
|
| Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
| --------------------
| | X-Tomcat-ID: 215291606
| | References: <Od**************@TK2MSFTNGP14.phx.gbl>
| <eN**************@TK2MSFTNGP15.phx.gbl>
| <eA*************@TK2MSFTNGP10.phx.gbl>
| | MIME-Version: 1.0
| | Content-Type: text/plain
| | Content-Transfer-Encoding: 7bit
| | From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| | Organization: Microsoft
| | Date: Tue, 03 Jan 2006 07:46:47 GMT
| | Subject: Re: Display Images vertically via web service
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | Message-ID: <OS**************@TK2MSFTNGXA02.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | Lines: 100
| | Path: TK2MSFTNGXA02.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:368194
| | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
| |
| | Hi Peter,
| |
| | For such scenario, I think using ASP.NET HttpHandler to build such a
| image
| | generator service is the perfered approach. We can put the data
accessing
| | code in httphandler's processMessage code to retrieve image streams and
| | flush them out .... Then, other pages can reference the httphandler's
| url
| | (which use querystring parameters to specify certain code logic
| | options....). Also, the ASP.NET 2.0's WebResource.axd is just such a
| | HttpHandler which help retreive resources from assembly and flush it
| | out....
| |
| | Here are two web articles discussing on building a Image generation
| | httphandler in ASP.NET:
| |
| | #A simple ASP.NET photo album
| | http://weblogs.asp.net/bleroy/archiv...08/424714.aspx
| |
| | #Using ASP.NET HTTP Handlers to create a photo album
| |
|
http://www.microsoft.com/belux/nl/ms...et/httphandler.
| | mspx
| |
| | Hope helps. Thanks,
| |
| | Steven Cheng
| | Microsoft Online Support
| |
| | Get Secure! www.microsoft.com/security
| | (This posting is provided "AS IS", with no warranties, and confers no
| | rights.)
| |
| |
| | --------------------
| | | From: "Peter Lapic" <pl****@shop-a-docket.com.au>
| | | References: <Od**************@TK2MSFTNGP14.phx.gbl>
| | <eN**************@TK2MSFTNGP15.phx.gbl>
| | | Subject: Re: Display Images vertically via web service
| | | Date: Tue, 3 Jan 2006 15:11:50 +1000
| | | Lines: 59
| | | X-Priority: 3
| | | X-MSMail-Priority: Normal
| | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| | | X-RFC2646: Format=Flowed; Response
| | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| | | Message-ID: <eA*************@TK2MSFTNGP10.phx.gbl>
| | | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | | NNTP-Posting-Host: 61.88.17.230
| | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| | | Xref: TK2MSFTNGXA02.phx.gbl
| | microsoft.public.dotnet.framework.aspnet:368170
| | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | |
| | | Thanks Matthew. The web service is designed to generate the images.
| | | The source comes from vector based files that require conversions.
| | | Since these files can change at any given time, the latest image must
| be
| | | presented.
| | | So the web services acts as a graphics layer much like database acts
as
| a
| | | data layer.
| | |
| | | The client is foremost layer and must be separate from the complexity
| of
| | the
| | | graphics process.
| | | So I really do need some sort of streaming mechanism.
| | |
| | | Regards
| | | Peter
| | |
| | | "Matthew" <Ma*****@nospam.net> wrote in message
| | | news:eN**************@TK2MSFTNGP15.phx.gbl...
| | | > Is there a reason it needs to be a webservice ?
| | | >
| | | > just make an aspx page that changes the headers of the responce to
| | | >
| | | > Content-Type: image/jpeg
| | | > then writes out the binary image to the response stream.
| | | >
| | | > In your page would be:
| | | > <img src="image.aspx?id=5"> and that would grab the image from the
| ASPX.
| | | >
| | | >
| | | >
| | | >
| | | > Peter Lapic wrote:
| | | >> I have to create a image web service that when it receives an
| imageid
| | | >> parameter it will return a gif image from a file that has been
| stored
| | on
| | | >> the server.
| | | >>
| | | >> The client will be an asp.net web page that calls the web service
to
| | | >> render a vertical strip of images.
| | | >>
| | | >> After doing some research I am unable to find some vb.net code
that
| | can
| | | >> assist in what I want to achieve.
| | | >> The closest thing I found was
| | | >>
| |
|
http://msdn.microsoft.com/library/de...us/dnmsde2kwrk
| | /html/mypicsvbvs.asp.
| | | >>
| | | >> However its too complicated for me to work out the bits I really
| need.
| | I
| | | >> believe the web service needs to stream the image and the asp.net
| page
| | | >> consumes this. Am I on the right track? Do I need to use
| IHttpHandler?
| | | >>
| | | >> Can someone show me a basic code sample in vb.net so that I get
| images
| | to
| | | >> appear vertically as such:
| | | >>
| | | >> Image #1
| | | >> Image #2
| | | >> ::
| | | >> ::
| | | >> Image #n
| | | >>
| | | >> Regards
| | | >> Peter
| | |
| | |
| | |
| |
| |
|
|

Jan 9 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.