How to convert an Image to a string

  • Thread starter Thread starter mevar81
  • Start date Start date
M

mevar81

Hello to everybody.I have a problem.I used a
TypeDescriptor to retrieve a TypeConverter to convert an
Image to a string.The problem is that it converts the
image to the string "System.Drawing.Bitmap" so lately I
can't convert the string to an Image.I've tryed to use an
ImageConverter too,but the result is the same. Why the
converter works like the Image.ToString() method?What's
its goal?Anyone know how to convert an Image to a string
so after I can reconvert the string back to the Image?Or
anyone know how to retrieve the name of the file that
rappresents the image?Thaks to everybody.
 
* "mevar81 said:
TypeDescriptor to retrieve a TypeConverter to convert an
Image to a string.The problem is that it converts the
image to the string "System.Drawing.Bitmap" so lately I
can't convert the string to an Image.I've tryed to use an
ImageConverter too,but the result is the same. Why the
converter works like the Image.ToString() method?What's
its goal?Anyone know how to convert an Image to a string
so after I can reconvert the string back to the Image?Or
anyone know how to retrieve the name of the file that
rappresents the image?Thaks to everybody.

You may want to save the image to a 'MemoryStream' by using its 'Save'
method and use 'Image.FromStream' to get the image back.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
Back
Top