|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Convert Byte() to System.Drawing.Image?Using VB.Net (VS.Net 2k3)...
I'm at a bit of an impasse I think... Is there any way to convert an array of Byte() into a System.Drawing.Image object without writing the array to a file, then reading back into the s.d.i object? Couldn't find anything in MSDN or by Googling... Thanks! "JackBlack" <jackisb***@hotmail.com> schrieb dim stream as System.IO.MemoryStream> Using VB.Net (VS.Net 2k3)... > > I'm at a bit of an impasse I think... Is there any way to convert > an array of Byte() into a System.Drawing.Image object without > writing the array to a file, then reading back into the s.d.i > object? Couldn't find anything in MSDN or by Googling... dim img as image stream = new System.IO.MemoryStream(bytearray) img = image.fromstream(stream) Armin >I'm at a bit of an impasse I think... Is there any way to convert an array Create a MemoryStream around the byte array and call Image.FromStream.>of Byte() into a System.Drawing.Image object without writing the array to a >file, then reading back into the s.d.i object? Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. "JackBlack" <jackisb***@hotmail.com> schrieb: Create a 'MemoryStream' object, write the byte array to the stream and use > I'm at a bit of an impasse I think... Is there any way to convert an > array of Byte() into a System.Drawing.Image object 'Image.FromStream' to construct the image. Note that the stream must be kept open as long as the 'Image' object exists. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Excel Range will not put data into correct Cell
Best approach - databound controls & ADO.NET Maintaining a response user interface NetUserChangePassword Module not found?? How to close an application?? Simple mask Edit for Hours:Minutes Programatic uninstall? OT: Business Objects - what are they and can they contain objects like sockets? Cache problem ADO, DAO or OleDb? |
|||||||||||||||||||||||