2440 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
4c1ee27962 [libpng17] Fixed a syntax error in tests/pngstest that some shells other than
bash could not parse (Bug report by Nelson Beebe).
2015-12-09 13:29:02 -06:00
Glenn Randers-Pehrson
26090a5f43 [libpng17] Bump version to 1.7.0beta73 2015-12-08 13:03:30 -06:00
Glenn Randers-Pehrson
bfd8446816 [libpng17] Imported from libpng-1.7.0beta72.tar v1.7.0beta72 2015-12-08 12:56:55 -06:00
Glenn Randers-Pehrson
605f8d046f [libpng17] Update CHANGES and ANNOUNCE 2015-12-06 20:12:23 -06:00
John Bowler
b8ab93dc6f Fix stack smaller in write png_copy_row
This also resulted in PNG data with random row bytes.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-06 11:12:17 -08:00
John Bowler
66b53bdd37 Merge remote-tracking branch 'code/libpng17-20151204' into libpng17-71-1 2015-12-06 10:41:58 -08:00
Glenn Randers-Pehrson
dcbc357c46 [libpng17] Bump version to 1.7.0beta72 2015-12-05 13:58:01 -06:00
Glenn Randers-Pehrson
8ac1821831 [libpng17] Imported from libpng-1.7.0beta71.tar v1.7.0beta71 2015-12-05 13:52:36 -06:00
Glenn Randers-Pehrson
3407d0f7c4 [libpng17] Updated CHANGES and ANNOUNCE 2015-12-05 13:51:07 -06:00
John Bowler
c8d2efcb50 Fix g++ builds
enums are (int), G++ objects to (int) and (unsigned) being used together in ?:

Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-03 17:17:42 -08:00
Glenn Randers-Pehrson
99436a407e [libpng17] Bump version to 1.7.0beta71 2015-12-03 17:54:53 -06:00
John Bowler
59136cc3b3 Fix build break in no-write-filters cases
Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-03 14:12:05 -08:00
John Bowler
afbaf7150b Merge branch 'libpng17' into libpng17-20151201
MASSIVE merge conflicts; way beyond those reported here:

Conflicts:
	pngstruct.h
	pngwutil.c
	scripts/pnglibconf.h.prebuilt
2015-12-03 13:47:39 -08:00
John Bowler
86499967c3 Checkpoint for 'methodical' filter selection
This checkpoint is to allow the massive merge with the recent mainline libpng17
changes.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-03 13:25:11 -08:00
Glenn Randers-Pehrson
028d2c3fd6 [libpng17] Bump version to 1.7.0beta71 2015-12-03 10:15:25 -06:00
Glenn Randers-Pehrson
47ed19dfce [libpng17] Bump version to 1.7.0beta71 2015-12-02 22:31:19 -06:00
Glenn Randers-Pehrson
94a5189b1c [libpng17] Imported from libpng-1.7.0beta70.tar v1.7.0beta70 2015-12-02 22:30:47 -06:00
John Bowler
9fce04fcd6 Change option (SUPPORTED) names, dummy code
The filter selection options are made more intuitive (IMO, but I am not an
Intuitive User).  Dummy code added for methodical filter selection.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-02 19:03:28 -08:00
John Bowler
71c5123a4d Merge branch 'libpng17' into libpng17-20151201 2015-12-02 17:10:45 -08:00
John Bowler
e9d567d9ec Filter heuristic implementation
This implements the heuristic part of filter selction, the methodic testing
approach is still not implemented.  png_set_option methods are incomplete.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-02 17:08:17 -08:00
Glenn Randers-Pehrson
37a50281cf [libpng17] Reverted recent manual change. The additional restrictions
on the order of png_set_PLTE, png_set_tRNS, and png_set_hIST are
not necessary.
2015-12-01 17:23:54 -06:00
Glenn Randers-Pehrson
aacda27449 [libpng17] Updated ANNOUNCE and CHANGES 2015-12-01 11:35:57 -06:00
Glenn Randers-Pehrson
b427d7216d Merge branch 'libpng17-20151130' of git://github.com/jbowler/libpng-1 into libpng17 2015-12-01 11:20:41 -06:00
Glenn Randers-Pehrson
c46bd30b51 [libpng17] Updated manual to require png_set_PLTE() to precede png_set_tRNS()
and png_set_hIST() if either is present.
2015-12-01 11:13:44 -06:00
John Bowler
0f2f0f7bbd Merge branch 'libpng17' into libpng17-20151130 2015-12-01 08:41:45 -08:00
John Bowler
84a8bb8244 Make png_struct palette, trans_alpha private
This removes the side-effect on the png_struct palette of calling png_set_PLTE
or png_set_tRNS.  NOTE: this is a quiet API change, it was possible before to
alter the palette on a PNG image by using png_set_PLTE, but this was unintended
and inconsistent with the other png_set APIs.

Fix a bug in palette index checking; png_struct::num_palette could, in
principle, get changed by the transformations (e.g. png_set_quantize) and this
would invalidate the check.  The palette checking init function now makes a copy
of png_struct::num_palette.

Fix a bug in pngvalid error handling.  A png_error in png_write_info is not
continuable (a valid image cannot necessarily be written afterward) because the
png_error aborts the write of subsequent pre-IDAT chunks.  In particular an
abort as a result of a bogus colorspace information (gAMA, cHRM, sBIT etc)
prevents the write of the PLTE chunk.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-01 08:16:53 -08:00
John Bowler
8fe2eac47f Separate png_compress_IDAT into w/c
I.e. write/compress, also remove some trailing spaces and clean up pnglibconf
stuff.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-30 21:00:22 -08:00
Glenn Randers-Pehrson
cb3402221b [libpng17] Updated PNG_ZBUF_SIZE definition in scripts/pnglibconf.h.prebuilt 2015-11-30 17:50:39 -06:00
Glenn Randers-Pehrson
8978eba436 [libpng17] Update CHANGES and ANNOUNCE, update dates in png.c and png.h 2015-11-30 16:57:23 -06:00
John Bowler
4792c8a751 compression code unification
Unify the compression code so that inflate calls are localized to a common
routine.  Ground work for filter selection support.  Minor API changes to use
void* not byte* for data parameters.  Unification of some of the compression
code with the decompression code; IDAT_size replaces IDAT_read_size and
zbuffer_size, IDAT reading and writing is no longer controlled by the size of
the compression buffer.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-30 13:39:49 -08:00
John Bowler
6bbc74d880 pngunknown fix for multiple IDAT chunks
Fixes the case where IDAT is treated as unknown and saved; the first IDAT chunk
ends up 'before' IDAT, the rest 'after', pngunknown has to take this into
account since it checks before and after.
2015-11-28 08:42:54 -08:00
John Bowler
b3a18efebf Filter code change prep.
This commit moves code round and changes the filter write interfaces that took
png_uint_32 buffer pixel counts to unsigned int.  Also moves compression code
and definitions into pngwutil.c so that the compression code is isolated from
other definitions.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-27 15:42:52 -08:00
John Bowler
14d11b9f35 contrib space removal
Remove all trailing spaces from source files in contrib

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-26 09:55:37 -08:00
John Bowler
e41820cd0b Merge branch 'libpng17' into libpng17-20151124.0001 2015-11-25 16:08:20 -08:00
John Bowler
18211df70b [libpng17] Fix CMINFO bug in contrib/tools/pngfix.c 2015-11-25 16:03:47 -06:00
John Bowler
1775bdeb24 Better filter checking
Improve pngvalid coverage of filter combinations, remove the (new in 1.7) code
which disabled previous-row filters on the first row of an image in some cases.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-24 22:24:18 -08:00
John Bowler
8bffb48bc1 Add new pngvalid test case
This tests the 'size' images in the sequential reader, the existing test case
only uses the progressive reader which means that important parts of the filter
code never got tested.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-24 21:45:10 -08:00
Glenn Randers-Pehrson
edec44bfc4 [libpng17] Update CHANGES and ANNOUNCE 2015-11-24 20:45:26 -06:00
John Bowler
1c514557b6 Merge branch 'libpng17' of ../../libpng into libpng17 2015-11-24 18:17:31 -08:00
John Bowler
85d7eca204 Fix first row init on read.
The code failed to zero out the row buffer at the start of a pass where the AVG
filter is used because 'row_number' is not always zero (on interlaced images)
and, apparently, the assertion that the buffer had been zeroed when allocated
was not always correct for non-interlaced images.  Revealed by pngvalid --size
with a hack to make it always use AVG.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-24 17:56:06 -08:00
John Bowler
5357dd77f0 Fix significant bracketing problem
This error prevents the read of non-interlaced PNG files with height 1.  A
simple bracket problem caused by hasty multiple edits.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-24 17:18:46 -08:00
Glenn Randers-Pehrson
5db709d83c [libpng17] Updated CHANGES and ANNOUNCE, removed trailing blanks from *.c *.h 2015-11-24 14:38:52 -06:00
Glenn Randers-Pehrson
616ed1197b [libpng17] Bump version to 1.7.0beta70 2015-11-24 13:37:41 -06:00
Glenn Randers-Pehrson
0cb0a45721 [libpng17] Imported from libpng-1.7.0beta69.tar v1.7.0beta69 2015-11-24 09:51:46 -06:00
Glenn Randers-Pehrson
f476f13488 [libpng17] Updated CHANGES and ANNOUNCE 2015-11-23 21:44:18 -06:00
John Bowler
8d93ec2eca pngvalid fixes and backward compat
This fix is to the PNG_MAX_GAMMA_8 handling and png_set_rgb_to_gray, which had
bugs which were likely to expose end cases of rgb-to-gray conversion errors.
This might explain some of the machine math dependencies we are seeing
(*might*).

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-23 18:45:28 -08:00
John Bowler
b0076faf1f Backward compatibility with 1.6
1.6 did not define PNG_READ_PNG_SUPPORTED, ever; it doesn't matter there.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-23 18:14:57 -08:00
John Bowler
fa86bd2a61 Backward compatibility for pngtest.c
This version can be used in 1.6 and 1.5 with appropriate changes to the last
line.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-23 18:13:39 -08:00
John Bowler
961d60b067 Correct end-of-image test in pngread.c
This only changes the detection of invalid application behavior (too many calls
to png_read_row) from an affirm to a png_app_error.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-11-23 18:12:17 -08:00
John Bowler
764ae07652 Merge branch 'libpng17' into libpng17-buffer-enhancements 2015-11-22 21:40:13 -08:00