
Write image data as binary to append existing file
Hi aguilanegra,
You can use the Image.Save Method (Stream,ImageFormat) method to save the
image to a stream, and then write/append the stream to a file. When you
want to retrieve the file, you can use the Bitmap class. It has a
constructor that accepts a stream. You can use this constructor to
construct the image from a stream.
Also, you can use the BinaryFormatter class to serialize and deserialize
image objects. For more information, please check this class in the MSDN.
Hope this helps.
Regards,
Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Quote:
>Content-Class: urn:content-classes:message
>Subject: Write image data as binary to append existing file
>Date: Thu, 13 Feb 2003 12:25:56 -0800
>Lines: 12
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcLTnh0dprPrnSXoTLez3/ZtynS2bw==
>Newsgroups: microsoft.public.dotnet.languages.vb
>NNTP-Posting-Host: TK2MSFTNGXA10 10.40.1.162
>Path: cpmsftngxa08!cpmsftngxa06
>Xref: cpmsftngxa08 microsoft.public.dotnet.languages.vb:90383
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb
>I would like to take the image in an existing picturebox
>on a form and write the binary code for that image into a
>data file for retrieval later. I'm having trouble
>figuring out how to write it out.
>This is in VB.NET.
>Any help or sample code would be great.
>Thank you,
>Mateo