This supports more test cases and a reduced licence keyword (now licensing).
The extra text cases require more slack in pngstest.c
Signed-off-by: John Bowler <jbowler@acm.org>
If a gamma encoded file that has a gamma not matching that of sRGB is passed to
the simplified API the previous code simply interpreted it as a power law
encoding. However old Mac files had a power law correction of 1.45 built in to
the encoding, even though the display devices were consistent with sRGB.
Assuming a power law encoding results in substantial differences in the
interpretation of low 8-bit values; below 10. For example an Apple '5' which is
equivalent to an sRGB '17' ends up as the value '8'.
This patch provides some measure of correction for this by making the gamma
correction done within the simplified API assume that any encoded data is
encoded relative to an sRGB-like transfer function; the data is corrected back
to the PNG-nominal 2.2 value then decoded to linear (if required) using the sRGB
transfer function.
This reduces the errors reported by pngstest for such files (colormapped ones)
but still leaves the issue with files where the standard libpng code does the
gamma decoding. To cope with the latter cases the patch also includes a new
pngstest-errors which allows the result, however this is still a
work-in-progress; a better solution is possible.
Signed-off-by: John Bowler <jbowler@acm.org>
Splitting the machine generated error structs out to a file allows the values to
be updated without changing pngstest.c itself, sine libpng 1.6 and 1.7 have
slightly different error limits this simplifies maintenance.
makepngs.sh has also been updated to more accurately reflect current problems in
libpng 1.7
Signed-off-by: John Bowler <jbowler@acm.org>