convert any image file to hex code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gnkt4ujt2002
    New Member
    • Jul 2007
    • 3

    convert any image file to hex code

    hi frnds
    in using vb.net i want to read or convert any image file to HEX code ..actually
    i want to send wallpaper to a mobile phone using gateways
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    What do you mean hex code? Bytes?
    Just open the file with File.Open() and read in the bytes to an array or something then you can send them out.

    Comment

    • gnkt4ujt2002
      New Member
      • Jul 2007
      • 3

      #3
      Originally posted by Plater
      What do you mean hex code? Bytes?
      Just open the file with File.Open() and read in the bytes to an array or something then you can send them out.

      i hav to send it on mobile and a moblie phone want it in hex code ,,,,
      i use streamreader to read that image file but it read in unknown format ..thats why i got a problem

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        "hex code" isn't really code. Hexadecimal is a number system with base 16. (As opposed to standard decimal which is base 10)

        Is the image you are trying to send mobile-friendly? Back in the day phones only took .wbmp but I imagine they can handle more.

        Everything going to a cell phone generally has to be compressed (if it's going directly, if you go through a proxy'd gateway it will probably do the compression for you)

        Comment

        • girishnakhate
          New Member
          • Jul 2007
          • 1

          #5
          Originally posted by Plater
          "hex code" isn't really code. Hexadecimal is a number system with base 16. (As opposed to standard decimal which is base 10)

          Is the image you are trying to send mobile-friendly? Back in the day phones only took .wbmp but I imagine they can handle more.

          Everything going to a cell phone generally has to be compressed (if it's going directly, if you go through a proxy'd gateway it will probably do the compression for you)
          thnks 4 reply
          but it is not a solution i use clickatell gateway to send wallpaper ,,and u can'nt send the the path of u r wallpaper to that gate way,,so u hav to convert that wallpaper into hexadecimal string.. that why i want to convert image in to hex string which is also compatible with clickatell

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            So you would say have something like:
            string mypicstring="0x AA 0xBA 0xDD";
            and then you would send that string?

            Well if you read in the bytes, then convert them to int8, you cna then use the .ToString("2X") to display them as hex characters

            Comment

            Working...