Commit Graph

148 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
619cf868e6 [libpng16] Imported from libpng-1.6.32beta01.tar 2017-07-31 17:07:23 -05:00
Glenn Randers-Pehrson
68cb0aaee3 [libpng16] Implement eXIf chunk support 2017-07-13 11:22:48 -05:00
Glenn Randers-Pehrson
14be73c8a3 [libpng16] Imported from libpng-1.6.30rc02.tar 2017-06-25 13:46:37 -05:00
Vadim Barkov
3644db298b Added VSX code to libconfig scripts 2017-02-12 12:19:01 +00:00
John Bowler
0ac91cc657 pngcp: tool to copy PNG files
This adds pngcp to the build together with a pngcp.dfa configuration test; the
test revealed some configuration bugs which are fixed by corrections to the
_SUPPORTED macros.

pngcp builds on all tested configurations and a number of bugs have been fixed
to make this happen relative to the version in libpng 1.7 contrib/examples.
pngcp.dfa will have to be different for 1.7 but pngcp.c should work fine (not
yet tested).  pngcp itself is still missing a usage message; this is a
preliminary version, although since it behaves the same way as 'cp' most unoids
shouldn't have a problem using it correctly.

Signed-off-by: John Bowler <jbowler@acm.org>
2016-07-01 11:27:43 -07:00
John Bowler
175a126a1a Simplified API: write-to-memory, overflow handling
This implements an API and provides a number of assist macros to allow an
application which uses the simplified API write to bypass stdio and write
directly to memory.

It also includes some warnings (png.h) and some check code to detect *possible*
overflow in the ROW_STRIDE and simplified image SIZE macros.  This disallows
image width/height/format that *might* overflow.  A quiet API change that limits
in-memory image size (uncompressed) to less that 4GByte and image row size
(stride) to less than 2GByte.

Signed-off-by: John Bowler <jbowler@acm.org>
2016-01-18 09:53:38 -08:00
Glenn Randers-Pehrson
912f030532 [libpng16] Removed redundant "option WRITE" from scripts/pnglibconf.dfa 2016-01-02 13:43:52 -06:00
Glenn Randers-Pehrson
67806d44c1 [libpng16] Imported from libpng-1.6.19beta01.tar 2015-07-30 11:18:15 -05:00
Glenn Randers-Pehrson
b9e5e5f5a8 [libpng16] Replaced arbitrary use of 'extern' with #define PNG_LINKAGE_*. To
preserve API compatibility, the new defines all default to "extern"
(requested by Jan Nijtmans).
2015-07-03 16:07:54 -05:00
Glenn Randers-Pehrson
20a2f9b9be [libpng16] Imported from libpng-1.6.18beta05.tar 2015-05-31 10:20:13 -05:00
Glenn Randers-Pehrson
bbe2be3f54 [libpng16] Spelling fixes: less then N -> less than N (Lauri Nurmi) 2015-03-07 13:13:11 -06:00
Glenn Randers-Pehrson
377fb53944 [libpng16] Removed some comments that the configure script did not handle
properly from scripts/pnglibconf.dfa and pnglibconf.h.prebuilt.
2015-03-05 20:59:31 -06:00
Glenn Randers-Pehrson
4b65a89cf4 [libpng16] Eliminated PNG_SAFE_LIMITS macro and restored the 1-million-column
and 1-million-row default limits in pnglibconf.dfa, that can be reset
by the user at build time or run time.  This provides a more robust
defense against DOS and as-yet undiscovered overflows.

Display user limits in the output from pngtest.
2015-02-16 22:52:07 -06:00
John Bowler
d040886dc4 [libpng16] Revised handling of scripts/*.dfn; renamed them to scripts/*.c 2014-12-14 19:17:56 -06:00
Glenn Randers-Pehrson
736c8e8773 [libpng16] Imported from libpng-1.6.15beta03.tar 2014-11-03 09:33:44 -06:00
Glenn Randers-Pehrson
d7eff5d864 [libpng16] Removed "option WRITE_COMPRESSED_TEXT enables WRITE_TEXT"
from pnglibconf.dfa
2014-10-05 13:46:58 -05:00
Glenn Randers-Pehrson
a4fa1c57f4 [libpng16] Added "chunk iTXt enables TEXT" and "chunk zTXt enables TEXT"
to pnglibconf.dfa.
2014-10-04 12:38:47 -05:00
Glenn Randers-Pehrson
c5dc456afd [libpng16] Redid recent changes to pnglibconf.h that were reverted. 2014-10-01 10:29:26 -05:00
Glenn Randers-Pehrson
f633a4eb9c [libpng16] Added "option READ_iCCP enables READ_COMPRESSED_TEXT" to
pnglibconf.dfa
2014-10-01 10:03:57 -05:00
Glenn Randers-Pehrson
6c48f77bba [libpng16] Merge pnglibconf.dfa with libpng-1.7.0beta37. 2014-09-28 13:43:28 -05:00
John Bowler
83ae6fc266 [libpng16] Added "PNG_SET_OPTION" requirement for sRGB chunk support to
pnglibconf.dfa, needed for write-only support (John Bowler).
2014-06-22 11:23:07 -05:00
Glenn Randers-Pehrson
5808e7b8c8 [libpng16] Imported from libpng-1.6.11beta06.tar 2014-05-19 21:11:36 -05:00
Glenn Randers-Pehrson
be19c07dd9 [libpng16] Imported from libpng-1.6.11beta04.tar 2014-04-20 20:15:26 -05:00
Glenn Randers-Pehrson
86b8016ee9 [libpng16] Fix some permissions 2014-04-06 12:01:51 -05:00
Glenn Randers-Pehrson
b65b3412b1 [libpng16] Remove CALLOC from pnglibconf.dfa and pnglibconf.h.prebuilt 2014-03-07 12:19:41 -06:00
Glenn Randers-Pehrson
3455238a4e [libpng16] Fixed typos in the manual and in scripts/pnglibconf.dfa (CFLAGS
-> CPPFLAGS and PNG_USR_CONFIG -> PNG_USER_CONFIG).
2014-02-26 22:08:58 -06:00
Glenn Randers-Pehrson
78c28fea51 [libpng16] Imported from libpng-1.6.10beta02.tar 2014-02-22 23:12:02 -06:00
John Bowler
c10930a4fc [libpng16] Bookkeeping: Moved functions around (no changes). Moved transform
function definitions before the place where they are called so that
they can be masde static. Move the intrapixel functions and the
grayscale palette builder out of the png?tran.c files. The latter
isn't a transform function and is no longer used internally, and the
former MNG specific functions are better placed in pngread/pngwrite.c
2013-12-19 15:24:06 -06:00
Glenn Randers-Pehrson
c912050a7b [libpng16] 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.
2013-11-22 14:58:04 -06:00
Glenn Randers-Pehrson
d2d09e5bf9 [libpng16] Imported from libpng-1.6.7rc01.tar 2013-11-02 15:48:28 -05:00
Glenn Randers-Pehrson
b3721757a0 [libpng16] Catch up with some recent changes that did not get merged. 2013-09-30 13:56:44 -05:00
John Bowler
f260f6d156 [libpng16] Protect symbol prefixing against CC/CPPFLAGS/CFLAGS useage.
Previous iOS/Xcode fixes for the ARM NEON optimizations moved the test
on __ARM_NEON__ from configure time to compile time.  This breaks symbol
prefixing because the definition of the special png_init_filter_functions
call was hidden at configure time if the relevant compiler arguments are
passed in CFLAGS as opposed to CC.  This change attempts to avoid all
the confusion that would result by declaring the init function even when
it is not used, so that it will always get prefixed.
2013-06-08 13:13:53 -05:00
John Bowler
18dd07e3e6 [libpng16] Removed PNG_FILTER_OPTIMIZATIONS and PNG_ARM_NEON_SUPPORTED from
pnglibconf.h, allowing more of the decisions to be made internally
(pngpriv.h) during the compile.  Without this, symbol prefixing is broken
under certain circumstances on ARM platforms.  Now only the API parts of
the optimizations ('check' vs 'api') are exposed in the public header files
except that the new setting PNG_ARM_NEON_OPT documents how libpng makes the
decision about whether or not to use the optimizations.
2013-06-08 13:07:13 -05:00
John Bowler
aa22442a9c [libpng16] Make ARM NEON support work at compile time (not just configure time).
This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
using a compiler that compiles for multiple architectures at one time.
2013-06-06 12:49:53 -05:00
John Bowler
9afb90f885 [libpng16] Attempt to detect configuration issues with pngdeflate,
which requires both the correct libpng and the correct zlib to function
correctly.
2013-05-08 14:21:46 -05:00
John Bowler
0c7ac064d3 [libpng16] Added an option to force maximum window size for inflating.
For inflate, reverted previous fixes.
Added fixitxt and pngdeflate to the built programs and removed warnings
from the source code and timepng that are revealed as a result.  Fixed
fixitxt when the chunk length is more than 65535 (untested, no test case).
2013-05-07 21:59:05 -05:00
Glenn Randers-Pehrson
2c0833e265 [libpng16] Committed new pnglibconf.dfa and prebuilt. 2013-05-05 22:18:53 -05:00
John Bowler
f3728100d9 [libpng16] Corrected Android builds and corrected libpng.vers with symbol
prefixing This adds an API to set optimization options externally,
    providing an alternative and general solution for the non-portable
    run-time tests used by the ARM Neon code.  It also makes those tests
    compile and link on Android.
  The order of settings vs options in pnglibconf.h is reversed to allow
    settings to depend on options and options can now set (or override) the
    defaults for settings.
2013-03-04 16:26:31 -06:00
Glenn Randers-Pehrson
871b1d0fab [libpng16] Bump version to 1.6.1beta05 2013-03-02 15:03:15 -06:00
Glenn Randers-Pehrson
f3af706c2a [libpng16] Imported from libpng-1.6.0beta05.tar 2013-03-01 21:38:03 -06:00
Glenn Randers-Pehrson
f8a8ead5cb [libpng16] Update the INSTALL document. 2013-02-22 16:52:21 -06:00
John Bowler
09a5ca72ac [libpng16] Allow run-time ARM NEON checking to be disabled. A new configure
option:
    --enable-arm-neon=always will stop the run-time checks. New checks
    within arm/arm_init.c will cause the code not to be compiled unless
    __ARM_NEON__ is set. This should make it fail safe (if someone asks
    for it on then the build will fail if it can't be done.)
Fixed ALIGNED_MEMORY support.
2013-02-18 22:30:35 -06:00
John Bowler
23a101e06d [libpng16] scripts/pnglibconf.dfa formatting improvements back ported from libpng 1.7. 2013-02-16 00:18:20 -06:00
John Bowler
42835d3d19 [libpng16] Ported libpng 1.5 options.awk/dfn file handling to 1.6, fixed one bug. 2013-02-15 23:40:34 -06:00
John Bowler
6db8e4dd11 [libpng16] Fixed inconsistencies in png.h and pnglibconf.dfa 2013-02-10 17:49:25 -06:00
Glenn Randers-Pehrson
88c5a2a068 [libpng16] Fixed typo in png.h #ifdef 2013-02-10 16:39:55 -06:00
Glenn Randers-Pehrson
d000fb89c0 [libpng16] Enclosed the new png_get_palette_max
in #ifdef PNG_GET_PALETTE_MAX_SUPPORTED block, and revised pnglibconf.h
and pnglibconf.h.prebuilt accordingly.
2013-02-10 15:46:06 -06:00
John Bowler
24639a63ce [libpng16] Made default Zlib compression settings be configurable. This adds #defines to
pnglibconf.h to control the defaults.
2012-12-20 22:26:18 -06:00
Glenn Randers-Pehrson
b6bfd40da2 [libpng16] Imported from libpng-1.6.0beta34.tar 2012-12-19 16:12:30 -06:00
John Bowler
520803d57e [libpng16] Removed non-working ICC profile support code. There was too much
code for too little gain; implementing full ICC color correction is maybe
desireable but is left up to applications.
2012-11-01 08:12:47 -05:00