3 # Make a set of test PNG files, MAKEPNG is the name of the makepng executable
4 # built from contrib/libtests/makepng.c
6 # Copyright (c) 2015 John Cunningham Bowler
8 # Last changed in libpng 1.6.20 [December 3, 2015]
10 # This code is released under the libpng license.
11 # For conditions of distribution and use, see the disclaimer
12 # and license in png.h
14 # The arguments say whether to build all the files or whether just to build the
15 # ones that extend the code-coverage of libpng from the existing test files in
17 test -n "$MAKEPNG" || MAKEPNG
=.
/makepng
21 ${MAKEPNG} $opts $1 "$3" "$4" "$3-$4$2.png"
29 mp
"--$1" "-$1" "$2" "$3"
36 mp
"--tRNS" "-tRNS" "$2" "$3"
38 mp
"--tRNS --$1" "-$1-tRNS" "$2" "$3"
47 for g
in none sRGB linear
1.8
54 mptrans
"$g" "$c" "$b"
59 mptrans
"$g" palette
8
63 for c
in gray gray-alpha rgb rgb-alpha
69 mptrans
"$g" "$c" "$b"
75 # Comments below indicate cases known to be required and not duplicated
76 # in other (required) cases; the aim is to get a minimal set that gives
77 # the maximum code coverage.
78 mpg none gray-alpha
8 # required: code coverage, sRGB opaque component
79 mpg none palette
8 # required: basic palette read
80 mpg
1.8 gray
2 # required: tests gamma threshold code
81 mpg
1.8 palette
2 # required: code coverage
82 mpg
1.8 palette
4 # required: code coverage
83 mpg
1.8 palette
8 # error limits only
84 mpg linear palette
8 # error limits only
85 mpg linear rgb-alpha
16 # error limits only
86 mpg sRGB palette
1 # required: code coverage
87 mpg sRGB rgb-alpha
16 # required: code coverage: pngread.c:2422 untested
91 echo "$0 $1: unknown argument, usage:" >&2
92 echo " $0 [--all|--coverage|--small]" >&2