source: trunk/third/libungif/test-unx @ 15266

Revision 15266, 2.3 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15265, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# Tests for the GIFLIB utilities.
4# Usage:
5#       test-unx [display_prgm]
6#
7#   This test assumes the gif_lib utilities are available from one of the
8# path directories, and that GIF_DIR is set (directly or through command line)
9# to the directory holding these gif files:
10# 1. solid2.gif
11# 2. cover.gif
12# 3. porsche.gif
13#   In addition, set GIF_DISPLAY ( directly or through command line) to the
14# program to display gif files in our system.
15#
16# Gershon Elber, Feb 90.  Rewritten by Eric Raymond, December 1995.
17# Revised by Toshio Kuratomi December 1998.
18PATH=$PATH:./util:${SRCDIR}/util
19GIF_DIR=${SRCDIR}./pic
20GIF_DISPLAY=${1:-xv -}
21GIF_DISPLAY=${GIF_DISPLAY:-gif2x11}
22#GIF_DIR=${1:-./pic}
23#GIF_DISPLAY=${2:-gif2x11}
24
25echo "The Porsche."
26echo "$GIF_DISPLAY <$GIF_DIR/porsche.gif"
27
28echo "The Porsche composited with a generated background"
29util/gifbg -d tl -s 320 200 -c 255 255 255 -l 64 > bg1.gif
30util/gifcomb $GIF_DIR/porsche.gif bg1.gif | $GIF_DISPLAY
31rm -f bg1.gif
32
33echo "Color density report on the TNHD cover image"
34util/gifhisto -t $GIF_DIR/cover.gif | sort -r | more
35
36echo "Color histogram of the Porsche image"
37util/gifhisto -b -s 200 512 $GIF_DIR/porsche.gif | util/gifflip -l | $GIF_DISPLAY
38
39echo "The #2 solid flipped on its side"
40util/gifflip -r $GIF_DIR/solid2.gif | util/gifrsize | $GIF_DISPLAY
41
42echo "TNHD cover flipped on its side"
43util/gifflip -x $GIF_DIR/cover.gif | $GIF_DISPLAY
44
45echo "Scale the #2 solid by 0.45"
46cp $GIF_DIR/solid2.gif sall.gif
47util/gifrsize -s 0.45 sall.gif | $GIF_DISPLAY
48rm -f s?.gif sall.gif
49
50echo "Reposition the Porsche image"
51util/gifpos -s 720 348 -i 400 148 $GIF_DIR/porsche.gif | $GIF_DISPLAY
52
53echo "Resize the #2 solid image"
54util/gifrsize -S 800 600 $GIF_DIR/solid2.gif | $GIF_DISPLAY
55
56echo "Clip, crop, and resize the #2 solid image"
57util/gifclip -i 222 0 390 134 $GIF_DIR/solid2.gif | util/gifpos -s 169 135 | util/gifrsize -s 2.0 | $GIF_DISPLAY
58
59echo "Rotate the cover image by 45 degrees"
60util/gifrotat -a 45 $GIF_DIR/cover.gif | $GIF_DISPLAY
61
62echo "Copy the Porsche image (test DGifSlurp and DGifSpew)"
63util/gifspnge <$GIF_DIR/porsche.gif | $GIF_DISPLAY
64
65echo "Copy a transparent image (test extensions)"
66util/gifspnge <$GIF_DIR/x-trans.gif |$GIF_DISPLAY
67
68# echo "Copy an animated gif, that has shared colour maps"
69# util/gifspnge <$GIF_DIR/welcome2.gif | $GIF_DISPLAY
Note: See TracBrowser for help on using the repository browser.