How to convert an Image to a string

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mevar81

    How to convert an Image to a string

    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.
  • Ray Z

    #2
    Re: How to convert an Image to a string

    Wow, there two many concept you need to learn. ToString() normally give you
    a string of the "ClassName" . And, what are you going to do when you said
    "convert image to string"? Present image binary data with ascII text format?
    or, you just want to know the image files' name? Looks you are looking for
    the solution for second one, but the fact is, the image data normally won't
    carry the file information. The order should be this: you know the file name
    first, the you open file to read the image data.
    hope this help.

    Ray

    "mevar81" <tona121@hotmai l.com> wrote in message
    news:060b01c3a2 4a$265a7d50$a30 1280a@phx.gbl.. .[color=blue]
    > 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.[/color]


    Comment

    Working...