473,396 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Display Images vertically via web service

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
5 5008
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Fred | last post by:
I've written a number of "image gallery" pages before, but I'm trying to do something a little different. All the images are rectangular (these are just pictures from my camera), and the...
19
by: George Ziniewicz | last post by:
.. I try to use CSS when possible, though I am still learning and don't maximize its use. In particular, I still use a table to provide for a centered image in a few slideshows (though table...
15
by: A.Translator | last post by:
From what I read, aligning images vertically in a div is not easy. It proofed too difficult for me: I tried to align the "control buttons" on the right hand side of the main nav bar by vertically...
0
by: Angelos | last post by:
Hello, I have the folowing code looping thru a result set from the Database and displaying a list of products. I want to use CSS to display 3 products for each line ... or any number of products...
11
by: clintonG | last post by:
Hello, I use small 15x15 images as 'bullets' in the list. The vertical center of each image is well above the vertical center of the link item text. Damn if I can't figure out how vertically...
7
by: Simon Wigzell | last post by:
I am putting together a website for a photographer. There will be a section where his clients can select various sizes of picture to order. I would to be able to display the images the actual size...
8
by: Kentor | last post by:
Hello, I have users that submit images to my website. By default I choose to make the width bigger than the height because usually pictures are taken horizontally... But in some cases people take...
0
by: kashif73 | last post by:
IS it possible to display my data grid vertically in VB.NET? I mean my table columns display vertically on the left & rows horizontally in place of columns?
22
Atli
by: Atli | last post by:
Hi. I'm setting up a small photo-album-type thing, where I use PHP to set up a list of images for visitors to click through. That's all simple enough. However, I'm having a weird bug in IE8. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.