#! /bin/sh
#
# mouse:~ppr/src/pprpopup/fig2tid
# Last modified 28 March 2002.
# 

#
# This program takes a FIG file as input and produces Tcl image data as
# output.
#

# First convert FIG to GIF, using #f0f0f0 for the background.
fig2dev -L gif -g '#f0f0f0' $1.fig >$1-temp.gif

# Now make the background colour transparent.
giftrans -t '#f0f0f0' $1-temp.gif >$1.gif


# Base 64 encode the GIF.
uuencode -m $1.gif <$1.gif | sed -e '/^begin-base64/d' -e '/^====$/d' >$1.tid

# Remove the intermediate files.
rm $1-temp.gif $1.gif

# Let's see what we got.
ls -l $1.*

exit 0


