Stewart Allen <[EMAIL PROTECTED]> wrote:
        On Wed, 8 Oct 1997, Jim Kramer wrote:
        
               I need to include gif images in my vtcl app
               and I need to keep the file standalong.  I
               know that you can use the -data option on
               image create to create the image from
               Base64 data.  My question, does any anyone
               know how to convert a gif file to base64
               encoded.
        
         I used a program called "mpack" on unix to do
         this. Unfortunately I have no pointers, but it
         should be in the standard archives.
         Alternatively, I have some Java code and C code
         which does this (but it's not in a pretty
         package). Send mail if you're interested.
        
I found mpack on  ftp://ftp.andrew.cmu.edu/pub/mpack/

Is this that you are talking about stewart?
It seems to make mime format as the output.
below is an example of what mpack produces.

Do I take the binary data( I deleted all but two lines in
the data below) and put it in a quoted string for tcl/tk
to process.

Jim, Could you send mt a small example when you get it to
work.  I do not have the time right now to puzzle it out.
But I have wanted to do this for quite some time.  Thanks.

mpack sample output below this line.
________________________________________________________________
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Subject: bk1.gif
Content-Type: multipart/mixed; boundary="-"

This is a MIME encoded message.  Decode it with "munpack"
or any other MIME reading software.  Mpack/munpack is available
via anonymous FTP in ftp.andrew.cmu.edu:pub/mpack/
---
Content-Type: image/gif; name="bk1.gif"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="bk1.gif"
Content-MD5: t4iCHcmzJaBc4e26WDtAxA==

R0lGODdhQwFaAfQAAKsAqwAAAEwATBkAGYMAg2gAaDEAMZsAm7kAuaMAo5MAk7IAsosAi3EA
<many lines deleted>
ihaK0wpymEirqEieiZHIiZjSqYxOiM9MiNd3pdf7mJkzuNmGiY4hmZmZiEthgAAOw==

-----
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).

Reply via email to