fd42ef9b06
Remove the '--strict' in 1.6 because of the double-gamma-correction warning, update pngstest-errors.h for the errors detected with the new contrib/testspngs PNG test files. Signed-off-by: John Bowler <jbowler@acm.org>
53 lines
1.2 KiB
Bash
Executable File
53 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Usage:
|
|
#
|
|
# tests/pngstest gamma alpha
|
|
#
|
|
# Run ./pngstest on the PNG files in $srcdir/contrib/testpngs which have the
|
|
# given gamma and opacity:
|
|
#
|
|
# gamma: one of; linear, 1.8, sRGB, none.
|
|
# alpha: one of; opaque, tRNS, alpha, none. 'none' is equivalent to !alpha
|
|
#
|
|
# NOTE: the temporary files pngstest generates have the base name gamma-alpha to
|
|
# avoid issues with make -j
|
|
#
|
|
gamma="$1"
|
|
shift
|
|
alpha="$1"
|
|
shift
|
|
exec ./pngstest --tmpfile "${gamma}-${alpha}-" --log ${1+"$@"} $(
|
|
for f in "${srcdir}/contrib/testpngs/"*.png
|
|
do
|
|
g=
|
|
case "$f" in
|
|
*-linear[.-]*)
|
|
test "$gamma" = "linear" && g="$f";;
|
|
|
|
*-sRGB[.-]*)
|
|
test "$gamma" = "sRGB" && g="$f";;
|
|
|
|
*-1.8[.-]*)
|
|
test "$gamma" = "1.8" && g="$f";;
|
|
|
|
*)
|
|
test "$gamma" = "none" && g="$f";;
|
|
esac
|
|
|
|
case "$g" in
|
|
"")
|
|
:;;
|
|
|
|
*-alpha[-.]*)
|
|
test "$alpha" = "alpha" && echo "$g";;
|
|
|
|
*-tRNS[-.]*)
|
|
test "$alpha" = "tRNS" -o "$alpha" = "none" && echo "$g";;
|
|
|
|
*)
|
|
test "$alpha" = "opaque" -o "$alpha" = "none" && echo "$g";;
|
|
esac
|
|
done
|
|
)
|