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 # This code is released under the libpng license.
9 # For conditions of distribution and use, see the disclaimer
10 # and license in png.h
12 # The arguments say whether to build all the files or whether just to build the
13 # ones that extend the code-coverage of libpng from the existing test files in
15 test -n "$MAKEPNG" || MAKEPNG=./makepng
19 ${MAKEPNG} $opts $1 "$3" "$4" "$3-$4$2.png"
27 mp "--$1" "-$1" "$2" "$3"
34 mp "--tRNS" "-tRNS" "$2" "$3"
36 mp "--tRNS --$1" "-$1-tRNS" "$2" "$3"
45 for g in none sRGB linear 1.8
52 mptrans "$g" "$c" "$b"
57 mptrans "$g" palette 8
61 for c in gray gray-alpha rgb rgb-alpha
67 mptrans "$g" "$c" "$b"
73 # Comments below indicate cases known to be required and not duplicated
74 # in other (required) cases; the aim is to get a minimal set that gives
75 # the maximum code coverage.
76 mpg none gray-alpha 8 # required: code coverage, sRGB opaque component
77 mpg none palette 8 # required: basic palette read
78 mpg 1.8 gray 2 # required: tests gamma threshold code
79 mpg 1.8 palette 2 # required: code coverage
80 mpg 1.8 palette 4 # required: code coverage
81 mpg 1.8 palette 8 # error limits only
82 mpg linear palette 8 # error limits only
83 mpg linear rgb-alpha 16 # error limits only
84 mpg sRGB palette 1 # required: code coverage
85 mpg sRGB rgb-alpha 16 # required: code coverage: pngread.c:2422 untested
89 echo "$0 $1: unknown argument, usage:" >&2
90 echo " $0 [--all|--coverage|--small]" >&2