File: test-unx

package info (click to toggle)
giflib 3.0-11
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,052 kB
  • ctags: 967
  • sloc: ansic: 11,668; sh: 223; makefile: 212; perl: 54
file content (57 lines) | stat: -rwxr-xr-x 1,802 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
#
# Tests for the GIFLIB utilities.
# Usage:
#	test-unx [GIF_DIR] [display_prgm]
#
#   This test assumes the gif_lib utilities are available from one of the
# path directories, and that GIF_DIR is set (directly or through command line)
# to the directory holding these gif files:
# 1. solid2.gif
# 2. cover.gif
# 3. porsche.gif
#   In addition, set GIF_DISPLAY ( directly or through command line) to the
# program to display gif files in our system.
#
# Gershon Elber, Feb 90.  Rewritten by Eric Raymond, December 1995.
#
PATH=$PATH:./util
GIF_DIR=${1:-./pic}
GIF_DISPLAY=${2:-gif2x11}

echo "The Porsche."
echo "$GIF_DISPLAY <$GIF_DIR/porsche.gif"

echo "The Porsche composited with a generated background"
gifbg -d tl -s 320 200 -c 255 255 255 -l 64 > bg1.gif
gifcomb $GIF_DIR/porsche.gif bg1.gif | $GIF_DISPLAY
rm -f bg1.gif

echo "Color density report on the TNHD cover image"
gifhisto -t $GIF_DIR/cover.gif | sort -r | more

echo "Color histogram of the Porsche image"
gifhisto -b -s 200 512 $GIF_DIR/porsche.gif | gifflip -l | $GIF_DISPLAY

echo "The #2 solid flipped on its side"
gifflip -r $GIF_DIR/solid2.gif | gifrsize | $GIF_DISPLAY

echo "TNHD cover flipped on its side"
gifflip -x $GIF_DIR/cover.gif | $GIF_DISPLAY

echo "Scale the #2 solid by 0.45"
cp $GIF_DIR/solid2.gif sall.gif
gifrsize -s 0.45 sall.gif | $GIF_DISPLAY
rm -f s?.gif sall.gif

echo "Reposition the Porsche image"
gifpos -s 720 348 -i 400 148 $GIF_DIR/porsche.gif | $GIF_DISPLAY

echo "Resize the #2 solid image"
gifrsize -S 800 600 $GIF_DIR/solid2.gif | $GIF_DISPLAY

echo "Clip, crop, and resize the #2 solid image"
gifclip -i 222 0 390 134 $GIF_DIR/solid2.gif | gifpos -s 169 135 | gifrsize -s 2.0 | $GIF_DISPLAY

echo "Rotate the cover image by 45 degrees" 
gifrotat -a 45 $GIF_DIR/cover.gif | $GIF_DISPLAY