2010-12-07 23:33:17 -05:00
|
|
|
#!/bin/sh
|
2010-12-08 17:26:21 -05:00
|
|
|
#
|
|
|
|
# Run a sequence of gamma tests quietly
|
|
|
|
err=0
|
2010-12-08 18:26:50 -05:00
|
|
|
|
|
|
|
echo >> pngtest-log.txt
|
|
|
|
echo "============ pngvalid-full.sh ==============" >> pngtest-log.txt
|
|
|
|
|
2011-01-28 07:38:14 -05:00
|
|
|
echo "Running test-pngvalid-full.sh"
|
2011-05-07 22:00:28 -04:00
|
|
|
for gamma in threshold transform sbit 16-to-8 background alpha-mode
|
2010-12-08 17:26:21 -05:00
|
|
|
do
|
2011-05-07 22:00:28 -04:00
|
|
|
# For the moment the composition calculation is performed with minimal
|
|
|
|
# accuracy, do this to work round the problem:
|
|
|
|
if test $gamma = background -o $gamma = alpha-mode
|
|
|
|
then
|
|
|
|
opts=--use-linear-precision
|
|
|
|
else
|
|
|
|
opts=
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ./pngvalid $opts "--gamma-$gamma" >> pngtest-log.txt 2>&1
|
2010-12-08 17:26:21 -05:00
|
|
|
then
|
2011-01-28 07:38:14 -05:00
|
|
|
echo " PASS:" pngvalid "--gamma-$gamma"
|
2010-12-08 17:26:21 -05:00
|
|
|
else
|
2011-01-28 07:38:14 -05:00
|
|
|
echo " FAIL:" pngvalid "--gamma-$gamma"
|
2010-12-08 17:26:21 -05:00
|
|
|
err=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2010-12-08 18:26:50 -05:00
|
|
|
echo
|
|
|
|
|
2010-12-08 17:26:21 -05:00
|
|
|
exit $err
|