This is where I found mpack and it did work.   
     What I did was:
     
     mpack -o tmpfile file
     
     in which tmpfile will contain something like what you gave below

     I cut this between the two blank lines which gives:
R0lGODdhQwFaAfQAAKsAqwAAAEwATBkAGYMAg2gAaDEAMZsAm7kAuaMAo5MAk7IAsosAi3EA <many 
lines deleted>
ihaK0wpymEirqEieiZHIiZjSqYxOiM9MiNd3pdf7mJkzuNmGiY4hmZmZiEthgAAOw==

        I then put it into a statment link:
        image create photo gif -data {
R0lGODdhQwFaAfQAAKsAqwAAAEwATBkAGYMAg2gAaDEAMZsAm7kAuaMAo5MAk7IAsosAi3EA <many 
lines deleted>
ihaK0wpymEirqEieiZHIiZjSqYxOiM9MiNd3pdf7mJkzuNmGiY4hmZmZiEthgAAOw==
}


and it worked.


Jim K.

______________________________ Reply Separator _________________________________
Subject: Re: [vtcl] Base64 Encoding
Author:  "J.R.Suckling" <[EMAIL PROTECTED]> at maillink
Date:    10/9/97 9:56 AM


     
     
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