112 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
b1d49de5bc [libpng17] Happy New Year -- update copyright year. 2014-12-31 18:43:44 -06:00
John Bowler
28451a8797 [libpng17] Implement previously untested libpng transforms in pngvalid.c 2014-12-29 14:18:50 -06:00
John Bowler
a5b6764cea [libpng17] Added testing of png_set_packing() to pngvalid.c 2014-12-27 19:11:41 -06:00
Glenn Randers-Pehrson
b23a10f565 [libpng17] Imported from libpng-1.7.0beta43.tar 2014-12-18 09:00:17 -06:00
John Bowler
201e9144a6 [libpng17] Quiet a "comparison always true" warning in pngstest.c (John Bowler). 2014-12-16 19:16:18 -06:00
John Bowler
f87df31c8c [libpng17] Fixed GCC unsigned int->float warnings. Various versions of GCC
seem to generate warnings when an unsigned value is implicitly
    converted to double. This is probably a GCC bug but this change
    avoids the issue by explicitly converting to (int) where safe.
  Free all allocated memory in pngimage. The file buffer cache was left
    allocated at the end of the program, harmless but it causes memory
    leak reports from clang.
  Fixed array size calculations to avoid warnings. At various points
    in the code the number of elements in an array is calculated using
    sizeof.  This generates a compile time constant of type (size_t) which
    is then typically assigned to an (unsigned int) or (int). Some versions
    of GCC on 64-bit systems warn about the apparent narrowing, even though
    the same compiler does apparently generate the correct, in-range,
    numeric constant.  This adds appropriate, safe, casts to make the
    warnings go away.
2014-11-05 18:53:01 -06:00
Glenn Randers-Pehrson
4f8050416f [libpng17] Merge pngvalid.c and pngfix.c with libpng-1.6.14beta04 2014-09-28 10:37:26 -05:00
Glenn Randers-Pehrson
776d1768aa [libpng17] Merge pngvalid.c with libpng-1.6.14beta04. 2014-09-27 19:30:35 -05:00
Glenn Randers-Pehrson
4a67ac3f1e [libpng17] Imported from libpng-1.7.0beta36.tar 2014-09-27 18:52:47 -05:00
Glenn Randers-Pehrson
1a9c06b11a [libpng17] Imported from libpng-1.7.0beta35.tar 2014-08-06 09:10:02 -05:00
Glenn Randers-Pehrson
b407af6503 [libpng17] Imported from libpng-1.7.0beta34.tar 2014-03-17 13:19:20 -05:00
Glenn Randers-Pehrson
f99393490d [libpng17] Imported from libpng-1.7.0beta32.tar 2014-02-26 12:54:47 -06:00
John Bowler
2ced844b0e [libpng17] Deleted a now-redundant #define png_error from pngvalid.c 2014-02-16 22:51:23 -06:00
Glenn Randers-Pehrson
9a3f244085 [libpng17] Imported from libpng-1.7.0beta31.tar 2014-02-05 22:46:04 -06:00
Glenn Randers-Pehrson
98b9371115 [libpng17] Fixed some typos in commentary of pngimage.c 2014-02-05 13:21:41 -06:00
John Bowler
dc63b03da1 [libpng17] Completed full working pngimage test program and added two test
scripts.  Fixed combination of ~alpha with shift. On read invert alpha,
processing occurred after shift processing, which causes the final values to be
outside the range that should be produced by the shift. Reversing the
order on read makes the two transforms work together correctly and mirrors
the order used on write.
2014-02-05 11:39:59 -06:00
Glenn Randers-Pehrson
302c58b8cf [libpng17] Added pngimage test program for png_read_png and png_write_png.
This is a work-in-progress; no tests are run automatically at present and
the program by virtue of exhaustively testing all the transforms is
very slow.
2014-01-31 22:00:27 -06:00
Glenn Randers-Pehrson
39fee3cee1 [libpng17] Fixed a large number of instances where PNGCBAPI was omitted from
function definitions.
2014-01-31 21:55:27 -06:00
Glenn Randers-Pehrson
28711dff2a [libpng17] Updated copyright year in recently-changed files. 2013-12-31 21:15:11 -06:00
John Bowler
206d1eed42 [libpng17] Changed pngvalid.c to support libpng 1.5, which does not support
the PNG_MAXIMUM_INFLATE_WINDOW option, so #define it out when
appropriate in pngvalid.c
2013-12-29 15:57:30 -06:00
John Bowler
114fa16ab3 [libpng17] Fixed test programs for interlace options. Made pngvalid.c and
pngtest.c work correctly when READ_INTERLACING and/or WRITE_INTERLACING
are switched off.
2013-12-29 10:33:58 -06:00
John Bowler
e98229ceb0 [libpng17] Merged with 1.5 and 1.6 changes to create a single pngvalid.c 2013-12-27 08:04:49 -06:00
John Bowler
ad1a4c8cc3 [libpng17] Added libpng 1.5 checks to pngvalid.c 2013-12-27 07:53:50 -06:00
Glenn Randers-Pehrson
9e168ea2c9 [libpng17] Merged files with version 1.6.8 that have not changed since then. 2013-12-19 20:33:08 -06:00
John Bowler
158c947ce2 [libpng17] Revert recent change to pngvalid.c. 2013-11-22 18:34:37 -06:00
John Bowler
7e2707e2af [libpng17] Ported recent changes from libpng16 to libpng17
Fixed 'minimal' builds. Various obviously useful minimal configurations
  don't build because of missing contrib/libtests test programs and overly
  complex dependencies in scripts/pnglibconf.dfa. This change adds
  contrib/conftest/*.dfa files that can be used in automatic build
  scripts to ensure that these configurations continue to build.
Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder.
2013-11-22 18:01:30 -06:00
John Bowler
4b29f97f9b [libpng17] Port recent libpng-1.6.7beta03, beta04 changes to 1.7.0beta21
(mainly ARMv8 support)
2013-11-02 15:29:45 -05:00
John Bowler
091fab713c [libpng17] Simplified error message code in pngunknown. The simplification has
the useful side effect of avoiding a bogus warning generated by the latest
version of the Intel C compiler (it objects to
condition ? string-literal : string-literal).
2013-10-06 08:51:42 -05:00
John Bowler
b37a7c6674 [libpng17] Updated pngunknown.c 2013-09-30 13:11:44 -05:00
John Bowler
7657ac14f2 [libpng17] Catch up with recent libpng16 changes; unknown handling and spelling
corrections
2013-09-30 11:18:13 -05:00
John Bowler
d9f60caf72 [libpng17] Fixed default behavior of ARM_NEON_API. If the ARM NEON API option is
compiled without the CHECK option it defaulted to on, not off.
2013-09-30 08:07:18 -05:00
Glenn Randers-Pehrson
a14071d814 [libpng17] Imported from libpng-1.7.0beta16.tar 2013-07-04 22:31:06 -05:00
John Bowler
371c3d4dfd [libpng17] Install missing patch to contrib/libtests/pngunknown.c 2013-04-19 21:56:00 -05:00
Glenn Randers-Pehrson
6cf97e37af [libpng17] Bump version to 1.7.0beta08 2013-04-18 07:39:57 -05:00
Glenn Randers-Pehrson
0ddf350360 [libpng17] Corrected a misplaced closing bracket in contrib/libtests/pngvalid.c
(Flavio Medeiros).
2013-04-13 11:42:52 -05:00
John Bowler
2e92b4dfa0 [libpng16] Corrected simplified API default gamma for color-mapped output, added
a flag to change default. In 1.6.0 when the simplified API was used
to produce color-mapped output from an input image with no gamma
information the gamma assumed for the input could be different from
that assumed for non-color-mapped output.  In particular 16-bit depth
input files were assumed to be sRGB encoded, whereas in the 'direct'
case they were assumed to have linear data.  This was an error.  The
fix makes the simplified API treat all input files the same way and
adds a new flag to the png_image::flags member to allow the
application/user to specify that 16-bit files contain sRGB data
rather than the default linear.
Fixed bugs in the pngpixel and makepng test programs.
2013-03-06 22:23:40 -06:00
Glenn Randers-Pehrson
851a6265a8 [libpng17] Use parentheses consistently with #if defined()
and wrapped some long lines.
2013-02-17 15:25:29 -06:00
Glenn Randers-Pehrson
b5a7565908 [libpng17] Removed some obsolete test scripts. 2013-02-08 08:00:11 -06:00
Glenn Randers-Pehrson
b10867cdc2 [libpng17] Enable parallel tests and rearrange TESTS order to take advantage of
the massive speed improvements use a make capable of parallel builds
on a multi-CPU machine and pass the right arguments to make (-j10000
for GNU make) to get the build to run in parallel.
2013-02-07 08:26:34 -06:00
Glenn Randers-Pehrson
e355657bbe [libpng17] Imported from libpng-1.7.0alpha09.tar 2013-01-21 09:21:21 -06:00
John Bowler
fb6ba9acf4 [libpng17] Pulled changes to multi-chunk handling from libpng-1.6.0beta40. 2013-01-21 09:11:17 -06:00
John Bowler
4accd423c2 [libpng17]Fixed conceivable but difficult to repro overflow. Also added
two test programs to generate and test a PNG which should have the problem.
2013-01-10 11:01:00 -06:00
John Bowler
72389dec42 [libpng17] Cleaned up and enhanced the configure option; libpng now correctly
links and tests against zlib with a prefix; tests have been clarified; and
irrelevant or obsolete things (as defined by the autotools man page) have
been removed.
2012-12-17 09:20:02 -06:00
John Bowler
d59c19b64c [libpng17] Removed more functions that were deprecated in libpng-1.6.0:
png_malloc_default png_free_default.
  Updated some left over "1.6.0beta32" in code sources.
  Fixed a "png_structp" prototype (should be png_structrp) in arm_init.c
  Updated the version-number hack in pngvalid.c
2012-12-15 21:41:31 -06:00
Glenn Randers-Pehrson
bbabd977d1 [libpng17] Fixed some typos in comments; updated manual. 2012-12-15 17:12:48 -06:00
John Bowler
240ac287eb [libpng17]Rearranged png_struct, remove unused members, change png_set_filter
handling png_struct members rearranged - partly to reorder to avoid packing,
partly to put frequently accessed members at the start and partly to make
the grouping more clear. png_set_filter code has been rewritten and the
code shared with png_write_start_row moved to a common function.  Comments
in png.h have been made more clear. Minor fixes to
contrib/libtests/timepng.c and some of the png_*_tRNS logic, including
more error detection in png_set_tRNS.
2012-12-14 22:31:50 -06:00
John Bowler
3e42c81193 [libpng17] Made 8-bit compose and rgb_to_grayscale accuracy improvements.
These changes cause 16-bit arithmetic to be used for 8-bit data in the gamma
    corrected compose and grayscale operations.  The arithmetic errors have
    three sources all of which are fixed in this commit:
    1) 8-bit linear calculations produce massive errors for lower intensity
       values.
    2) The old 16-bit "16 to 8" gamma table code erroneously wrote the lowest
       output value into a table entry which corresponded to multiple output
       values (so where the value written should have been the closest to the
       transformed input value.)
    3) In a number of cases the code to access the 16-bit table did not round;
       it did a simple shift, which was wrong and made the side effects of (2)
       even worse.
  The new gamma code does not have the 16-to-8 problem at the cost of slighly
    more calculations and the algorithm used to minimize the number of
    calculations has been extended to all the 16-bit tables; it has advantages
    for any significant gamma correction.
2012-12-14 22:17:54 -06:00
Glenn Randers-Pehrson
9d1ddbb78f [libpng16] Fixed several typos and expanded TAB characters. 2012-11-13 19:45:53 -06:00
John Bowler
f2aacefb3f [libpng16] Added the ability for contrib/libtests/makepng.c to make a PNG with just one
color. This is useful for debugging pngstest color inaccuracy reports.
2012-11-13 19:18:53 -06:00
John Bowler
4314d63792 [libpng16] Fixed an intermittent SEGV in pngstest. 2012-11-02 14:08:29 -05:00