2440 Commits

Author SHA1 Message Date
John Bowler
6803b09cb7 Fixes for !READ_INTERLACE/!READ_PNG interpendencies
The reliance of png_read_png on interlace handling and some minor issues in the
test programs where they failed to correctly check for interlace handling were
exposed by the ability to write interlaced images even if WRITE_INTERLACING is
turned off.  This is fixed here.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-22 21:37:16 -08:00
Glenn Randers-Pehrson
7a7e4367d0 [libpng17] Updated CHANGES and ANNOUNCE 2015-11-22 23:16:01 -06:00
John Bowler
b69df74b8e Re-remove PNG_WRITE_INTERLACE
Previous change backed out.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-22 20:48:23 -08:00
John Bowler
a42416de9c Merge branch 'libpng17' into libpng17-buffer-enhancements 2015-11-22 20:43:56 -08:00
Glenn Randers-Pehrson
e51652b4db [libpng17] Reverted 12 -> 12U again. 2015-11-22 22:41:10 -06:00
Glenn Randers-Pehrson
771eb7d01e [libpng17] Update CHANGES, ANNOUNCE, pnglibconf.h.prebuilt 2015-11-22 22:35:35 -06:00
John Bowler
368bb1b241 Fix certain minimal config builds
The removal of png_struct::row_buffer and png_struct::row_format from write
builds configured without filter or transform support (respectively) wasn't
complete; some of the png.c and pngwrite.c cleanup code needed to handle the
potentially removed members.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-22 20:34:00 -08:00
John Bowler
504ebd427d Back out READ/WRITE_INTERLACING changes
Now that the code works consistently so that these just switch off the support
for having libpng do the interlace/deinterlace the old names make more sense,
restoring them avoids cruft in the configuration file and avoids an unnecessary
version specific change.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-22 20:25:24 -08:00
John Bowler
caa716d859 Fix build break introduced from libpng17
12->12U in a compare when the other side is signed.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-22 19:52:12 -08:00
John Bowler
0f2554a5e6 Squashed commit of the following:
commit fc4b42b1d56f95efeb1b9fe42dc35b7d98d246bb
Merge: 74516c7 9eb1413
Author: John Bowler <jbowler@acm.org>
Date:   Sun Nov 22 19:37:54 2015 -0800

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 74516c7257f1a28a69985684c5673caa390c700a
Author: John Bowler <jbowler@acm.org>
Date:   Sun Nov 22 19:32:43 2015 -0800

    Make check full pass on gcc/g++ x86_64

    Signed-off-by: John Bowler <jbowler@acm.org>

commit e891e34737fc0bc9ee873a5d56b83c1e777b990c
Author: John Bowler <jbowler@acm.org>
Date:   Sun Nov 22 12:01:37 2015 -0800

    Checkpoint: write buffering changes

    This version fails in pngvalid --size because of an error handling very narrow
    images, otherwise a standard build passes make check.

    Signed-off-by: John Bowler <jbowler@acm.org>

commit 457a046ebdab737eefb477126cf855e49df6de50
Author: John Bowler <jbowler@acm.org>
Date:   Sun Nov 22 06:39:36 2015 -0800

    Fix previous bad merge

commit b4f426c97267317637d43f41fe0b05d1659bc63d
Merge: 07b9b90 a3458a6
Author: John Bowler <jbowler@acm.org>
Date:   Sun Nov 22 06:32:34 2015 -0800

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 07b9b90dfd653b744dbc3710b096facf6b4605f6
Merge: ed43306 5592e0b
Author: John Bowler <jbowler@acm.org>
Date:   Sat Nov 21 17:07:23 2015 -0800

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit ed43306599f7039a90187862db82273fca3a4c3d
Merge: 772aed7 d3c0359
Author: John Bowler <jbowler@acm.org>
Date:   Tue Nov 17 17:47:26 2015 -0800

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 772aed72378df9c8fccc5a4594b095d02d410a9c
Merge: 73ae431 801608f
Author: John Bowler <jbowler@acm.org>
Date:   Mon Nov 16 14:26:38 2015 -0800

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 73ae4316cb6db7d7f6756583a1c213c35ca4e3f4
Merge: 687e6e3 c09b3ab
Author: John Bowler <jbowler@acm.org>
Date:   Sun Nov 15 09:31:30 2015 -0800

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 687e6e393e9d0220c2a12ec474aa01b83c5e9f25
Merge: fedd6da e916d9b
Author: John Bowler <jbowler@acm.org>
Date:   Thu Nov 5 08:45:14 2015 -0800

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit fedd6da8798a14b2e002b0bc1379f5a09a03598a
Merge: 2e2fc5f ea41fd2
Author: John Bowler <jbowler@acm.org>
Date:   Tue Nov 3 21:05:01 2015 -0800

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 2e2fc5f6d7678b710c52b7ea081ac4add677d8d5
Merge: 990d5f8 5b05197
Author: John Bowler <jbowler@acm.org>
Date:   Mon Oct 12 08:28:30 2015 -0700

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 990d5f88688635dc0888657b689e30ffe7e7a7b3
Author: John Bowler <jbowler@acm.org>
Date:   Sun Oct 4 17:04:53 2015 -0700

    Read row buffer changes

    The read code now allocates one row buffer of the size of the input PNG row and,
    only if required, one buffer of the size of the output.

    The output buffer is required for the progressive reader (always) and for the
    sequential reader if libpng is de-interlacing an image (because the output row
    is used multiple times if png_read_row is called with a display row parameter.)

    This should reduce memory utilization by libpng significantly, but it has no
    detectable effect on overall performance figures of the test programs, these are
    probably dominated by memory allocations for the whole image within the test
    programs.

    Signed-off-by: John Bowler <jbowler@acm.org>

commit 527bf989bf0e30440f9e07a5544a6ebb1d6fd039
Merge: 50ebbc2 9099254
Author: John Bowler <jbowler@acm.org>
Date:   Sat Oct 3 13:39:17 2015 -0700

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 50ebbc2c9a24cf1a6b428db53d55fbd5af4d6be6
Merge: 21a7f40 2cd6d56
Author: John Bowler <jbowler@acm.org>
Date:   Sat Oct 3 11:16:32 2015 -0700

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit 21a7f401ab40c79ead9e35882a8066e2cf1d6902
Merge: b512e1c 15a143e
Author: John Bowler <jbowler@acm.org>
Date:   Wed Sep 30 19:01:23 2015 -0700

    Merge branch 'libpng17' into libpng17-filter-enhancements

commit b512e1c2c5bfe6df8b6dca32f862d325ec22115e
Author: John Bowler <jbowler@acm.org>
Date:   Wed Sep 30 17:33:34 2015 -0700

    Transform rewrite: perform transforms in small chunks

    The intent of this change is to reduce the memory footprint during transform
    sequences by performing transforms in fixed (small) sized blocks of pixels.
    The change is incomplete; the filter code still works row-by-row, so the whole
    tranform also works row-by-row, the intent is to fix this so that everything
    works in small(ish) chunks.

    At present the change has no discernable effect on pngvalid --speed or pngstest
    with (e.g.) rgb-8-1.8.png; user time and (minor) page faults are the same in old
    and new versions.  The same applies to real-world 15MP PNG images; even on these
    the presence of the filter code causes a cyclical progress through memory which
    will interfere with any caching otherwise possible (useful word, 'otherwise'.)

    Signed-off-by: John Bowler <jbowler@acm.org>

commit 781cb3699b92beb0e6bc5e03cef8fba820267082
Author: John Bowler <jbowler@acm.org>
Date:   Wed Sep 30 17:12:53 2015 -0700

    Fix NO_WRITE_INTERLACE in pngvalid.c

    The support for writing interlaced images directly from libpng 1.7 was
    unintentionally disabled (INTERLACE_LAST was defined incorrectly, excluding the
    interlaced images).  This obscured the fact that the transform and error test
    case generators lacked the support for writing interlaced images from libpng.

    Signed-off-by: John Bowler <jbowler@acm.org>

commit 406ee2fd7946a384f1d7713712dc646080c5c52c
Author: John Bowler <jbowler@acm.org>
Date:   Wed Sep 30 17:11:40 2015 -0700

    Add pngvalid --transform --interlace test

    This increases code coverage by generating test cases with smaller length rows
    as a result of the interlacing.  Without this packswap handling was incompletely
    tested.

    Signed-off-by: John Bowler <jbowler@acm.org>

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-22 19:41:41 -08:00
Glenn Randers-Pehrson
9eb14136d8 [libpng17] Fixed bug recently introduced in png_set_PLTE() that uses png_ptr
not info_ptr.
2015-11-22 20:44:58 -06:00
Glenn Randers-Pehrson
09c90236f4 [libpng17] Refactored conditional compilation in png_init_row_info(). 2015-11-22 09:19:06 -06:00
Glenn Randers-Pehrson
a3458a6ba0 [libpng17] Refactor conditional compilation of png_get_compression_buffer_size()
for readability
2015-11-22 07:18:05 -06:00
Glenn Randers-Pehrson
daf4b9dd18 [libpng17] Clean up some conditional compilation of parts of statements
and fixed some indentation
2015-11-21 19:14:37 -06:00
Glenn Randers-Pehrson
3a866cb451 [libpng17] Avoid conditionally compiling parts of statements in png.c (suggested
by flaviommedeiros).
2015-11-21 18:18:26 -06:00
Glenn Randers-Pehrson
5592e0bc96 [libpng17] Use unsigned constants in pngrutil.c buffer length comparisons 2015-11-21 14:30:35 -06:00
John Bowler
57e92a8432 [libpng17] Use "1U" not "1" in pointer calculations in png_handle_sPLT(). 2015-11-19 21:13:29 -06:00
Glenn Randers-Pehrson
d3c0359b23 [libpng17] Removed a redundant new check in png_handle_pCAL(). 2015-11-17 16:14:35 -06:00
Glenn Randers-Pehrson
801608f8f4 [libpng17] Rearrange terms to make it self-evident that overflow cannot happen 2015-11-16 09:34:20 -06:00
Glenn Randers-Pehrson
c09b3ab2c7 [lbpng17] Avoid potential pointer overflow in png_handle_sPLT() and
png_handle_pCAL() (Bug report by John Regehr).
2015-11-13 22:25:03 -06:00
Glenn Randers-Pehrson
722645fec5 [libpng17] Bump version to 1.7.0beta69 2015-11-13 10:19:36 -06:00
Glenn Randers-Pehrson
f72d0d01eb [libpng17] Imported from libpng-1.7.0beta68.tar v1.7.0beta68 2015-11-12 07:13:47 -06:00
Glenn Randers-Pehrson
97c4072cce [libpng17] Clean up coding style in png_set_PLTE() 2015-11-05 11:20:12 -06:00
Glenn Randers-Pehrson
7a92725e17 [libpng17] Update ANNOUNCE and CHANGES 2015-11-05 07:06:01 -06:00
Glenn Randers-Pehrson
e916d9bb60 [libpng17] Fixed new bug with CRC error after reading an over-length palette. 2015-11-04 23:49:01 -06:00
Glenn Randers-Pehrson
ea41fd2161 [libpng17] Bump version to 1.7.0beta68 2015-11-03 09:55:12 -06:00
Glenn Randers-Pehrson
dbd98b8c68 [libpng17] Imported from libpng-1.7.0beta67.tar v1.7.0beta67 2015-11-03 09:55:02 -06:00
Glenn Randers-Pehrson
5cf6ed45c8 [libpng17] Clarified COPYRIGHT information to state explicitly that versions
are derived from previous versions.
Removed much of the long list of previous versions from png.h and
    libpng.3.
2015-11-03 09:47:54 -06:00
Glenn Randers-Pehrson
9f7d5aa973 [libpng17] Prevent setting or writing over-length PLTE chunk (Cosmin Truta).
Silently truncate over-length PLTE chunk while reading.
2015-11-01 13:01:56 -06:00
Glenn Randers-Pehrson
5b05197604 [libpng17] Added sPLT support to pngtest.c 2015-10-10 12:04:50 -05:00
Glenn Randers-Pehrson
90992547c7 [libng17] Updated CHANGES and ANNOUNCE 2015-10-03 15:11:12 -05:00
John Bowler
13ce05daaf Fix 'pow' macros in pngvalid.c
It is legal for 'pow' to be a macro, therefore the argument list cannot contain
preprocessing directives.  Make sure pow is a function where this happens (this
is a minimal safe fix, the issue only arises in non-performance-critical code.)

Signed-off-by: John Bowler <jbowler@acm.org>
2015-10-03 11:08:03 -07:00
John Bowler
2cd6d56ff6 Merge remote-tracking branch 'local/libpng17' into libpng17 2015-10-03 11:04:31 -07:00
Glenn Randers-Pehrson
1af270dc19 [libpng17] Bump version to 1.7.0beta67 2015-10-02 14:06:12 -05:00
Glenn Randers-Pehrson
2ddd06c392 [libpng17] Imported from libpng-1.7.0beta66.tar v1.7.0beta66 2015-10-02 13:44:50 -05:00
Glenn Randers-Pehrson
33d4b5b66d [libpng17] Another attempt (successful this time) to quiet the Coverity issue. 2015-10-02 13:43:36 -05:00
John Bowler
15a143e85e Merge remote-tracking branch 'local/libpng17' into libpng17 2015-09-30 19:00:43 -07:00
Glenn Randers-Pehrson
bd55022b2d [libng17] Stifle the last remaining Coverity issue in libpng17. 2015-09-28 15:41:47 -05:00
John Bowler
c5bc9b668d Fix (work round) rgb-to-gray issues in libpng 1.6
The previous attempts to ignore the errors in the code aren't quite enough to
deal with the 'channel selection' encoding added to libpng 1.7; abort.
pngvalid.c is changed to drop this encoding in prior versions.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-09-26 21:43:07 -07:00
Glenn Randers-Pehrson
975d8fac6d [libpng17] Update CHANGES and ANNOUNCE 2015-09-26 21:14:36 -05:00
John Bowler
e76a320539 Fix missing prototype for READ_GAMMA+!SIMPLIFIED_API
Signed-off-by: John Bowler <jbowler@acm.org>
2015-09-26 17:17:13 -07:00
John Bowler
eab2c419fa makepng fixes for the palette case
Also allow extra command line arguments; convenient for testing odd things.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-09-26 16:44:29 -07:00
John Bowler
23324b8559 sBIT code coverage and fixes
Fixes for sBIT handling in the low-bit-depth gray and pngstest cases, extends
sBIT handling to the colormap code in the simplified API which is separately
implemented in pngread.c

Signed-off-by: John Bowler <jbowler@acm.org>
2015-09-26 15:24:20 -07:00
John Bowler
8dfa93beed Merge remote-tracking branch 'local/libpng17' into libpng17 2015-09-26 15:17:27 -07:00
Glenn Randers-Pehrson
ed44394ad0 [libpng17] Added "option READ_IMAGE on" to contrib/pngminim/decoder/pngusr.dfa
due to the new PNG_READ_IMAGE_SUPPORTED configuration in libpng-1.7.0beta65.
2015-09-26 07:55:54 -05:00
Glenn Randers-Pehrson
c23bdb1445 [libpng17] #ifdef out some dead code in pngrtran.c when sBIT is disabled. 2015-09-25 22:33:41 -05:00
John Bowler
cbf4adee5c Merge remote-tracking branch 'local/libpng17' into libpng17 2015-09-25 17:04:06 -07:00
John Bowler
1bc0781245 Merge remote-tracking branch 'local/libpng17' into libpng17 2015-09-25 17:01:16 -07:00
Glenn Randers-Pehrson
7441965463 [libpng17] Update CHANGES and ANNOUNCE 2015-09-25 18:54:12 -05:00
John Bowler
8d6c21ce96 pngvalid tests: add --strict, fix test names
Signed-off-by: John Bowler <jbowler@acm.org>
2015-09-25 16:43:34 -07:00