tests/pngstest-* are changed so that the new test files are divided into 8
groups by gamma and alpha channel. This makes each test take just under 5
seconds on a moderately up-to-date x86_64 system using libpng16 (test times are
somewhat variable under libpng17 at present because of the lack of optimization
in some gamma processing paths.)
These tests have considerably better code and pixel-value coverage than
contrib/pngsuite however coverage is still incomplete.
Signed-off-by: John Bowler <jbowler@acm.org>
input that was made in version 1.6.17beta01, to preserve legacy
behavior even though it was incorrect. Instead, added new API
png_set_filter_16() and png_set_add_alpha_16() that set a flag to
make png_do_read_filter() interpret the filler bytes properly.
Splitting the machine generated error structs out to a file allows the values to
be updated without changing pngstest.c itself, since libpng 1.6 and 1.7 have
slightly different error limits this simplifies maintenance.
Signed-off-by: John Bowler <jbowler@acm.org>
This is a patch for libpng16.
It incorporates fixes to the low-bit-depth gray background handling from
libpng17 and turns one of the low-bit-depth gray cases that does work (and,
indeed, did work before) in libpng16
Signed-off-by: John Bowler <jbowler@acm.org>
This updates libpng16 with all the test changes from libpng17,
including changes to pngvalid.c to ensure that the original,
distributed, version of contrib/visupng/cexcept.h can be used.
pngvalid contains the correction to the use of SAVE/STORE_
UNKNOWN_CHUNKS; a bug revealed by changes in libpng 1.7. More
tests contain the --strict option to detect warnings and the
pngvalid-standard test has been corrected so that it does not
turn on progresive-read (there is a separate test which does
that.)
Some signed/unsigned fixes have been made.
Signed-off-by: John Bowler <jbowler@acm.org>
replacing the value that is illegal in the PNG spec, in both signed and
unsigned values, with 0. Illegal unsigned values (anything greater than or equal
to 0x80000000) can still pass through, but since these are not illegal
in ANSI-C (unlike 0x80000000 in the signed case) the checking that
occurs later can catch them (John Bowler).
0x8000 flag definitions on 16-bit systems. They aren't supported
yet the defs *probably* work, however it seems much safer to do this
and be advised if anyone, contrary to advice, is building libpng 1.6
on a 16-bit system. It also adds back various switch default clauses
for GCC; GCC errors out if they are not present (with an appropriately
high level of warnings).