3 # $Id: tm-image,v 1.1 1996/09/21 15:12:12 morioka Exp $
5 # Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs; see the file COPYING. If not, write to the
19 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 # Boston, MA 02111-1307, USA.
22 if [ "$TM_TMP_DIR" = "" ]; then
26 if [ "$5" = "" ]; then
29 filename="$TM_TMP_DIR/mime$$.gif"
32 filename="$TM_TMP_DIR/mime$$.jpg"
34 "image/tiff"|"image/x-tiff")
35 filename="$TM_TMP_DIR/mime$$.tif"
38 filename="$TM_TMP_DIR/mime$$.xwd"
41 filename="$TM_TMP_DIR/mime$$.xbm"
44 filename="$TM_TMP_DIR/mime$$.pic"
47 filename="$TM_TMP_DIR/mime$$.mag"
50 filename="$TM_TMP_DIR/mime$$.img"
54 filename="$TM_TMP_DIR/$5"
57 echo "$2; $3 -> $filename"
59 tmdecode $3 $1 $filename
63 xv -geometry +1+1 $filename
64 trap 'rm -f $filename' 0 1 2 3 13 15
67 echo "extract to $filename"