Compare commits

..

22 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
66d846b0cc [libpng16] Imported from libpng-1.6.16beta02.tar 2014-12-14 19:24:00 -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
91f9e0370d [libpng16] Bump version to 1.6.16beta02 2014-12-14 12:43:12 -06:00
Glenn Randers-Pehrson
86a7eef997 [libpng16] Imported from libpng-1.6.16beta01.tar 2014-12-14 12:38:35 -06:00
Bob Friesenhahn
530eec311d [libpng16] Revised Makefile.am and scripts/symbols.dfn to work with MinGW/MSYS 2014-12-14 12:37:12 -06:00
Glenn Randers-Pehrson
7c5d037032 [libpng16] Update arm/*.c to libpng coding style. 2014-11-29 17:04:35 -06:00
Glenn Randers-Pehrson
ee16fc4a6f [libpng16] Added ".align 2" to arm/filter_neon.S to support old GAS assemblers
that don't do alignment correctly.
2014-11-29 16:27:27 -06:00
Glenn Randers-Pehrson
2d24cbdd98 [libpng16] Bump version to 1.6.16beta01 2014-11-21 08:25:32 -06:00
Glenn Randers-Pehrson
e8ef689cb9 [libpng16] Imported from libpng-1.6.15.tar 2014-11-20 10:22:57 -06:00
Glenn Randers-Pehrson
aebb7585c9 [libpng16] Imported from libpng-1.6.15rc03.tar 2014-11-16 20:04:53 -06:00
Cosmin Truta
5b9ac20297 [libpng16] Added "-D_CRT_SECURE_NO_WARNINGS" to CFLAGS in
scripts/makefile.vcwin32.
Removed the obsolete $ARCH variable from scripts/makefile.darwin.
2014-11-16 19:37:42 -06:00
Glenn Randers-Pehrson
9c05216461 [libpng16] Fix typos in ANNOUNCE and CHANGES 2014-11-14 17:59:40 -06:00
Glenn Randers-Pehrson
d4965b4014 [libpng16] Imported from libpng-1.6.15rc02.tar 2014-11-14 09:51:59 -06:00
Cosmin Truta
b8eb945946 [libpng16] The macros passed in the command line to Borland make were ignored if
similarly-named macros were already defined in makefiles. This behavior
is different from POSIX make and other make programs.  Surround the
macro definitions with ifndef guards (Cosmin).
2014-11-14 09:47:54 -06:00
Glenn Randers-Pehrson
6df21524cd [libpng16] Imported from libpng-1.6.15rc01.tar 2014-11-13 06:47:08 -06:00
Glenn Randers-Pehrson
fa49aae286 [libpng16] Imported from libpng-1.6.15beta08.tar 2014-11-08 09:08:03 -06:00
Glenn Randers-Pehrson
05e11008c0 [libpng16] More "#endif" housecleaning, in *.h 2014-11-07 07:41:16 -06:00
Glenn Randers-Pehrson
40656e9855 [libpng16] Bump version to 1.6.15beta08 2014-11-07 06:45:39 -06:00
Glenn Randers-Pehrson
7cee075a32 [libpng16] Imported from libpng-1.6.15beta07.tar 2014-11-07 06:40:30 -06:00
Glenn Randers-Pehrson
985dc00f1f [libpng16] Fix typo in example.c 2014-11-06 23:17:35 -06:00
Glenn Randers-Pehrson
cda68df8c1 [libpng16] Changed "#endif /* PNG_FEATURE_SUPPORTED */" to "#endif /* FEATURE */" 2014-11-06 22:11:39 -06:00
Glenn Randers-Pehrson
70cb8f9a7e [libpng16] Removed #ifdef PNG_16BIT_SUPPORTED/#endif around png_product2(); it is
needed by png_reciprocal2().
Added #ifdef PNG_16BIT_SUPPORTED/#endif around png_log16bit() and
    png_do_swap().
2014-11-06 20:58:33 -06:00
62 changed files with 384 additions and 359 deletions

View File

@@ -1,4 +1,4 @@
Libpng 1.6.15beta07 - November 6, 2014
Libpng 1.6.16beta02 - December 15, 2014
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@@ -8,65 +8,32 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
1.6.15beta07.tar.xz (LZMA-compressed, recommended)
1.6.15beta07.tar.gz
1.6.16beta02.tar.xz (LZMA-compressed, recommended)
1.6.16beta02.tar.gz
Source files with CRLF line endings (for Windows), without the
"configure" script
lp1615b07.7z (LZMA-compressed, recommended)
lp1615b07.zip
lp1616b02.7z (LZMA-compressed, recommended)
lp1616b02.zip
Other information:
1.6.15beta07-README.txt
1.6.15beta07-LICENSE.txt
libpng-1.6.15beta07-*.asc (armored detached GPG signatures)
1.6.16beta02-README.txt
1.6.16beta02-LICENSE.txt
libpng-1.6.16beta02-*.asc (armored detached GPG signatures)
Changes since the last public release (1.6.14):
Changes since the last public release (1.6.15):
Version 1.6.15beta01 [October 29, 2014]
Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x !== 0)"
Simplified png_free_data().
Added missing "ptr = NULL" after some instances of png_free().
Version 1.6.16beta01 [December 14, 2014]
Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that
don't do alignment correctly.
Revised Makefile.am and scripts/symbols.dfn to work with MinGW/MSYS
(Bob Friesenhahn).
Version 1.6.15beta02 [November 1, 2014]
Changed remaining "if (!x)" to "if (x == 0)" and "if (x)" to "if (x !== 0)"
Version 1.6.15beta03 [November 3, 2014]
Added PNG_USE_ARM_NEON configuration flag (Marcin Juszkiewicz).
Version 1.6.15beta04 [November 4, 2014]
Removed new PNG_USE_ARM_NEON configuration flag and made a one-line
revision to configure.ac to support ARM on aarch64 instead (John Bowler).
Version 1.6.15beta05 [November 5, 2014]
Use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING in
example.c, pngtest.c, and applications in the contrib directory.
Avoid out-of-bounds memory access in png_user_version_check().
Simplified and future-proofed png_user_version_check().
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.
Version 1.6.15beta06 [November 6, 2014]
Reverted use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING
in the manual, example.c, pngtest.c, and applications in the contrib
directory. It was incorrect advice.
Version 1.6.15beta07 [November 6, 2014]
Version 1.6.16beta02 [December 15, 2014]
Revised Makefile.am and scripts/*.dfn again to work with MinGW/MSYS;
renamed scripts/*.dfn to scripts/*.c (John Bowler).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

39
CHANGES
View File

@@ -5034,12 +5034,12 @@ Version 1.6.14 [October 23, 2014]
No changes.
Version 1.6.15beta01 [October 29, 2014]
Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x !== 0)"
Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x != 0)"
Simplified png_free_data().
Added missing "ptr = NULL" after some instances of png_free().
Version 1.6.15beta02 [November 1, 2014]
Changed remaining "if (!x)" to "if (x == 0)" and "if (x)" to "if (x !== 0)"
Changed remaining "if (!x)" to "if (x == 0)" and "if (x)" to "if (x != 0)"
Version 1.6.15beta03 [November 3, 2014]
Added PNG_USE_ARM_NEON configuration flag (Marcin Juszkiewicz).
@@ -5074,7 +5074,40 @@ Version 1.6.15beta06 [November 6, 2014]
in the manual, example.c, pngtest.c, and applications in the contrib
directory. It was incorrect advice.
Version 1.6.15beta07 [November 6, 2014]
Version 1.6.15beta07 [November 7, 2014]
Removed #ifdef PNG_16BIT_SUPPORTED/#endif around png_product2(); it is
needed by png_reciprocal2().
Added #ifdef PNG_16BIT_SUPPORTED/#endif around png_log16bit() and
png_do_swap().
Changed all "#endif /* PNG_FEATURE_SUPPORTED */" to "#endif /* FEATURE */"
Version 1.6.15beta08 [November 8, 2014]
More housecleaning in *.h
Version 1.6.15rc01 [November 13, 2014]
Version 1.6.15rc02 [November 14, 2014]
The macros passed in the command line to Borland make were ignored if
similarly-named macros were already defined in makefiles. This behavior
is different from POSIX make and other make programs. Surround the
macro definitions with ifndef guards (Cosmin).
Version 1.6.15rc03 [November 16, 2014]
Added "-D_CRT_SECURE_NO_WARNINGS" to CFLAGS in scripts/makefile.vcwin32.
Removed the obsolete $ARCH variable from scripts/makefile.darwin.
Version 1.6.15 [November 20, 2014]
No changes.
Version 1.6.16beta01 [December 14, 2014]
Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that
don't do alignment correctly.
Revised Makefile.am and scripts/symbols.dfn to work with MinGW/MSYS
(Bob Friesenhahn).
Version 1.6.16beta02 [December 15, 2014]
Revised Makefile.am and scripts/*.dfn again to work with MinGW/MSYS;
renamed scripts/*.dfn to scripts/*.c (John Bowler).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@@ -16,7 +16,7 @@ enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 15)
set(PNGLIB_RELEASE 16)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
@@ -253,7 +253,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 16.${PNGLIB_RELEASE}.1.6.15beta07
# VERSION 16.${PNGLIB_RELEASE}.1.6.16beta02
VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16
CLEAN_DIRECT_OUTPUT 1)

View File

@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.6.15beta07, November 6, 2014, are
libpng versions 1.2.6, August 15, 2004, through 1.6.16beta02, December 15, 2014, are
Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
November 6, 2014
December 15, 2014

View File

@@ -129,7 +129,7 @@ EXTRA_DIST= \
$(TESTS) $(XFAIL_TESTS) tests/pngstest \
CMakeLists.txt example.c libpng-manual.txt
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.dfn
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.c
CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
@@ -152,7 +152,7 @@ AM_CFLAGS = ${PNG_COPTS}
# checks for this and sets DFNCPP appropriately.
DFNCPP = @DFNCPP@
SUFFIXES = .chk .dfn .out
SUFFIXES = .chk .out
$(PNGLIB_BASENAME).pc: libpng.pc
cp libpng.pc $@
@@ -237,18 +237,17 @@ if DO_PNG_PREFIX
SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@'
endif
.dfn.out:
rm -f $@ $*.c $*.tf[12]
.c.out:
rm -f $@ $*.tf[12]
test -d scripts || mkdir scripts || test -d scripts
echo '#include "$<"' >$*.c
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\
$(CPPFLAGS) $(SYMBOL_CFLAGS) $*.c > $*.tf1
$(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2
rm -f $*.c $*.tf1
rm -f $*.tf1
mv $*.tf2 $@
# The .dfn file for pnglibconf.h is machine generated
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
# The .c file for pnglibconf.h is machine generated
pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
rm -f $@ $*.tf[45]
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
@@ -268,7 +267,7 @@ scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.ou
# used on demand to regenerate the standard header, CPPFLAGS should
# be empty - no non-standard defines
scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
rm -f $@ pnglibconf.tf[67]
test -z "$(CPPFLAGS)"
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\

2
README
View File

@@ -1,4 +1,4 @@
README for libpng version 1.6.15beta07 - November 6, 2014 (shared library 16.0)
README for libpng version 1.6.16beta02 - December 15, 2014 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2014 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
* Last changed in libpng 1.6.10 [March 6, 2014]
* Last changed in libpng 1.6.16 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -17,6 +17,7 @@
#include "../pngpriv.h"
#ifdef PNG_READ_SUPPORTED
#if PNG_ARM_NEON_OPT > 0
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
/* WARNING: it is strongly recommended that you do not build libpng with
@@ -130,4 +131,4 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
}
}
#endif /* PNG_ARM_NEON_OPT > 0 */
#endif /* PNG_READ_SUPPORTED */
#endif /* READ */

View File

@@ -1,18 +1,17 @@
/* filter_neon.S - NEON optimised filter functions
*
* Copyright (c) 2013 Glenn Randers-Pehrson
* Copyright (c) 2014 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
* Last changed in libpng 1.6.8 [December 19, 2013]
* Last changed in libpng 1.6.16 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
/* This is required to get the symbol renames, which are #defines, and also
* includes the definition (or not) of PNG_ARM_NEON_OPT and
* PNG_ARM_NEON_IMPLEMENTATION.
/* This is required to get the symbol renames, which are #defines, and the
* definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
*/
#define PNG_VERSION_INFO_ONLY
#include "../pngpriv.h"
@@ -21,6 +20,8 @@
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
#endif
#ifdef PNG_READ_SUPPORTED
/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for
* ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it
* only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h
@@ -28,7 +29,6 @@
*/
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
#ifdef PNG_READ_SUPPORTED
#if PNG_ARM_NEON_OPT > 0
#ifdef __ELF__
@@ -47,6 +47,13 @@ ELF .size \name, . - \name
.purgem endfunc
.endm
.text
/* Explicitly specifying alignment here because some versions of
* GAS don't align code correctly. This is harmless in correctly
* written versions of GAS.
*/
.align 2
.if \export
.global \name
.endif
@@ -242,5 +249,5 @@ func png_read_filter_row_paeth3_neon, export=1
pop {r4,pc}
endfunc
#endif /* PNG_ARM_NEON_OPT > 0 */
#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
#endif /* READ */

View File

@@ -1,11 +1,11 @@
/* filter_neon_intrinsics.c - NEON optimised filter functions
*
* Copyright (c) 2013 Glenn Randers-Pehrson
* Copyright (c) 2014 Glenn Randers-Pehrson
* Written by James Yu <james.yu at linaro.org>, October 2013.
* Based on filter_neon.S, written by Mans Rullgard, 2011.
*
* Last changed in libpng 1.6.8 [December 19, 2013]
* Last changed in libpng 1.6.16 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -14,6 +14,8 @@
#include "../pngpriv.h"
#ifdef PNG_READ_SUPPORTED
/* This code requires -mfpu=neon on the command line: */
#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
@@ -35,7 +37,6 @@
#define png_ldr(type,pointer)\
(temp_pointer = png_ptr(type,pointer), *temp_pointer)
#ifdef PNG_READ_SUPPORTED
#if PNG_ARM_NEON_OPT > 0
void
@@ -368,5 +369,5 @@ png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
}
#endif /* PNG_ARM_NEON_OPT > 0 */
#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 1 (intrinsics) */
#endif /* READ */

View File

@@ -18,7 +18,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here:
AC_INIT([libpng],[1.6.15beta07],[png-mng-implement@lists.sourceforge.net])
AC_INIT([libpng],[1.6.16beta02],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts])
# libpng does not follow GNU file name conventions (hence 'foreign')
@@ -39,10 +39,10 @@ dnl automake, so the following is not necessary (and is not defined anyway):
dnl AM_PREREQ([1.11.2])
dnl stop configure from automagically running automake
PNGLIB_VERSION=1.6.15beta07
PNGLIB_VERSION=1.6.16beta02
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
PNGLIB_RELEASE=15
PNGLIB_RELEASE=16
dnl End of version number stuff

View File

@@ -2,7 +2,7 @@
*
* Copyright (c) 2014 Glenn Randers-Pehrson
* Written by John Bowler, 2014.
* Last changed in libpng 1.6.10 [March 6, 2014]
* Last changed in libpng 1.6.16 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -16,8 +16,8 @@
* png_have_neon implemented for Linux by reading the widely available
* pseudo-file /proc/cpuinfo.
*
* This code is strict ANSI-C and is probably moderately portable, it does
* however use <stdio.h> and assumes that /proc/cpuinfo is never localized.
* This code is strict ANSI-C and is probably moderately portable; it does
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
*/
#include <stdio.h>
@@ -152,8 +152,10 @@ png_have_neon(png_structp png_ptr)
}
}
#ifdef PNG_WARNINGS_SUPPORTED
else
png_warning(png_ptr, "/proc/cpuinfo open failed");
#endif
return 0;
}

View File

@@ -2,7 +2,7 @@
#if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Maintained 1998-2014 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -494,7 +494,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
max_screen_colors, histogram, 0);
}
}
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
#endif /* READ_QUANTIZE */
/* Invert monochrome files to have 0 as white and 1 as black */
png_set_invert_mono(png_ptr);
@@ -532,7 +532,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
number_passes = png_set_interlace_handling(png_ptr);
#else
number_passes = 1;
#endif /* PNG_READ_INTERLACING_SUPPORTED */
#endif /* READ_INTERLACING */
/* Optional call to gamma correct and add the background to the palette
@@ -744,7 +744,7 @@ row_callback(png_structp png_ptr, png_bytep new_row,
* to pass the current row as new_row, and the function will combine
* the old row and the new row.
*/
#endif /* PNG_READ_INTERLACING_SUPPORTED */
#endif /* READ_INTERLACING */
}
end_callback(png_structp png_ptr, png_infop info)

View File

@@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.15beta07 - November 6, 2014
libpng version 1.6.16beta02 - December 15, 2014
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.15beta07 - November 6, 2014
libpng versions 0.97, January 1998, through 1.6.16beta02 - December 15, 2014
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -5277,13 +5277,13 @@ Other rules can be inferred by inspecting the libpng source.
XVI. Y2K Compliance in libpng
November 6, 2014
December 15, 2014
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.15beta07 are Y2K compliant. It is my belief that earlier
upward through 1.6.16beta02 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer

View File

@@ -1,6 +1,6 @@
.TH LIBPNG 3 "November 6, 2014"
.TH LIBPNG 3 "December 15, 2014"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.15beta07
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.16beta02
.SH SYNOPSIS
\fB
#include <png.h>\fP
@@ -504,7 +504,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.15beta07 - November 6, 2014
libpng version 1.6.16beta02 - December 15, 2014
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -515,7 +515,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.15beta07 - November 6, 2014
libpng versions 0.97, January 1998, through 1.6.16beta02 - December 15, 2014
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -5781,13 +5781,13 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVI. Y2K Compliance in libpng
November 6, 2014
December 15, 2014
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.15beta07 are Y2K compliant. It is my belief that earlier
upward through 1.6.16beta02 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -6033,7 +6033,10 @@ the first widely used release:
1.6.14beta01-07 16 10614 16.so.16.14[.0]
1.6.14rc01-02 16 10614 16.so.16.14[.0]
1.6.14 16 10614 16.so.16.14[.0]
1.6.15beta01-07 16 10615 16.so.16.15[.0]
1.6.15beta01-08 16 10615 16.so.16.15[.0]
1.6.15rc01-03 16 10615 16.so.16.15[.0]
1.6.15 16 10615 16.so.16.15[.0]
1.6.16beta01-02 16 10616 16.so.16.16[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -6090,7 +6093,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.6.15beta07 - November 6, 2014:
Libpng version 1.6.16beta02 - December 15, 2014:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -6113,7 +6116,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.6.15beta07, November 6, 2014, are
libpng versions 1.2.6, August 15, 2004, through 1.6.16beta02, December 15, 2014, are
Copyright (c) 2004,2006-2014 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -6212,7 +6215,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
November 6, 2014
December 15, 2014
.\" end of man page

View File

@@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "November 6, 2014"
.TH LIBPNGPF 3 "December 15, 2014"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.15beta07
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.16beta02
(private functions)
.SH SYNOPSIS
\fB#include \fI"pngpriv.h"

2
png.5
View File

@@ -1,4 +1,4 @@
.TH PNG 5 "November 6, 2014"
.TH PNG 5 "December 15, 2014"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

40
png.c
View File

@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_15beta07 Your_png_h_is_not_version_1_6_15beta07;
typedef png_libpng_version_1_6_16beta02 Your_png_h_is_not_version_1_6_16beta02;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -65,7 +65,7 @@ png_sig_cmp(png_const_bytep sig, png_size_t start, png_size_t num_to_check)
return ((int)(memcmp(&sig[start], &png_signature[start], num_to_check)));
}
#endif /* PNG_READ_SUPPORTED */
#endif /* READ */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Function to allocate memory for zlib */
@@ -631,7 +631,7 @@ png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask,
info_ptr->free_me &= ~mask;
}
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
#endif /* READ || WRITE */
/* This function returns a pointer to the io_ptr associated with the user
* functions. The application should free any memory associated with this
@@ -756,9 +756,9 @@ png_convert_to_rfc1123(png_structrp png_ptr, png_const_timep ptime)
return NULL;
}
# endif
# endif /* PNG_TIME_RFC1123_SUPPORTED */
# endif /* TIME_RFC1123 */
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
#endif /* READ || WRITE */
png_const_charp PNGAPI
png_get_copyright(png_const_structrp png_ptr)
@@ -769,13 +769,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.15beta07 - November 6, 2014" PNG_STRING_NEWLINE \
"libpng version 1.6.16beta02 - December 15, 2014" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.6.15beta07 - November 6, 2014\
return "libpng version 1.6.16beta02 - December 15, 2014\
Copyright (c) 1998-2014 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -937,7 +937,7 @@ png_reset_zstream(png_structrp png_ptr)
/* WARNING: this resets the window bits to the maximum! */
return (inflateReset(&png_ptr->zstream));
}
#endif /* PNG_READ_SUPPORTED */
#endif /* READ */
/* This function was added to libpng-1.0.7 */
png_uint_32 PNGAPI
@@ -2365,7 +2365,7 @@ png_icc_set_sRGB(png_const_structrp png_ptr,
(void)png_colorspace_set_sRGB(png_ptr, colorspace,
(int)/*already checked*/png_get_uint_32(profile+64));
}
#endif /* PNG_READ_sRGB_SUPPORTED */
#endif /* READ_sRGB */
int /* PRIVATE */
png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace,
@@ -2745,7 +2745,7 @@ png_check_fp_string(png_const_charp string, png_size_t size)
return 0; /* i.e. fail */
}
#endif /* pCAL or sCAL */
#endif /* pCAL || sCAL */
#ifdef PNG_sCAL_SUPPORTED
# ifdef PNG_FLOATING_POINT_SUPPORTED
@@ -3372,7 +3372,7 @@ png_gamma_significant(png_fixed_point gamma_val)
#endif
#ifdef PNG_READ_GAMMA_SUPPORTED
# ifdef PNG_16BIT_SUPPORTED
#if defined(PNG_16BIT_SUPPORTED) || !defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)
/* A local convenience routine. */
static png_fixed_point
png_product2(png_fixed_point a, png_fixed_point b)
@@ -3394,7 +3394,7 @@ png_product2(png_fixed_point a, png_fixed_point b)
return 0; /* overflow */
}
# endif /* 16BIT */
#endif /* 16BIT || !FLOATING_ARITHMETIC */
/* The inverse of the above. */
png_fixed_point
@@ -3546,6 +3546,7 @@ png_log8bit(unsigned int x)
* Zero (257): 0
* End (258): 23499
*/
#ifdef PNG_16BIT_SUPPORTED
static png_int_32
png_log16bit(png_uint_32 x)
{
@@ -3596,6 +3597,7 @@ png_log16bit(png_uint_32 x)
/* Safe, because the result can't have more than 20 bits: */
return (png_int_32)((lg2 + 2048) >> 12);
}
#endif /* 16BIT */
/* The 'exp()' case must invert the above, taking a 20-bit fixed point
* logarithmic value and returning a 16 or 8-bit number as appropriate. In
@@ -3723,9 +3725,9 @@ png_gamma_8bit_correct(unsigned int value, png_fixed_point gamma_val)
* convert this to a floating point value. This includes values that
* would overflow if 'value' were to be converted to 'int'.
*
* Apparently GCC, however, does an intermediate convertion to (int)
* Apparently GCC, however, does an intermediate conversion to (int)
* on some (ARM) but not all (x86) platforms, possibly because of
* hardware FP limitations. (E.g. if the hardware convertion always
* hardware FP limitations. (E.g. if the hardware conversion always
* assumes the integer register contains a signed value.) This results
* in ANSI-C undefined behavior for large values.
*
@@ -3733,7 +3735,7 @@ png_gamma_8bit_correct(unsigned int value, png_fixed_point gamma_val)
* conformant and therefore compile spurious extra code for the large
* values.
*
* We can be reasonably sure that an unsigned to float convertion
* We can be reasonably sure that an unsigned to float conversion
* won't be faster than an int to float one. Therefore this code
* assumes responsibility for the undefined behavior, which it knows
* can't happen because of the check above.
@@ -3768,7 +3770,7 @@ png_gamma_16bit_correct(unsigned int value, png_fixed_point gamma_val)
{
# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
/* The same (unsigned int)->(double) constraints apply here as above,
* however in this case the (unsigned int) to (int) convertion can
* however in this case the (unsigned int) to (int) conversion can
* overflow on an ANSI-C90 compliant system so the cast needs to ensure
* that this is not possible.
*/
@@ -4255,7 +4257,7 @@ const png_uint_16 png_sRGB_table[256] =
57105,57646,58190,58737,59287,59840,60396,60955,
61517,62082,62650,63221,63795,64372,64952,65535
};
#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
#endif /* SIMPLIFIED_READ */
/* The base/delta tables are required for both read and write (but currently
* only the simplified versions.)
@@ -4455,4 +4457,4 @@ png_image_error(png_imagep image, png_const_charp error_message)
}
#endif /* SIMPLIFIED READ/WRITE */
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
#endif /* READ || WRITE */

61
png.h
View File

@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.15beta07 - November 6, 2014
* libpng version 1.6.16beta02, December 15, 2014
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -11,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.15beta07 - November 6, 2014: Glenn
* libpng versions 0.97, January 1998, through 1.6.16beta02, December 15, 2014: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -206,7 +206,10 @@
* 1.6.14beta01-07 16 10614 16.so.16.14[.0]
* 1.6.14rc01-02 16 10614 16.so.16.14[.0]
* 1.6.14 16 10614 16.so.16.14[.0]
* 1.6.15beta01-07 16 10615 16.so.16.15[.0]
* 1.6.15beta01-08 16 10615 16.so.16.15[.0]
* 1.6.15rc01-03 16 10615 16.so.16.15[.0]
* 1.6.15 16 10615 16.so.16.15[.0]
* 1.6.16beta01-02 16 10616 16.so.16.16[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -238,7 +241,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.6.15beta07, November 6, 2014, are
* libpng versions 1.2.6, August 15, 2004, through 1.6.16beta02, December 15, 2014, are
* Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -350,13 +353,13 @@
* Y2K compliance in libpng:
* =========================
*
* November 6, 2014
* December 15, 2014
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.6.15beta07 are Y2K compliant. It is my belief that
* upward through 1.6.16beta02 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -418,9 +421,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.15beta07"
#define PNG_LIBPNG_VER_STRING "1.6.16beta02"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.6.15beta07 - November 6, 2014\n"
" libpng version 1.6.16beta02 - December 15, 2014\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -428,13 +431,13 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 15
#define PNG_LIBPNG_VER_RELEASE 16
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
#define PNG_LIBPNG_VER_BUILD 07
#define PNG_LIBPNG_VER_BUILD 02
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -459,7 +462,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
#define PNG_LIBPNG_VER 10615 /* 1.6.15 */
#define PNG_LIBPNG_VER 10616 /* 1.6.16 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -564,7 +567,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef char* png_libpng_version_1_6_15beta07;
typedef char* png_libpng_version_1_6_16beta02;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@@ -1177,7 +1180,7 @@ PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime,
/* Convert from time_t to png_time. Uses gmtime() */
PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime));
#endif /* PNG_CONVERT_tIME_SUPPORTED */
#endif /* CONVERT_tIME */
#ifdef PNG_READ_EXPAND_SUPPORTED
/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
@@ -1383,7 +1386,7 @@ PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler,
/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr,
png_uint_32 filler, int flags));
#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
#endif /* READ_FILLER || WRITE_FILLER */
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* Swap bytes in 16-bit depth files. */
@@ -1647,7 +1650,7 @@ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
(png_structrp png_ptr, int heuristic_method, int num_weights,
png_const_fixed_point_p filter_weights,
png_const_fixed_point_p filter_costs))
#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
#endif /* WRITE_WEIGHTED_FILTER */
/* Heuristic used for row filter selection. These defines should NOT be
* changed.
@@ -1703,7 +1706,7 @@ PNG_EXPORT(225, void, png_set_text_compression_window_bits,
PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr,
int method));
#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */
#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */
/* These next functions are called for input/output, memory, and error
* handling. They are in the file pngrio.c, pngwio.c, and pngerror.c,
@@ -1870,7 +1873,7 @@ PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp));
*/
PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr,
png_bytep old_row, png_const_bytep new_row));
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
#endif /* PROGRESSIVE_READ */
PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr,
png_alloc_size_t size), PNG_ALLOCATED);
@@ -2071,7 +2074,7 @@ PNG_EXPORT(128, png_int_32, png_get_x_offset_microns,
PNG_EXPORT(129, png_int_32, png_get_y_offset_microns,
(png_const_structrp png_ptr, png_const_inforp info_ptr));
#endif /* PNG_EASY_ACCESS_SUPPORTED */
#endif /* EASY_ACCESS */
#ifdef PNG_READ_SUPPORTED
/* Returns pointer to signature string read from PNG header */
@@ -2323,7 +2326,7 @@ PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr,
PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
png_inforp info_ptr, int unit,
png_const_charp swidth, png_const_charp sheight));
#endif /* PNG_sCAL_SUPPORTED */
#endif /* sCAL */
#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
/* Provide the default handling for all unknown chunks or, optionally, for
@@ -2551,8 +2554,8 @@ PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed,
PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr,
png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
int *unit_type));
# endif /* PNG_pHYs_SUPPORTED */
#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */
# endif /* pHYs */
#endif /* INCH_CONVERSIONS */
/* Added in libpng-1.4.0 */
#ifdef PNG_IO_STATE_SUPPORTED
@@ -2575,7 +2578,7 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */
# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */
# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */
#endif /* ?PNG_IO_STATE_SUPPORTED */
#endif /* IO_STATE */
/* Interlace support. The following macros are always defined so that if
* libpng interlace handling is turned off the macros may be used to handle
@@ -2679,7 +2682,7 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
(composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
(png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \
32767) / 65535)
#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
#endif /* READ_COMPOSITE_NODIV */
#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf));
@@ -3107,7 +3110,7 @@ PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image,
PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
FILE* file));
/* The PNG header is read from the stdio FILE object. */
#endif /* PNG_STDIO_SUPPORTED */
#endif /* STDIO */
PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image,
png_const_voidp memory, png_size_t size));
@@ -3152,7 +3155,7 @@ PNG_EXPORT(238, void, png_image_free, (png_imagep image));
/* Free any data allocated by libpng in image->opaque, setting the pointer to
* NULL. May be called at any time after the structure is initialized.
*/
#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
#endif /* SIMPLIFIED_READ */
#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED
#ifdef PNG_STDIO_SUPPORTED
@@ -3198,12 +3201,12 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
*
* Note that the write API does not support interlacing or sub-8-bit pixels.
*/
#endif /* PNG_STDIO_SUPPORTED */
#endif /* PNG_SIMPLIFIED_WRITE_SUPPORTED */
#endif /* STDIO */
#endif /* SIMPLIFIED_WRITE */
/*******************************************************************************
* END OF SIMPLIFIED API
******************************************************************************/
#endif /* PNG_SIMPLIFIED_{READ|WRITE}_SUPPORTED */
#endif /* SIMPLIFIED_{READ|WRITE} */
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
PNG_EXPORT(242, void, png_set_check_for_invalid_index,
@@ -3251,7 +3254,7 @@ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
int onoff));
#endif /* PNG_SET_OPTION_SUPPORTED */
#endif /* SET_OPTION */
/*******************************************************************************
* END OF HARDWARE AND SOFTWARE OPTIONS

View File

@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.6.15beta07 - November 6, 2014
* libpng version 1.6.16beta02,December 15, 2014
*
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -27,7 +27,7 @@ static PNG_FUNCTION(void, png_default_error,PNGARG((png_const_structrp png_ptr,
static void /* PRIVATE */
png_default_warning PNGARG((png_const_structrp png_ptr,
png_const_charp warning_message));
#endif /* PNG_WARNINGS_SUPPORTED */
#endif /* WARNINGS */
/* This function is called whenever there is a fatal error. This function
* should not be changed. If there is a need to handle errors differently,
@@ -103,7 +103,7 @@ png_err,(png_const_structrp png_ptr),PNG_NORETURN)
use the default handler, which will not return. */
png_default_error(png_ptr, "");
}
#endif /* PNG_ERROR_TEXT_SUPPORTED */
#endif /* ERROR_TEXT */
/* Utility to safely appends strings to a buffer. This never errors out so
* error checking is not required in the caller.
@@ -355,7 +355,7 @@ png_formatted_warning(png_const_structrp png_ptr, png_warning_parameters p,
*/
png_warning(png_ptr, msg);
}
#endif /* PNG_WARNINGS_SUPPORTED */
#endif /* WARNINGS */
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
void PNGAPI
@@ -473,7 +473,7 @@ png_format_buffer(png_const_structrp png_ptr, png_charp buffer, png_const_charp
buffer[iout] = '\0';
}
}
#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */
#endif /* WARNINGS || ERROR_TEXT */
#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)
PNG_FUNCTION(void,PNGAPI
@@ -490,7 +490,7 @@ png_chunk_error,(png_const_structrp png_ptr, png_const_charp error_message),
png_error(png_ptr, msg);
}
}
#endif /* PNG_READ_SUPPORTED && PNG_ERROR_TEXT_SUPPORTED */
#endif /* READ && ERROR_TEXT */
#ifdef PNG_WARNINGS_SUPPORTED
void PNGAPI
@@ -506,7 +506,7 @@ png_chunk_warning(png_const_structrp png_ptr, png_const_charp warning_message)
png_warning(png_ptr, msg);
}
}
#endif /* PNG_WARNINGS_SUPPORTED */
#endif /* WARNINGS */
#ifdef PNG_READ_SUPPORTED
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
@@ -525,7 +525,7 @@ png_chunk_benign_error(png_const_structrp png_ptr, png_const_charp
# endif
}
#endif
#endif /* PNG_READ_SUPPORTED */
#endif /* READ */
void /* PRIVATE */
png_chunk_report(png_const_structrp png_ptr, png_const_charp message, int error)
@@ -824,7 +824,7 @@ png_default_warning(png_const_structrp png_ptr, png_const_charp warning_message)
#endif
PNG_UNUSED(png_ptr) /* Make compiler happy */
}
#endif /* PNG_WARNINGS_SUPPORTED */
#endif /* WARNINGS */
/* This function is called when the application wants to use another method
* of handling errors and warnings. Note that the error function MUST NOT
@@ -959,5 +959,5 @@ png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
return result;
}
#endif /* SIMPLIFIED READ/WRITE */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */
#endif /* READ || WRITE */

View File

@@ -1,7 +1,7 @@
/* pngget.c - retrieval of values from info struct
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -455,12 +455,12 @@ png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr,
return (retval);
}
#endif /* PNG_pHYs_SUPPORTED */
#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */
#endif /* pHYs */
#endif /* INCH_CONVERSIONS */
/* png_get_channels really belongs in here, too, but it's been around longer */
#endif /* PNG_EASY_ACCESS_SUPPORTED */
#endif /* EASY_ACCESS */
png_byte PNGAPI
@@ -1180,7 +1180,7 @@ png_get_chunk_malloc_max (png_const_structrp png_ptr)
{
return (png_ptr ? png_ptr->user_chunk_malloc_max : 0);
}
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
#endif /* SET_USER_LIMITS */
/* These functions were added to libpng 1.4.0 */
#ifdef PNG_IO_STATE_SUPPORTED
@@ -1195,7 +1195,7 @@ png_get_io_chunk_type (png_const_structrp png_ptr)
{
return png_ptr->chunk_name;
}
#endif /* ?PNG_IO_STATE_SUPPORTED */
#endif /* IO_STATE */
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
# ifdef PNG_GET_PALETTE_MAX_SUPPORTED
@@ -1210,4 +1210,4 @@ png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr)
# endif
#endif
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
#endif /* READ || WRITE */

View File

@@ -121,7 +121,7 @@ struct png_info_def
int num_text; /* number of comments read or comments to write */
int max_text; /* current size of text array */
png_textp text; /* array of comments read or comments to write */
#endif /* PNG_TEXT_SUPPORTED */
#endif /* TEXT */
#ifdef PNG_tIME_SUPPORTED
/* The tIME chunk holds the last time the displayed image data was

View File

@@ -1,8 +1,8 @@
/* pngmem.c - stub functions for memory allocation
*
* Last changed in libpng 1.6.8 [December 19, 2013]
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -199,7 +199,7 @@ png_malloc_default,(png_const_structrp png_ptr, png_alloc_size_t size),
return ret;
}
#endif /* PNG_USER_MEM_SUPPORTED */
#endif /* USER_MEM */
/* This function was added at libpng version 1.2.3. The png_malloc_warn()
* function will issue a png_warning and return NULL instead of issuing a
@@ -244,7 +244,7 @@ png_free_default,(png_const_structrp png_ptr, png_voidp ptr),PNG_DEPRECATED)
{
if (png_ptr == NULL || ptr == NULL)
return;
#endif /* PNG_USER_MEM_SUPPORTED */
#endif /* USER_MEM */
free(ptr);
}
@@ -277,5 +277,5 @@ png_get_mem_ptr(png_const_structrp png_ptr)
return png_ptr->mem_ptr;
}
#endif /* PNG_USER_MEM_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
#endif /* USER_MEM */
#endif /* READ || WRITE */

View File

@@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -1165,4 +1165,4 @@ png_get_progressive_ptr(png_const_structrp png_ptr)
return png_ptr->io_ptr;
}
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
#endif /* PROGRESSIVE_READ */

View File

@@ -172,7 +172,7 @@
*/
# define PNG_ARM_NEON_IMPLEMENTATION 2
# endif /* __ARM_NEON__ */
# endif /* !defined PNG_ARM_NEON_IMPLEMENTATION */
# endif /* !PNG_ARM_NEON_IMPLEMENTATION */
# ifndef PNG_ARM_NEON_IMPLEMENTATION
/* Use the intrinsics code by default. */
@@ -855,7 +855,7 @@ PNG_INTERNAL_DATA(const png_byte, png_sRGB_delta, [512]);
/* Given a value 'linear' in the range 0..255*65535 calculate the 8-bit sRGB
* encoded value with maximum error 0.646365. Note that the input is not a
* 16-bit value; it has been multiplied by 255! */
#endif /* PNG_SIMPLIFIED_READ/WRITE */
#endif /* SIMPLIFIED_READ/WRITE */
/* Inhibit C++ name-mangling for libpng functions but not for system calls. */
@@ -1229,7 +1229,7 @@ PNG_INTERNAL_FUNCTION(void,png_read_finish_IDAT,(png_structrp png_ptr),
PNG_INTERNAL_FUNCTION(void,png_read_finish_row,(png_structrp png_ptr),
PNG_EMPTY);
/* Finish a row while reading, dealing with interlacing passes, etc. */
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* SEQUENTIAL_READ */
/* Initialize the row buffers, etc. */
PNG_INTERNAL_FUNCTION(void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY);
@@ -1305,7 +1305,7 @@ PNG_INTERNAL_FUNCTION(void,png_handle_hIST,(png_structrp png_ptr,
#ifdef PNG_READ_iCCP_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_handle_iCCP,(png_structrp png_ptr,
png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
#endif /* PNG_READ_iCCP_SUPPORTED */
#endif /* READ_iCCP */
#ifdef PNG_READ_iTXt_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_handle_iTXt,(png_structrp png_ptr,
@@ -1340,7 +1340,7 @@ PNG_INTERNAL_FUNCTION(void,png_handle_sCAL,(png_structrp png_ptr,
#ifdef PNG_READ_sPLT_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_handle_sPLT,(png_structrp png_ptr,
png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
#endif /* PNG_READ_sPLT_SUPPORTED */
#endif /* READ_sPLT */
#ifdef PNG_READ_sRGB_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_handle_sRGB,(png_structrp png_ptr,
@@ -1454,7 +1454,7 @@ PNG_INTERNAL_FUNCTION(void,png_push_read_iTXt,(png_structrp png_ptr,
png_inforp info_ptr),PNG_EMPTY);
# endif
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
#endif /* PROGRESSIVE_READ */
/* Added at libpng version 1.6.0 */
#ifdef PNG_GAMMA_SUPPORTED

View File

@@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -44,7 +44,7 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
{
png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr,
error_fn, warn_fn, mem_ptr, malloc_fn, free_fn);
#endif /* PNG_USER_MEM_SUPPORTED */
#endif /* USER_MEM */
if (png_ptr != NULL)
{
@@ -252,7 +252,7 @@ png_read_info(png_structrp png_ptr, png_inforp info_ptr)
PNG_HANDLE_CHUNK_AS_DEFAULT);
}
}
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* SEQUENTIAL_READ */
/* Optional call to update the users info_ptr structure */
void PNGAPI
@@ -302,7 +302,7 @@ png_start_read_image(png_structrp png_ptr)
"png_start_read_image/png_read_update_info: duplicate call");
}
}
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
#ifdef PNG_MNG_FEATURES_SUPPORTED
@@ -369,7 +369,7 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
}
}
}
#endif /* PNG_MNG_FEATURES_SUPPORTED */
#endif /* MNG_FEATURES */
void PNGAPI
png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
@@ -436,7 +436,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined");
#endif
}
#endif /* PNG_WARNINGS_SUPPORTED */
#endif /* WARNINGS */
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* If interlaced and we do not need a new row, combine row and return.
@@ -605,7 +605,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
(*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);
}
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read one or more rows of image data. If the image is interlaced,
@@ -672,7 +672,7 @@ png_read_rows(png_structrp png_ptr, png_bytepp row,
dp++;
}
}
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the entire image. If the image has an alpha channel or a tRNS
@@ -746,7 +746,7 @@ png_read_image(png_structrp png_ptr, png_bytepp image)
}
}
}
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the end of the PNG file. Will not read past the end of the
@@ -913,7 +913,7 @@ png_read_end(png_structrp png_ptr, png_inforp info_ptr)
PNG_HANDLE_CHUNK_AS_DEFAULT);
} while ((png_ptr->mode & PNG_HAVE_IEND) == 0);
}
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* SEQUENTIAL_READ */
/* Free all memory used in the read struct */
static void
@@ -1221,8 +1221,8 @@ png_read_png(png_structrp png_ptr, png_inforp info_ptr,
PNG_UNUSED(params)
}
#endif /* PNG_INFO_IMAGE_SUPPORTED */
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* INFO_IMAGE */
#endif /* SEQUENTIAL_READ */
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
/* SIMPLIFIED READ
@@ -1508,7 +1508,7 @@ png_image_begin_read_from_file(png_imagep image, const char *file_name)
return 0;
}
#endif /* PNG_STDIO_SUPPORTED */
#endif /* STDIO */
static void PNGCBAPI
png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need)
@@ -1626,7 +1626,7 @@ png_image_skip_unused_chunks(png_structrp png_ptr)
# define PNG_SKIP_CHUNKS(p) png_image_skip_unused_chunks(p)
#else
# define PNG_SKIP_CHUNKS(p) ((void)0)
#endif /* PNG_HANDLE_AS_UNKNOWN_SUPPORTED */
#endif /* HANDLE_AS_UNKNOWN */
/* The following macro gives the exact rounded answer for all values in the
* range 0..255 (it actually divides by 51.2, but the rounding still generates
@@ -4117,5 +4117,5 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
return 0;
}
#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
#endif /* PNG_READ_SUPPORTED */
#endif /* SIMPLIFIED_READ */
#endif /* READ */

View File

@@ -1,7 +1,7 @@
/* pngrio.c - functions for data input
*
* Last changed in libpng 1.6.9 [February 6, 2014]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -117,4 +117,4 @@ png_set_read_fn(png_structrp png_ptr, png_voidp io_ptr,
png_ptr->output_flush_fn = NULL;
#endif
}
#endif /* PNG_READ_SUPPORTED */
#endif /* READ */

View File

@@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -91,7 +91,8 @@ png_set_crc_action(png_structrp png_ptr, int crit_action, int ancil_action)
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
/* Is it OK to set a transformation now? Only if png_start_read_image or
* png_read_update_info have not been called. It is not necessary for the IHDR
* to have been read in all cases, the parameter allows for this check too.
* to have been read in all cases; the need_IHDR parameter allows for this
* check too.
*/
static int
png_rtran_ok(png_structrp png_ptr, int need_IHDR)
@@ -793,7 +794,7 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
png_free(png_ptr, distance);
}
}
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
#endif /* READ_QUANTIZE */
#ifdef PNG_READ_GAMMA_SUPPORTED
void PNGFAPI
@@ -842,7 +843,7 @@ png_set_gamma(png_structrp png_ptr, double scrn_gamma, double file_gamma)
png_set_gamma_fixed(png_ptr, convert_gamma_value(png_ptr, scrn_gamma),
convert_gamma_value(png_ptr, file_gamma));
}
# endif /* FLOATING_POINT_SUPPORTED */
# endif /* FLOATING_POINT */
#endif /* READ_GAMMA */
#ifdef PNG_READ_EXPAND_SUPPORTED
@@ -914,7 +915,7 @@ png_set_tRNS_to_alpha(png_structrp png_ptr)
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
}
#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
#endif /* READ_EXPAND */
#ifdef PNG_READ_EXPAND_16_SUPPORTED
/* Expand to 16-bit channels, expand the tRNS chunk too (because otherwise
@@ -998,7 +999,7 @@ png_set_rgb_to_gray_fixed(png_structrp png_ptr, int error_action,
png_uint_16 red_int, green_int;
/* NOTE: this calculation does not round, but this behavior is retained
* for consistency, the inaccuracy is very small. The code here always
* for consistency; the inaccuracy is very small. The code here always
* overwrites the coefficients, regardless of whether they have been
* defaulted or set already.
*/
@@ -1091,7 +1092,7 @@ png_gamma_threshold(png_fixed_point screen_gamma, png_fixed_point file_gamma)
* the palette.
*/
/*For the moment 'png_init_palette_transformations' and
/* For the moment 'png_init_palette_transformations' and
* 'png_init_rgb_transformations' only do some flag canceling optimizations.
* The intent is that these two routines should have palette or rgb operations
* extracted from 'png_init_read_transformations'.
@@ -1179,10 +1180,10 @@ png_init_palette_transformations(png_structrp png_ptr)
png_ptr->trans_alpha[i]);
}
}
#endif /* PNG_READ_INVERT_ALPHA_SUPPORTED */
#endif /* READ_INVERT_ALPHA */
}
} /* background expand and (therefore) no alpha association. */
#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */
#endif /* READ_EXPAND && READ_BACKGROUND */
}
static void /* PRIVATE */
@@ -1267,7 +1268,7 @@ png_init_rgb_transformations(png_structrp png_ptr)
}
}
} /* background expand and (therefore) no alpha association. */
#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */
#endif /* READ_EXPAND && READ_BACKGROUND */
}
void /* PRIVATE */
@@ -1345,7 +1346,7 @@ png_init_read_transformations(png_structrp png_ptr)
#endif
/* Certain transformations have the effect of preventing other
* transformations that happen afterward in png_do_read_transformations,
* transformations that happen afterward in png_do_read_transformations;
* resolve the interdependencies here. From the code of
* png_do_read_transformations the order is:
*
@@ -1459,8 +1460,8 @@ png_init_read_transformations(png_structrp png_ptr)
}
}
}
#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */
#endif /* PNG_READ_GRAY_TO_RGB_SUPPORTED */
#endif /* READ_EXPAND && READ_BACKGROUND */
#endif /* READ_GRAY_TO_RGB */
/* For indexed PNG data (PNG_COLOR_TYPE_PALETTE) many of the transformations
* can be performed directly on the palette, and some (such as rgb to gray)
@@ -1503,7 +1504,7 @@ png_init_read_transformations(png_structrp png_ptr)
CHOP(png_ptr->background.gray);
# undef CHOP
}
#endif /* PNG_READ_BACKGROUND_SUPPORTED && PNG_READ_EXPAND_16_SUPPORTED */
#endif /* READ_BACKGROUND && READ_EXPAND_16 */
#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
(defined(PNG_READ_SCALE_16_TO_8_SUPPORTED) || \
@@ -1797,7 +1798,7 @@ png_init_read_transformations(png_structrp png_ptr)
else
/* Transformation does not include PNG_BACKGROUND */
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
#endif /* READ_BACKGROUND */
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
/* RGB_TO_GRAY needs to have non-gamma-corrected values! */
@@ -1827,7 +1828,7 @@ png_init_read_transformations(png_structrp png_ptr)
#ifdef PNG_READ_BACKGROUND_SUPPORTED
else
#endif
#endif /* PNG_READ_GAMMA_SUPPORTED */
#endif /* READ_GAMMA */
#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* No GAMMA transformation (see the hanging else 4 lines above) */
@@ -1866,7 +1867,7 @@ png_init_read_transformations(png_structrp png_ptr)
png_ptr->transformations &= ~PNG_COMPOSE;
}
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
#endif /* READ_BACKGROUND */
#ifdef PNG_READ_SHIFT_SUPPORTED
if ((png_ptr->transformations & PNG_SHIFT) != 0 &&
@@ -1912,7 +1913,7 @@ png_init_read_transformations(png_structrp png_ptr)
png_ptr->palette[i].blue = (png_byte)component;
}
}
#endif /* PNG_READ_SHIFT_SUPPORTED */
#endif /* READ_SHIFT */
}
/* Modify the info structure to reflect the transformations. The
@@ -2017,7 +2018,7 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
CONFIGURATION ERROR: you must enable at least one 16 to 8 method
# endif
# endif
#endif /* !READ_16BIT_SUPPORTED */
#endif /* !READ_16BIT */
}
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
@@ -3911,7 +3912,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
}
}
}
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_READ_ALPHA_MODE_SUPPORTED */
#endif /* READ_BACKGROUND || READ_ALPHA_MODE */
#ifdef PNG_READ_GAMMA_SUPPORTED
/* Gamma correct the image, avoiding the alpha channel. Make sure
@@ -4690,7 +4691,7 @@ png_do_quantize(png_row_infop row_info, png_bytep row,
}
}
}
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
#endif /* READ_QUANTIZE */
/* Transform the row. The order of transformations is significant,
* and is very touchy. If you add a transformation, take care to
@@ -4885,7 +4886,7 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
if (row_info->rowbytes == 0)
png_error(png_ptr, "png_do_quantize returned rowbytes=0");
}
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
#endif /* READ_QUANTIZE */
#ifdef PNG_READ_EXPAND_16_SUPPORTED
/* Do the expansion now, after all the arithmetic has been done. Notice
@@ -4962,7 +4963,7 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
if ((png_ptr->transformations & PNG_USER_TRANSFORM) != 0)
{
{
if (png_ptr->read_user_transform_fn != NULL)
(*(png_ptr->read_user_transform_fn)) /* User read transform function */
(png_ptr, /* png_ptr */
@@ -4989,5 +4990,5 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
#endif
}
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
#endif /* PNG_READ_SUPPORTED */
#endif /* READ_TRANSFORMS */
#endif /* READ */

View File

@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -108,7 +108,7 @@ png_get_uint_16)(png_const_bytep buf)
return (png_uint_16)val;
}
#endif /* PNG_READ_INT_FUNCTIONS_SUPPORTED */
#endif /* READ_INT_FUNCTIONS */
/* Read and check the PNG file signature */
void /* PRIVATE */
@@ -321,7 +321,7 @@ png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size, int warn)
return buffer;
}
#endif /* PNG_READ_iCCP|iTXt|pCAL|sCAL|sPLT|tEXt|zTXt|SEQUENTIAL_READ */
#endif /* READ_iCCP|iTXt|pCAL|sCAL|sPLT|tEXt|zTXt|SEQUENTIAL_READ */
/* png_inflate_claim: claim the zstream for some nefarious purpose that involves
* decompression. Returns Z_OK on success, else a zlib error code. It checks
@@ -718,7 +718,7 @@ png_decompress_chunk(png_structrp png_ptr,
return Z_MEM_ERROR;
}
}
#endif /* PNG_READ_COMPRESSED_TEXT_SUPPORTED */
#endif /* READ_COMPRESSED_TEXT */
#ifdef PNG_READ_iCCP_SUPPORTED
/* Perform a partial read and decompress, producing 'avail_out' bytes and
@@ -1294,7 +1294,7 @@ png_handle_sRGB(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
(void)png_colorspace_set_sRGB(png_ptr, &png_ptr->colorspace, intent);
png_colorspace_sync(png_ptr, info_ptr);
}
#endif /* PNG_READ_sRGB_SUPPORTED */
#endif /* READ_sRGB */
#ifdef PNG_READ_iCCP_SUPPORTED
void /* PRIVATE */
@@ -1567,7 +1567,7 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
if (errmsg != NULL) /* else already output */
png_chunk_benign_error(png_ptr, errmsg);
}
#endif /* PNG_READ_iCCP_SUPPORTED */
#endif /* READ_iCCP */
#ifdef PNG_READ_sPLT_SUPPORTED
void /* PRIVATE */
@@ -1744,7 +1744,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
png_free(png_ptr, new_palette.entries);
}
#endif /* PNG_READ_sPLT_SUPPORTED */
#endif /* READ_sPLT */
#ifdef PNG_READ_tRNS_SUPPORTED
void /* PRIVATE */
@@ -2758,7 +2758,7 @@ png_cache_unknown_chunk(png_structrp png_ptr, png_uint_32 length)
return 1;
}
}
#endif /* PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */
#endif /* READ_UNKNOWN_CHUNKS */
/* Handle an unknown, or known but disabled, chunk */
void /* PRIVATE */
@@ -2858,7 +2858,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
else
/* Use the SAVE_UNKNOWN_CHUNKS code or skip the chunk */
# endif /* PNG_READ_USER_CHUNKS_SUPPORTED */
# endif /* READ_USER_CHUNKS */
# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
{
@@ -2925,7 +2925,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
--(png_ptr->user_chunk_cache_max);
/* FALL THROUGH */
case 0: /* no limit */
# endif /* PNG_USER_LIMITS_SUPPORTED */
# endif /* USER_LIMITS */
/* Here when the limit isn't reached or when limits are compiled
* out; store the chunk.
*/
@@ -2954,7 +2954,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
png_crc_finish(png_ptr, length);
PNG_UNUSED(info_ptr)
PNG_UNUSED(keep)
#endif /* !PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */
#endif /* !READ_UNKNOWN_CHUNKS */
/* Check for unhandled critical chunks */
if (handled == 0 && PNG_CHUNK_CRITICAL(png_ptr->chunk_name))
@@ -3193,7 +3193,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
*/
# define MASK(pass,depth,display,png)\
((display)?B_MASK(pass,depth,png):S_MASK(pass,depth,png))
#endif /* !PNG_USE_COMPILE_TIME_MASKS */
#endif /* !USE_COMPILE_TIME_MASKS */
/* Use the appropriate mask to copy the required bits. In some cases
* the byte mask will be 0 or 0xff; optimize these cases. row_width is
@@ -3444,7 +3444,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
return;
}
}
#endif /* PNG_ALIGN_ code */
#endif /* ALIGN_TYPE code */
/* The true default - use a memcpy: */
for (;;)
@@ -3468,7 +3468,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
/* Here if pixel_depth < 8 to check 'end_ptr' below. */
}
else
#endif /* PNG_READ_INTERLACING_SUPPORTED */
#endif /* READ_INTERLACING */
/* If here then the switch above wasn't used so just memcpy the whole row
* from the temporary row buffer (notice that this overwrites the end of the
@@ -3724,7 +3724,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
PNG_UNUSED(transformations) /* Silence compiler warning */
#endif
}
#endif /* PNG_READ_INTERLACING_SUPPORTED */
#endif /* READ_INTERLACING */
static void
png_read_filter_row_sub(png_row_infop row_info, png_bytep row,
@@ -4178,7 +4178,7 @@ png_read_finish_row(png_structrp png_ptr)
/* Here after at the end of the last row of the last pass. */
png_read_finish_IDAT(png_ptr);
}
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
#endif /* SEQUENTIAL_READ */
void /* PRIVATE */
png_read_start_row(png_structrp png_ptr)
@@ -4471,4 +4471,4 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_ptr->flags |= PNG_FLAG_ROW_INIT;
}
#endif /* PNG_READ_SUPPORTED */
#endif /* READ */

View File

@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -130,9 +130,9 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X,
png_fixed(png_ptr, blue_Y, "cHRM Red Y"),
png_fixed(png_ptr, blue_Z, "cHRM Red Z"));
}
# endif /* PNG_FLOATING_POINT_SUPPORTED */
# endif /* FLOATING_POINT */
#endif /* PNG_cHRM_SUPPORTED */
#endif /* cHRM */
#ifdef PNG_gAMA_SUPPORTED
void PNGFAPI
@@ -1069,7 +1069,7 @@ png_set_sPLT(png_const_structrp png_ptr,
if (nentries > 0)
png_chunk_report(png_ptr, "sPLT out of memory", PNG_CHUNK_WRITE_ERROR);
}
#endif /* PNG_sPLT_SUPPORTED */
#endif /* sPLT */
#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
static png_byte
@@ -1562,7 +1562,7 @@ png_set_chunk_malloc_max (png_structrp png_ptr,
if (png_ptr != NULL)
png_ptr->user_chunk_malloc_max = user_chunk_malloc_max;
}
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
#endif /* ?SET_USER_LIMITS */
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
@@ -1585,7 +1585,7 @@ png_set_benign_errors(png_structrp png_ptr, int allowed)
png_ptr->flags &= ~(PNG_FLAG_BENIGN_ERRORS_WARN |
PNG_FLAG_APP_WARNINGS_WARN | PNG_FLAG_APP_ERRORS_WARN);
}
#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
#endif /* BENIGN_ERRORS */
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
/* Whether to report invalid palette index; added at libng-1.5.10.
@@ -1608,4 +1608,4 @@ png_set_check_for_invalid_index(png_structrp png_ptr, int allowed)
png_ptr->num_palette_max = -1;
}
#endif
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
#endif /* READ || WRITE */

View File

@@ -274,7 +274,7 @@ struct png_struct_def
#ifdef PNG_READ_GAMMA_SUPPORTED
png_color_16 background_1; /* background normalized to gamma 1.0 */
#endif
#endif /* PNG_bKGD_SUPPORTED */
#endif /* bKGD */
#ifdef PNG_WRITE_FLUSH_SUPPORTED
png_flush_ptr output_flush_fn; /* Function for flushing output */
@@ -331,7 +331,7 @@ struct png_struct_def
int process_mode; /* what push library is currently doing */
int cur_palette; /* current push library palette index */
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
#endif /* PROGRESSIVE_READ */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
/* For the Borland special 64K segment handler */

View File

@@ -1,7 +1,7 @@
/* pngtest.c - a simple test program to test libpng
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -311,7 +311,7 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
}
}
}
#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */
#endif /* WRITE_USER_TRANSFORM */
#ifndef PNG_STDIO_SUPPORTED
/* START of code to validate stdio-free compilation */
@@ -420,7 +420,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING);
#endif
}
#endif /* !PNG_STDIO_SUPPORTED */
#endif /* !STDIO */
/* This function is called when there is a warning, but the library thinks
* it can continue anyway. Replacement functions don't have to do anything
@@ -605,7 +605,7 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
free(ptr);
ptr = NULL;
}
#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */
#endif /* USER_MEM && DEBUG */
/* END of code to test memory allocation/deallocation */
@@ -780,8 +780,8 @@ write_chunks(png_structp write_ptr, int location)
write_vpAg_chunk(write_ptr);
}
}
#endif /* PNG_WRITE_SUPPORTED */
#else /* !PNG_READ_USER_CHUNKS_SUPPORTED */
#endif /* WRITE */
#else /* !READ_USER_CHUNKS */
# define write_chunks(pp,loc) ((void)0)
#endif
/* END of code to demonstrate user chunk support */
@@ -1290,7 +1290,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
tIME_chunk_present++;
#endif /* PNG_TIME_RFC1123_SUPPORTED */
#endif /* TIME_RFC1123 */
}
}
#endif
@@ -1406,7 +1406,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
t_encode += (t_stop - t_start);
t_start = t_stop;
#endif
#endif /* PNG_WRITE_SUPPORTED */
#endif /* WRITE */
#ifndef SINGLE_ROWBUF_ALLOC
pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y);
@@ -1473,7 +1473,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
tIME_chunk_present++;
#endif /* PNG_TIME_RFC1123_SUPPORTED */
#endif /* TIME_RFC1123 */
}
}
#endif
@@ -1678,7 +1678,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
}
}
#endif /* PNG_WRITE_SUPPORTED */
#endif /* WRITE */
FCLOSE(fpin);
FCLOSE(fpout);
@@ -1835,7 +1835,7 @@ main(int argc, char *argv[])
fprintf(STDERR, " tIME = %s\n", tIME_string);
tIME_chunk_present = 0;
#endif /* PNG_TIME_RFC1123_SUPPORTED */
#endif /* TIME_RFC1123 */
}
else
@@ -1924,7 +1924,7 @@ main(int argc, char *argv[])
#ifdef PNG_TIME_RFC1123_SUPPORTED
if (tIME_chunk_present != 0)
fprintf(STDERR, " tIME = %s\n", tIME_string);
#endif /* PNG_TIME_RFC1123_SUPPORTED */
#endif /* TIME_RFC1123 */
}
}
@@ -2008,4 +2008,4 @@ main(void)
#endif
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_15beta07 Your_png_h_is_not_version_1_6_15beta07;
typedef png_libpng_version_1_6_16beta02 Your_png_h_is_not_version_1_6_16beta02;

View File

@@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -478,7 +478,7 @@ png_do_packswap(png_row_infop row_info, png_bytep row)
*rp = table[*rp];
}
}
#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */
#endif /* PACKSWAP || WRITE_PACKSWAP */
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
@@ -675,7 +675,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
#endif
}
}
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
#endif /* READ_BGR || WRITE_BGR */
#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
@@ -778,7 +778,7 @@ png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
}
}
}
#endif /* PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED */
#endif /* CHECK_FOR_INVALID_INDEX */
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
@@ -844,7 +844,6 @@ png_get_current_pass_number(png_const_structrp png_ptr)
return png_ptr->pass;
return 8; /* invalid */
}
#endif /* PNG_USER_TRANSFORM_INFO_SUPPORTED */
#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED ||
PNG_WRITE_USER_TRANSFORM_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
#endif /* USER_TRANSFORM_INFO */
#endif /* READ_USER_TRANSFORM || WRITE_USER_TRANSFORM */
#endif /* READ || WRITE */

View File

@@ -1,7 +1,7 @@
/* pngwio.c - functions for data output
*
* Last changed in libpng 1.6.9 [February 6, 2014]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -151,7 +151,7 @@ png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr,
# endif
#else
PNG_UNUSED(output_flush_fn)
#endif /* PNG_WRITE_FLUSH_SUPPORTED */
#endif /* WRITE_FLUSH */
#ifdef PNG_READ_SUPPORTED
/* It is an error to read while writing a png file */
@@ -165,4 +165,4 @@ png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr,
}
#endif
}
#endif /* PNG_WRITE_SUPPORTED */
#endif /* WRITE */

View File

@@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -69,7 +69,7 @@ write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr,
}
}
}
#endif /* PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED */
#endif /* WRITE_UNKNOWN_CHUNKS */
/* Writes all the PNG information. This is the suggested way to use the
* library. If you have a new chunk to add, make a function to write it,
@@ -497,7 +497,7 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
{
png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr,
error_fn, warn_fn, mem_ptr, malloc_fn, free_fn);
#endif /* PNG_USER_MEM_SUPPORTED */
#endif /* USER_MEM */
if (png_ptr != NULL)
{
/* Set the zlib control values to defaults; they can be overridden by the
@@ -521,7 +521,7 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
png_ptr->zlib_text_mem_level = 8;
png_ptr->zlib_text_window_bits = 15;
png_ptr->zlib_text_method = 8;
#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */
#endif /* WRITE_COMPRESSED_TEXT */
/* This is a highly dubious configuration option; by default it is off,
* but it may be appropriate for private builds that are testing
@@ -671,10 +671,10 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
*(rp + 5) = (png_byte)(blue & 0xff);
}
}
#endif /* PNG_WRITE_16BIT_SUPPORTED */
#endif /* WRITE_16BIT */
}
}
#endif /* PNG_MNG_FEATURES_SUPPORTED */
#endif /* MNG_FEATURES */
/* Called by user to write a row of image data */
void PNGAPI
@@ -915,7 +915,7 @@ png_write_flush(png_structrp png_ptr)
png_ptr->flush_rows = 0;
png_flush(png_ptr);
}
#endif /* PNG_WRITE_FLUSH_SUPPORTED */
#endif /* WRITE_FLUSH */
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
static void png_reset_filter_heuristics(png_structrp png_ptr);/* forward decl */
@@ -1019,7 +1019,7 @@ png_set_filter(png_structrp png_ptr, int method, int filters)
case 6:
case 7: png_app_error(png_ptr, "Unknown row filter for method 0");
/* FALL THROUGH */
#endif /* PNG_WRITE_FILTER_SUPPORTED */
#endif /* WRITE_FILTER */
case PNG_FILTER_VALUE_NONE:
png_ptr->do_filter = PNG_FILTER_NONE; break;
@@ -1041,7 +1041,7 @@ png_set_filter(png_structrp png_ptr, int method, int filters)
#else
default:
png_app_error(png_ptr, "Unknown row filter for method 0");
#endif /* PNG_WRITE_FILTER_SUPPORTED */
#endif /* WRITE_FILTER */
}
/* If we have allocated the row_buf, this means we have already started
@@ -1118,7 +1118,7 @@ png_set_filter(png_structrp png_ptr, int method, int filters)
}
if (png_ptr->do_filter == PNG_NO_FILTERS)
#endif /* PNG_WRITE_FILTER_SUPPORTED */
#endif /* WRITE_FILTER */
png_ptr->do_filter = PNG_FILTER_NONE;
}
}
@@ -1370,7 +1370,7 @@ png_set_filter_heuristics_fixed(png_structrp png_ptr, int heuristic_method,
}
}
#endif /* FIXED_POINT */
#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
#endif /* WRITE_WEIGHTED_FILTER */
void PNGAPI
png_set_compression_level(png_structrp png_ptr, int level)
@@ -1527,7 +1527,7 @@ png_set_text_compression_method(png_structrp png_ptr, int method)
png_ptr->zlib_text_method = method;
}
#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */
#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */
/* end of API added to libpng-1.5.4 */
void PNGAPI
@@ -2450,6 +2450,6 @@ png_image_write_to_file(png_imagep image, const char *file_name,
else
return 0;
}
#endif /* PNG_STDIO_SUPPORTED */
#endif /* STDIO */
#endif /* SIMPLIFIED_WRITE */
#endif /* PNG_WRITE_SUPPORTED */
#endif /* WRITE */

View File

@@ -1,7 +1,7 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -353,7 +353,7 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save[1];
}
}
#endif /* PNG_WRITE_16BIT_SUPPORTED */
#endif /* WRITE_16BIT */
}
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
@@ -392,7 +392,7 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save[1];
}
}
#endif /* PNG_WRITE_16BIT_SUPPORTED */
#endif /* WRITE_16BIT */
}
}
}
@@ -449,7 +449,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++));
}
}
#endif /* PNG_WRITE_16BIT_SUPPORTED */
#endif /* WRITE_16BIT */
}
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
@@ -487,7 +487,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++));
}
}
#endif /* PNG_WRITE_16BIT_SUPPORTED */
#endif /* WRITE_16BIT */
}
}
}
@@ -538,8 +538,10 @@ png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info)
#endif
#ifdef PNG_WRITE_SWAP_SUPPORTED
# ifdef PNG_16BIT_SUPPORTED
if ((png_ptr->transformations & PNG_SWAP_BYTES) != 0)
png_do_swap(row_info, png_ptr->row_buf + 1);
# endif
#endif
#ifdef PNG_WRITE_SHIFT_SUPPORTED
@@ -568,5 +570,5 @@ png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info)
png_do_invert(row_info, png_ptr->row_buf + 1);
#endif
}
#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
#endif /* PNG_WRITE_SUPPORTED */
#endif /* WRITE_TRANSFORMS */
#endif /* WRITE */

View File

@@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
* Last changed in libpng 1.6.15 [(PENDING RELEASE)]
* Last changed in libpng 1.6.15 [November 20, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -286,7 +286,7 @@ optimize_cmf(png_bytep data, png_alloc_size_t data_size)
}
}
}
#endif /* PNG_WRITE_OPTIMIZE_CMF_SUPPORTED */
#endif /* WRITE_OPTIMIZE_CMF */
/* Initialize the compressor for the appropriate type of compression. */
static int
@@ -663,7 +663,7 @@ png_write_compressed_data_out(png_structrp png_ptr, compression_state *comp)
if (output_len > 0)
png_error(png_ptr, "error writing ancillary chunked compressed data");
}
#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */
#endif /* WRITE_COMPRESSED_TEXT */
#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
@@ -743,11 +743,11 @@ png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key)
png_formatted_warning(png_ptr, p, "keyword \"@1\": bad character '0x@2'");
}
#endif /* PNG_WARNINGS_SUPPORTED */
#endif /* WARNINGS */
return key_len;
}
#endif
#endif /* WRITE_TEXT || WRITE_pCAL || WRITE_iCCP || WRITE_sPLT */
/* Write the IHDR chunk, and update the png_struct with the necessary
* information. Note that the rest of this code depends upon this
@@ -2015,7 +2015,7 @@ png_write_start_row(png_structrp png_ptr)
png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
}
}
#endif /* PNG_WRITE_FILTER_SUPPORTED */
#endif /* WRITE_FILTER */
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* If interlaced, we need to set up width and height of pass */
@@ -2905,7 +2905,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
#endif
p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;
#else /* PNG_SLOW_PAETH */
#else /* SLOW_PAETH */
p = a + b - c;
pa = abs(p - a);
pb = abs(p - b);
@@ -2919,7 +2919,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
else
p = c;
#endif /* PNG_SLOW_PAETH */
#endif /* SLOW_PAETH */
v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff);
@@ -2968,7 +2968,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
best_row = png_ptr->paeth_row;
}
}
#endif /* PNG_WRITE_FILTER_SUPPORTED */
#endif /* WRITE_FILTER */
/* Do the actual writing of the filtered row data from the chosen filter. */
png_write_filtered_row(png_ptr, best_row, row_info->rowbytes+1);
@@ -2988,7 +2988,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
png_ptr->prev_filters[j] = best_row[0];
}
#endif
#endif /* PNG_WRITE_FILTER_SUPPORTED */
#endif /* WRITE_FILTER */
}
@@ -3024,6 +3024,6 @@ png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
{
png_write_flush(png_ptr);
}
#endif
#endif /* WRITE_FLUSH */
}
#endif /* PNG_WRITE_SUPPORTED */
#endif /* WRITE */

View File

@@ -1,7 +1,7 @@
VisualStudio instructions
libpng version 1.6.15beta07 - November 6, 2014
libpng version 1.6.16beta02 - December 15, 2014
Copyright (c) 1998-2010 Glenn Randers-Pehrson

View File

@@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
* libpng version 1.6.15beta07 - November 6, 2014
* libpng version 1.6.16beta02 - December 15, 2014
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*

View File

@@ -1,9 +1,9 @@
Makefiles for libpng version 1.6.15beta07 - November 6, 2014
Makefiles for libpng version 1.6.16beta02 - December 15, 2014
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
(gcc, creates libpng16.so.16.1.6.15beta07)
(gcc, creates libpng16.so.16.1.6.16beta02)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -33,12 +33,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
creates libpng16.so.16.1.6.15beta07)
creates libpng16.so.16.1.6.16beta02)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng16.so.16.1.6.15beta07)
creates libpng16.so.16.1.6.16beta02)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng16.so.16.1.6.15beta07)
creates libpng16.so.16.1.6.16beta02)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile

View File

@@ -1,7 +1,7 @@
/* def.dfn - define format of libpng.def
/* def.c - define format of libpng.def
*
* Last changed in libpng version 1.5.7 [December 15, 2011]
* Copyright (c) 2010-2011 Glenn Randers-Pehrson
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Copyright (c) 2010-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
PNG_DFN ""
PNG_DFN "EXPORTS"
PNG_DFN ";Version 1.6.15beta07"
PNG_DFN ";Version 1.6.16beta02"
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"

View File

@@ -1,8 +1,8 @@
/* intprefix.dfn - generate an unprefixed internal symbol list
/* intprefix.c - generate an unprefixed internal symbol list
*
* Last changed in libpng version 1.6.0 [January 30, 2012]
* Copyright (c) 2012 Glenn Randers-Pehrson
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Copyright (c) 2012-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer

View File

@@ -11,7 +11,7 @@
# Modeled after libxml-config.
version=1.6.15beta07
version=1.6.16beta02
prefix=""
libdir=""
libs=""

View File

@@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
Name: libpng
Description: Loads and saves PNG files
Version: 1.6.15beta07
Version: 1.6.16beta02
Libs: -L${libdir} -lpng16
Cflags: -I${includedir}

View File

@@ -52,7 +52,9 @@ LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
# Pre-built configuration
# See scripts\pnglibconf.mak for more options
!ifndef PNGLIBCONF_H_PREBUILT
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
!endif
## Variables
OBJS = \

View File

@@ -60,7 +60,9 @@ LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
# Pre-built configuration
# See scripts\pnglibconf.mak for more options
!ifndef PNGLIBCONF_H_PREBUILT
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
!endif
## Variables

View File

@@ -23,7 +23,7 @@
VERMAJ = 1
VERMIN = 6
VERMIC = 15
VERMIC = 16
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng
PACKAGE = $(NAME)-$(VER)

View File

@@ -36,12 +36,11 @@ LN_SF=ln -sf
RANLIB=ranlib
CP=cp
RM_F=/bin/rm -f
ARCH=-arch ppc -arch i386 -arch x86_64
CPPFLAGS=-I$(ZLIBINC)
# CFLAGS=-W -Wall -O3 -funroll-loops
CFLAGS=-W -Wall -O -funroll-loops $(ARCH)
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz $(ARCH)
CFLAGS=-W -Wall -O -funroll-loops
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
@@ -113,7 +112,7 @@ $(LIBSOMAJ): $(OBJSDLL)
$(CC) -dynamiclib \
-install_name $(LIBPATH)/$(LIBSOMAJ) \
-current_version 16 -compatibility_version 16 \
$(ARCH) -o $(LIBSOMAJ) \
-o $(LIBSOMAJ) \
$(OBJSDLL) -L$(ZLIBLIB) -lz
pngtest: pngtest.o $(LIBSO)

View File

@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
RELEASE = 15
RELEASE = 16
# Shared library names:
LIBSO=$(LIBNAME).so

View File

@@ -18,7 +18,7 @@ exec_prefix=$(prefix)
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
RELEASE = 15
RELEASE = 16
# Shared library names:
LIBSO=$(LIBNAME).dll

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16
LIB= png16
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.6.15beta07
SHLIB_MINOR= 1.6.16beta02
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 16
SHLIB_MINOR= 1.6.15beta07
SHLIB_MINOR= 1.6.16beta02
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 16
SHLIB_MINOR= 1.6.15beta07
SHLIB_MINOR= 1.6.16beta02
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \

View File

@@ -16,7 +16,9 @@ CP=copy
# Pre-built configuration
# See scripts\pnglibconf.mak for more options
!ifndef PNGLIBCONF_H_PREBUILT
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
!endif
O=.obj
E=.exe

View File

@@ -16,7 +16,7 @@ CC = cl
LD = link
AR = lib
CPPFLAGS = -I..\zlib
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -MD -O2 -W3
LDFLAGS = -nologo
ARFLAGS = -nologo
CP = copy

View File

@@ -303,7 +303,7 @@ option BENIGN_READ_ERRORS requires BENIGN_ERRORS
option MNG_FEATURES
# Arithmetic options, the first is the big switch that chooses between internal
# floating and fixed point arithmetic implementations - it does not affect an
# floating and fixed point arithmetic implementations - it does not affect any
# APIs. The second two (the _POINT settings) switch off individual APIs.
#
# Prior to libpng 1.6.8 one of the API (_POINT) variants had to be selected. At

View File

@@ -1,8 +1,8 @@
/* libpng 1.6.15beta07 STANDARD API DEFINITION */
/* libpng 1.6.16beta02 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
/* Libpng version 1.6.15beta07 - November 6, 2014 */
/* Libpng version 1.6.16beta02 - December 15, 2014 */
/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */

View File

@@ -1,8 +1,8 @@
/* prefix.dfn - generate an unprefixed symbol list
/* prefix.c - generate an unprefixed symbol list
*
* Last changed in libpng version 1.6.0 [January 30, 2012]
* Copyright (c) 2012 Glenn Randers-Pehrson
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Copyright (c) 2012-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer

View File

@@ -1,8 +1,8 @@
/* sym.dfn - define format of libpng.sym
/* sym.c - define format of libpng.sym
*
* Last changed in libpng version 1.5.0 [January 6, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer

View File

@@ -1,8 +1,8 @@
/* symbols.dfn - find all exported symbols
/* symbols.c - find all exported symbols
*
* Last changed in libpng version 1.5.0 [January 6, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer

View File

@@ -1,4 +1,4 @@
;Version 1.6.15beta07
;Version 1.6.16beta02
;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng

View File

@@ -1,8 +1,8 @@
/* vers.dfn - define format of libpng.vers
/* vers.c - define format of libpng.vers
*
* Last changed in libpng version 1.5.0 [January 6, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer