Read binary file as hex

Discussion in 'ASP General' started by DrewM, Nov 1, 2004.

  1. DrewM

    DrewM Guest

    I'm using ASP to generate an RTF (rich text) file, via the FSO. No
    problems with text, but when it comes to inserting images, the files
    have to be embedded as either binary or hex.

    Try as I might, I can't get binary to work (Word b0rks trying to open
    the resulting file). When I create a simple RTF in Wordpad and then view
    its source, Wordpad seems to be embedding the image as hex.

    Does anyone have a suggestion as to how I could read an image file off
    the disk in hex format for writing into my RTF?

    Any suggestions gratefully received.

    drew.
    DrewM, Nov 1, 2004
    #1
    1. Advertising

  2. DrewM

    s_m_b Guest

    DrewM <> wrote in news:#G0A9PBwEHA.1976
    @TK2MSFTNGP09.phx.gbl:

    Have you checked out if there are any third party components that would
    either do that, or at least do an intemediate conversion?


    > I'm using ASP to generate an RTF (rich text) file, via the FSO. No
    > problems with text, but when it comes to inserting images, the files
    > have to be embedded as either binary or hex.
    >
    > Try as I might, I can't get binary to work (Word b0rks trying to open
    > the resulting file). When I create a simple RTF in Wordpad and then view
    > its source, Wordpad seems to be embedding the image as hex.
    >
    > Does anyone have a suggestion as to how I could read an image file off
    > the disk in hex format for writing into my RTF?
    >
    > Any suggestions gratefully received.
    >
    > drew.
    >
    s_m_b, Nov 3, 2004
    #2
    1. Advertising

  3. DrewM

    DrewM Guest

    s_m_b wrote:
    > DrewM <> wrote in news:#G0A9PBwEHA.1976
    > @TK2MSFTNGP09.phx.gbl:
    >
    > Have you checked out if there are any third party components that would
    > either do that, or at least do an intemediate conversion?


    Yes, but I haven't managed to find anything yet.

    Thanks

    drew.
    DrewM, Nov 4, 2004
    #3
  4. DrewM

    Roland Hall Guest

    "DrewM" <> wrote in message
    news:e$YaN%...
    : s_m_b wrote:
    : > DrewM <> wrote in news:#G0A9PBwEHA.1976
    : > @TK2MSFTNGP09.phx.gbl:
    : >
    : > Have you checked out if there are any third party components that would
    : > either do that, or at least do an intemediate conversion?
    :
    : Yes, but I haven't managed to find anything yet.

    http://www.motobit.com/tips/detpg_read-write-binary-files.htm

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp
    Roland Hall, Nov 5, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    10
    Views:
    6,140
    Neredbojias
    Aug 19, 2005
  2. Bengt Richter
    Replies:
    6
    Views:
    449
    Juha Autero
    Aug 19, 2003
  3. jack
    Replies:
    4
    Views:
    576
  4. tim

    hex string to hex value

    tim, Nov 22, 2005, in forum: Python
    Replies:
    8
    Views:
    18,797
  5. tim
    Replies:
    2
    Views:
    1,541
    Dennis Lee Bieber
    Nov 23, 2005
Loading...

Share This Page