473,395 Members | 1,474 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,395 software developers and data experts.

Stream

JTE
Hi everybody,

I made a simple Wndows application in VS2005. A form with a button and
a picturebox.
>From a public webservice i get a bytearray which i put in a stream and
place it in the
picturebox.

Dim xx As New System.IO.MemoryStream(yy)
PictureBox1.Image = Image.FromStream(xx)
PictureBox1.SizeMode = PictureBoxSizeMode.CenterImage

Now i want to do the same in a webapplication, but i can't find a
picturebox, only a image object.
How can i put the incomming bytearray in a image?

Thanks,

Jurgen

Sep 1 '06 #1
4 1279
"JTE" <ju************@chello.nlschrieb:
I made a simple Wndows application in VS2005. A form with a button and
a picturebox.
>>From a public webservice i get a bytearray which i put in a stream and
place it in the
picturebox.

Dim xx As New System.IO.MemoryStream(yy)
PictureBox1.Image = Image.FromStream(xx)
PictureBox1.SizeMode = PictureBoxSizeMode.CenterImage

Now i want to do the same in a webapplication, but i can't find a
picturebox, only a image object.
How can i put the incomming bytearray in a image?
You can save the byte array to an image file on the server and make the
'img' element's 'src' attribute point to the image file on the server.
Popular browsers like Microsoft Internet Explorer do not support embedding
of image data into HTML pages.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Sep 1 '06 #2
Hello Herfried K. Wagner [MVP],

Actually, IE does support embedded images in MHT (web archive) files. I'm
not recommending this, just a comment.

-Boo
"JTE" <ju************@chello.nlschrieb:
>I made a simple Wndows application in VS2005. A form with a button
and a picturebox.
>>From a public webservice i get a bytearray which i put in a stream
and
place it in the
picturebox.
Dim xx As New System.IO.MemoryStream(yy)
PictureBox1.Image = Image.FromStream(xx)
PictureBox1.SizeMode = PictureBoxSizeMode.CenterImage
Now i want to do the same in a webapplication, but i can't find a
picturebox, only a image object.
How can i put the incomming bytearray in a image?
You can save the byte array to an image file on the server and make
the 'img' element's 'src' attribute point to the image file on the
server. Popular browsers like Microsoft Internet Explorer do not
support embedding of image data into HTML pages.

Sep 1 '06 #3
"GhostInAK" <gh*******@gmail.comschrieb:
Actually, IE does support embedded images in MHT (web archive) files. I'm
not recommending this, just a comment.
That's true, but I was referring to the 'data' pseudo protocol used in HTML
and supported by some user agents.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Sep 1 '06 #4
JTE

Herfried K. Wagner [MVP] wrote:
"GhostInAK" <gh*******@gmail.comschrieb:
Actually, IE does support embedded images in MHT (web archive) files. I'm
not recommending this, just a comment.

That's true, but I was referring to the 'data' pseudo protocol used in HTML
and supported by some user agents.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Thank you both for the input !

Sep 2 '06 #5

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

Similar topics

1
by: andrewcw | last post by:
OK I am half way there - I can manipulate the stream without the byte issue like this - but is this the way to push the new values back into the stream & write out the stream without resorting to...
5
by: andrewcw | last post by:
I have an object to serialize. TextWriter writer = new StreamWriter("test.xml"); serializer.Serialize(writer,obj); writer.Close(); but below does not, why ?? I have a file that I will have...
3
by: MJB | last post by:
I'm getting an IStream back from function xmlHttp.responsestream. I would like to convert this to a System.IO.Stream in order to work with it in my application. Has anyone encountered this and...
4
by: TT (Tom Tempelaere) | last post by:
Hey there, I need a string stream, but I can't find one in .NET. I thought StringWriter would derive from Stream, alas it doesn't do so. Which leads me to my next question: What is the purpose...
4
by: fastback66 | last post by:
Evidently per the C++ standard, it is not possible to measure the distance between two stream iterators, because two non-end-of-stream iterators are equal when they are constructed from the same...
8
by: Marc Gravell | last post by:
I want to write a method that will accept a stream as a parameter, and which will write xml to the stream (based in reality on database results) using the XmlTextWriter class. However, this insists...
4
by: Helge Jensen | last post by:
In C# 2.0 System.IO.Stream is declared as: public class Stream: ..., IDisposable { ... public void Dispose(); public void Dispose(bool); IDisposable.Dispose(); } Which must be a...
0
by: mario.lat_ | last post by:
Hallo to all, I have write a little script for connecting to cisco router BUT I have a problem: I have to send to router all the commands and then I have to read the output. If I send a command1...
3
by: sven.suursoho | last post by:
Hello, In main(), the first output API is what I try to achieve. Unfortunately it fails, printing first string as pointer instead of human readable message. Tried to initialize str(""), set new...
4
by: Scott F. Brown | last post by:
Greetings all... I was playing around with compressing streams and came across a behavior that I do not understand. I create a stream (input) from the contents of a textbox. That stream is...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.