Louie Crew's Tricks:GIF:Decoding Graphics Files

Decoding GIF Files


GIF files (files ending with *.gif) are graphics files, and provide you
a way to view pictures and to share them with others.  You can even
include them in your own home page in ways that allow viewers to see them.

GIF files on the network (as on nn groups) have been encoded.  That is,
they have been converted from binary to text format so that they can
go across the mail routes, which expect text.  Otherwise, the binary 
code would confuse the mailers, and drastic corruptions would occur in
the graphics (or program files) which you are trying to share.

An encoded file must be decoded.  You will see many of these on the
mailing lists, especially on nn.  First, save the message which has
a gif file in it, by using nn's 'w' command.  For example, if you are 
reading a message which has a gif file in it, save as 'bell' if the
gif is a gif of a bell.  Then leave nn and find 'bell.' Since nn has
some directory conventions of its own, 'bell' may or may not be on
your root directory.  If it is, it will show up when you enter:

     ls bell

If it does not show up, then type


     ls */bell

One of those two commands will find it.

 (it will tell you so, eitehr in 

Move to its directory and enter

     uudecode bell
     ls *.gif

The first line here will execute the decoding.  The second will find the
new gif file.  Its name will have been chosen by the one who created
the gif file, not by you.  You can sometimes find the name to expect
if you check the top lines of 'bell'

If you have trouble with any of these routines, you will be wise
to edit 'bell' with emacs and delete lines at the top to the point
where the file says "cut to here."  I find that uudecode often finds
that spot without my having to cut it.

Next you will need a viewing program to see your *.gif file.  Ask in
the labs for help on that one.  

You will also need to download your gif file as a binary file.  See
RUCS handouts for ftp (file transfer program) in the labs; see 
Procomm Uploads/Downloads

Reversing the process.... If you have a *.gif file you want to share. UPLOAD it to your network as a binary file: xmodem -rb file At the pegasus prompt, that means 'receive file as binary'. Then with your communications program, you will need to enter the commands to upload it from your computer. Once you have the file on pegasus, enter uuencode file.gif file2 'file2' will be the encoded version of your gif. You may insert it anywhere in an outgoing message. Enjoy!