473,466 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Image from a WebService

Hello!

I have a question: I have a database in MySql that has two fields (code and
image). Now, I want to create a WebService that takes the image of the most
current row (the code is the date in which the image took). And then, create
a page in ASP.NET that calls this WebService, show the image and repeat this
behavior every 5 seconds (it is the time that is take a new image be
creating in the base of information). Can someone help or at least orientate
me in this?

Thank you very much and sorry about my poor english :)
Jun 20 '06 #1
2 2100
Nicolas,
ASP.NET WebServices transmit images as type byte[] (a byte array) and they
are typically sent over the wire as Base64 Encoded string of data.

Your consumer application should be able to take this byte[] stream result
of it's WebMethod call and, using one of the Image Class overloads, load it
into an Image object for display.

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Nicolas" wrote:
Hello!

I have a question: I have a database in MySql that has two fields (code and
image). Now, I want to create a WebService that takes the image of the most
current row (the code is the date in which the image took). And then, create
a page in ASP.NET that calls this WebService, show the image and repeat this
behavior every 5 seconds (it is the time that is take a new image be
creating in the base of information). Can someone help or at least orientate
me in this?

Thank you very much and sorry about my poor english :)

Jun 20 '06 #2
Hi,

Peter Bromberg [C# MVP] wrote:
Nicolas,
ASP.NET WebServices transmit images as type byte[] (a byte array) and they
are typically sent over the wire as Base64 Encoded string of data.

Your consumer application should be able to take this byte[] stream result
of it's WebMethod call and, using one of the Image Class overloads, load it
into an Image object for display.

Peter


For a web application, an elegant alternative could be to use the
ability that the Image objects have to reload themselves without the
whole page having to be refreshed.

For example:

var nImg = document.getElementById( "myImage" );
if ( nImg
&& nImg.src )
{
nImg.src = "image.gif";
}

and to set a timer to call this code every 5 seconds.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Scott | last post by:
I am storing an image in an SQL database and have one field as an image datatype. I am also using a webservice to transport data. I want to be able to resize the image and pass back a thumbnail...
1
by: Holly | last post by:
Hi, I have a page (A) that allows users to enter addresses and displays direction information and map images. The page A calls Microsoft's mappoint web service, gets the route info and map image....
3
by: Kristof Thys | last post by:
Hello, I'm writing a ASP.net webservice wich will visualize an image, generated by another application. The generated image is a char*. I can transform this to a String*, but I want to view it...
0
by: Geert | last post by:
Hi all, I have a webservice that creates an image. I want to show the result of that image on my website. The website and webservice are on different servers. There is a VPN line between both...
4
by: Nicolas | last post by:
Hello! I have a question: I have a database in MySql that has two fields (code and image). Now, I want to create a WebService that takes the image of the most current row (the code is the date...
2
by: geertolaerts | last post by:
Hello, I have a problem with uploading off images to my webservice, i convert them to a byte at client side but something goes wrong when i try to convert them back to a image at server side....
5
by: MattC | last post by:
Hi, I have a webservice that returns a byte for an image. I'd like to disaplay an image while the webservice is being contacted and then once the byte is available show that and remove the...
3
by: zion | last post by:
Hello, How can I return image link with webservice that I could see it in web page? The image is on my hard disk and <img src="c:\pictures\test.jpg" /does not work. If I use <img src=http://My...
2
by: ksheerasagar17 | last post by:
Hello All, Scenario: Sending an image through webservice as byte array to an Java webservice. The Problem1: The webservice method image property expects (data type) SByte rather than Byte...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.