mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
30 Commits
v1.6.3beta
...
libpng-1.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
209d3eb5c6 | ||
|
|
d42dc54df5 | ||
|
|
877afaf17e | ||
|
|
8c49ddcf56 | ||
|
|
5680f5d6f2 | ||
|
|
324402044f | ||
|
|
685d79e27a | ||
|
|
52083f9152 | ||
|
|
7191f6e9e6 | ||
|
|
4dcbf24d82 | ||
|
|
492e67163e | ||
|
|
5881b11629 | ||
|
|
847e9efb66 | ||
|
|
db56fa18c2 | ||
|
|
bc8e40d611 | ||
|
|
2b87a54d07 | ||
|
|
b23afad4a1 | ||
|
|
f5d7f438e5 | ||
|
|
b4ec1f8451 | ||
|
|
f5f1206778 | ||
|
|
497e7319f4 | ||
|
|
d5dd93f5d1 | ||
|
|
7f9a49aa65 | ||
|
|
573c9d434f | ||
|
|
56a1a66656 | ||
|
|
d992e05da8 | ||
|
|
870beb5279 | ||
|
|
b0d97356ce | ||
|
|
04d4e38ac2 | ||
|
|
67a46d17d8 |
106
ANNOUNCE
106
ANNOUNCE
@@ -1,109 +1,35 @@
|
|||||||
|
|
||||||
Libpng 1.6.3beta08 - June 18, 2013
|
Libpng 1.6.4 - September 12, 2013
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is a public release of libpng, intended for use in production codes.
|
||||||
within a few weeks by a public version or by another test version.
|
|
||||||
|
|
||||||
Files available for download:
|
Files available for download:
|
||||||
|
|
||||||
Source files with LF line endings (for Unix/Linux) and with a
|
Source files with LF line endings (for Unix/Linux) and with a
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
1.6.3beta08.tar.xz (LZMA-compressed, recommended)
|
libpng-1.6.4.tar.xz (LZMA-compressed, recommended)
|
||||||
1.6.3beta08.tar.gz
|
libpng-1.6.4.tar.gz
|
||||||
|
|
||||||
Source files with CRLF line endings (for Windows), without the
|
Source files with CRLF line endings (for Windows), without the
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
lp163b08.7z (LZMA-compressed, recommended)
|
lpng164.7z (LZMA-compressed, recommended)
|
||||||
lp163b08.zip
|
lpng164.zip
|
||||||
|
|
||||||
Other information:
|
Other information:
|
||||||
|
|
||||||
1.6.3beta08-README.txt
|
libpng-1.6.4-README.txt
|
||||||
1.6.3beta08-LICENSE.txt
|
libpng-1.6.4-LICENSE.txt
|
||||||
|
Gnupg/*.asc (PGP armored detached signatures)
|
||||||
|
|
||||||
Changes since the last public release (1.6.2):
|
Changes since the last public release (1.6.3):
|
||||||
|
Added information about png_set_options() to the manual.
|
||||||
Version 1.6.3beta01 [April 25, 2013]
|
Delay calling png_init_filter_functions() until a row with nonzero filter
|
||||||
Revised stack marking in arm/filter_neon.S and configure.ac.
|
is found.
|
||||||
Ensure that NEON filter stuff is completely disabled when switched 'off'.
|
Fixed inconsistent conditional compilation of png_chunk_unknown_handling()
|
||||||
Previously the ARM NEON specific files were still built if the option
|
prototype, definition, and usage. Made it depend on
|
||||||
was switched 'off' as opposed to being explicitly disabled.
|
PNG_HANDLE_AS_UNKNOWN_SUPPORTED everywhere.
|
||||||
|
|
||||||
Version 1.6.3beta02 [April 26, 2013]
|
|
||||||
Test for 'arm*' not just 'arm' in the host_cpu configure variable.
|
|
||||||
Rebuilt the configure scripts.
|
|
||||||
|
|
||||||
Version 1.6.3beta03 [April 30, 2013]
|
|
||||||
Expanded manual paragraph about writing private chunks, particularly
|
|
||||||
the need to call png_set_keep_unknown_chunks() when writing them.
|
|
||||||
Avoid dereferencing NULL pointer possibly returned from
|
|
||||||
png_create_write_struct() (Andrew Church).
|
|
||||||
|
|
||||||
Version 1.6.3beta05 [May 9, 2013]
|
|
||||||
Calculate our own zlib windowBits when decoding rather than trusting the
|
|
||||||
CMF bytes in the PNG datastream.
|
|
||||||
Added an option to force maximum window size for inflating, which was
|
|
||||||
the behavior of libpng15 and earlier.
|
|
||||||
Added png-fix-itxt and png-fix-too-far-back to the built programs and
|
|
||||||
removed warnings from the source code and timepng that are revealed as
|
|
||||||
a result.
|
|
||||||
Detect wrong libpng versions linked to png-fix-too-far-back, which currently
|
|
||||||
only works with libpng versions that can be made to reliably fail when
|
|
||||||
the deflate data contains an out-of-window reference. This means only
|
|
||||||
1.6 and later.
|
|
||||||
Fixed gnu issues: g++ needs a static_cast, gcc 4.4.7 has a broken warning
|
|
||||||
message which it is easier to work round than ignore.
|
|
||||||
Updated contrib/pngminus/pnm2png.c (Paul Stewart):
|
|
||||||
Check for EOF
|
|
||||||
Ignore "#" delimited comments in input file to pnm2png.c.
|
|
||||||
Fixed whitespace handling
|
|
||||||
Added a call to png_set_packing()
|
|
||||||
Initialize dimension values so if sscanf fails at least we have known
|
|
||||||
invalid values.
|
|
||||||
Attempt to detect configuration issues with png-fix-too-far-back, which
|
|
||||||
requires both the correct libpng and the correct zlib to function
|
|
||||||
correctly.
|
|
||||||
Check ZLIB_VERNUM for mismatches, enclose #error in quotes
|
|
||||||
Added information in the documentation about problems with and fixes for
|
|
||||||
the bad CRC and bad iTXt chunk situations.
|
|
||||||
|
|
||||||
Version 1.6.3beta06 [May 12, 2013]
|
|
||||||
Allow contrib/pngminus/pnm2png.c to compile without WRITE_INVERT and
|
|
||||||
WRITE_PACK supported (writes error message that it can't read P1 or
|
|
||||||
Improved png-fix-too-far-back usage message, added --suffix option.
|
|
||||||
Revised contrib/pngminim/*/makefile to generate pnglibconf.h with the
|
|
||||||
right zlib header files.
|
|
||||||
Separated CPPFLAGS and CFLAGS in contrib/pngminim/*/makefile
|
|
||||||
|
|
||||||
Version 1.6.3beta07 [June 8, 2013]
|
|
||||||
Removed a redundant test in png_set_IHDR().
|
|
||||||
Added set(CMAKE_CONFIGURATION_TYPES ...) to CMakeLists.txt (Andrew Hundt)
|
|
||||||
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
|
|
||||||
Enclose the prototypes for the simplified write API in
|
|
||||||
#ifdef PNG_STDIO_SUPPORTED/#endif
|
|
||||||
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.
|
|
||||||
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.
|
|
||||||
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.
|
|
||||||
|
|
||||||
Version 1.6.3beta08 [June 18, 2013]
|
|
||||||
Revised libpng.3 so that "doclift" can process it.
|
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
49
CHANGES
49
CHANGES
@@ -4047,7 +4047,9 @@ Version 1.6.0beta17 [March 10, 2012]
|
|||||||
Deflate/inflate was reworked to move common zlib calls into single
|
Deflate/inflate was reworked to move common zlib calls into single
|
||||||
functions [rw]util.c. A new shared keyword check routine was also added
|
functions [rw]util.c. A new shared keyword check routine was also added
|
||||||
and the 'zbuf' is no longer allocated on progressive read. It is now
|
and the 'zbuf' is no longer allocated on progressive read. It is now
|
||||||
possible to call png_inflate() incrementally.
|
possible to call png_inflate() incrementally. A warning is no longer
|
||||||
|
issued if the language tag or translated keyword in the iTXt chunk
|
||||||
|
has zero length.
|
||||||
If benign errors are disabled use maximum window on ancilliary inflate.
|
If benign errors are disabled use maximum window on ancilliary inflate.
|
||||||
This works round a bug introduced in 1.5.4 where compressed ancillary
|
This works round a bug introduced in 1.5.4 where compressed ancillary
|
||||||
chunks could end up with a too-small windowBits value in the deflate
|
chunks could end up with a too-small windowBits value in the deflate
|
||||||
@@ -4587,7 +4589,50 @@ Version 1.6.3beta07 [June 8, 2013]
|
|||||||
it is not used, so that it will always get prefixed.
|
it is not used, so that it will always get prefixed.
|
||||||
|
|
||||||
Version 1.6.3beta08 [June 18, 2013]
|
Version 1.6.3beta08 [June 18, 2013]
|
||||||
Revised libpng.3 so that "doclift" can process it.
|
Revised libpng.3 so that "doclifter" can process it.
|
||||||
|
|
||||||
|
Version 1.6.3beta09 [June 27, 2013]
|
||||||
|
Revised example.c to illustrate use of PNG_DEFAULT_sRGB and PNG_GAMMA_MAC_18
|
||||||
|
as parameters for png_set_gamma(). These have been available since
|
||||||
|
libpng-1.5.4.
|
||||||
|
Renamed contrib/tools/png-fix-too-far-back.c to pngfix.c and revised it
|
||||||
|
to check all compressed chunks known to libpng.
|
||||||
|
|
||||||
|
Version 1.6.3beta10 [July 5, 2013]
|
||||||
|
Updated documentation to show default behavior of benign errors correctly.
|
||||||
|
Only compile ARM code when PNG_READ_SUPPORTED is defined.
|
||||||
|
Fixed undefined behavior in contrib/tools/pngfix.c and added new strip
|
||||||
|
option. pngfix relied on undefined behavior and even a simple change from
|
||||||
|
gcc to g++ caused it to fail. The new strip option 'unsafe' has been
|
||||||
|
implemented and is the default if --max is given. Option names have
|
||||||
|
been clarified, with --strip=transform now stripping the bKGD chunk,
|
||||||
|
which was stripped previously with --strip=unused.
|
||||||
|
Added all documented chunk types to pngpriv.h
|
||||||
|
Unified pngfix.c source with libpng17.
|
||||||
|
|
||||||
|
Version 1.6.3rc01 [July 11, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.6.3 [July 18, 2013]
|
||||||
|
Revised manual about changes in iTXt chunk handling made in libpng-1.6.0.
|
||||||
|
Added "/* SAFE */" comments in pngrutil.c and pngrtran.c where warnings
|
||||||
|
may be erroneously issued by code-checking applications.
|
||||||
|
|
||||||
|
Version 1.6.4beta01 [August 21, 2013]
|
||||||
|
Added information about png_set_options() to the manual.
|
||||||
|
Delay calling png_init_filter_functions() until a row with nonzero filter
|
||||||
|
is found.
|
||||||
|
|
||||||
|
Version 1.6.4beta02 [August 30, 2013]
|
||||||
|
Fixed inconsistent conditional compilation of png_chunk_unknown_handling()
|
||||||
|
prototype, definition, and usage. Made it depend on
|
||||||
|
PNG_HANDLE_AS_UNKNOWN_SUPPORTED everywhere.
|
||||||
|
|
||||||
|
Version 1.6.4rc01 [September 5, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.6.4 [September 12, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ enable_testing()
|
|||||||
|
|
||||||
set(PNGLIB_MAJOR 1)
|
set(PNGLIB_MAJOR 1)
|
||||||
set(PNGLIB_MINOR 6)
|
set(PNGLIB_MINOR 6)
|
||||||
set(PNGLIB_RELEASE 3)
|
set(PNGLIB_RELEASE 4)
|
||||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
|
|||||||
# SET UP LINKS
|
# SET UP LINKS
|
||||||
if(PNG_SHARED)
|
if(PNG_SHARED)
|
||||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||||
# VERSION 16.${PNGLIB_RELEASE}.1.6.3beta08
|
# VERSION 16.${PNGLIB_RELEASE}.1.6.4
|
||||||
VERSION 16.${PNGLIB_RELEASE}.0
|
VERSION 16.${PNGLIB_RELEASE}.0
|
||||||
SOVERSION 16
|
SOVERSION 16
|
||||||
CLEAN_DIRECT_OUTPUT 1)
|
CLEAN_DIRECT_OUTPUT 1)
|
||||||
|
|||||||
6
LICENSE
6
LICENSE
@@ -10,8 +10,8 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.6.3beta08, June 18, 2013, are
|
libpng versions 1.2.6, August 15, 2004, through 1.6.4, September 12, 2013, are
|
||||||
Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
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
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
June 18, 2013
|
September 12, 2013
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ ACLOCAL_AMFLAGS = -I scripts
|
|||||||
check_PROGRAMS= pngtest pngunknown pngstest pngvalid
|
check_PROGRAMS= pngtest pngunknown pngstest pngvalid
|
||||||
|
|
||||||
# Utilities - installed
|
# Utilities - installed
|
||||||
bin_PROGRAMS= png-fix-too-far-back png-fix-itxt
|
bin_PROGRAMS= pngfix png-fix-itxt
|
||||||
|
|
||||||
pngtest_SOURCES = pngtest.c
|
pngtest_SOURCES = pngtest.c
|
||||||
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
@@ -24,8 +24,8 @@ pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|||||||
pngunknown_SOURCES = contrib/libtests/pngunknown.c
|
pngunknown_SOURCES = contrib/libtests/pngunknown.c
|
||||||
pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
|
||||||
png_fix_too_far_back_SOURCES = contrib/tools/png-fix-too-far-back.c
|
pngfix_SOURCES = contrib/tools/pngfix.c
|
||||||
png_fix_too_far_back_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
|
||||||
png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
|
png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ $(srcdir)/scripts/pnglibconf.h.prebuilt:
|
|||||||
# an installed one (this can happen immediately after on a clean system if
|
# an installed one (this can happen immediately after on a clean system if
|
||||||
# 'make test' is the first thing the user does.)
|
# 'make test' is the first thing the user does.)
|
||||||
pngstest.o pngvalid.o pngtest.o pngunknown.o timepng.o: pnglibconf.h
|
pngstest.o pngvalid.o pngtest.o pngunknown.o timepng.o: pnglibconf.h
|
||||||
png-fix-too-far-back.o png-fix-itxt.o: pnglibconf.h
|
pngfix.o png-fix-itxt.o: pnglibconf.h
|
||||||
|
|
||||||
# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
|
# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
|
||||||
# be built with PNG_USE_READ_MACROS; this prevents the read macros from
|
# be built with PNG_USE_READ_MACROS; this prevents the read macros from
|
||||||
|
|||||||
2
README
2
README
@@ -1,4 +1,4 @@
|
|||||||
README for libpng version 1.6.3beta08 - June 18, 2013 (shared library 16.0)
|
README for libpng version 1.6.4 - September 12, 2013 (shared library 16.0)
|
||||||
See the note about version numbers near the top of png.h
|
See the note about version numbers near the top of png.h
|
||||||
|
|
||||||
See INSTALL for instructions on how to install libpng.
|
See INSTALL for instructions on how to install libpng.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
* Last changed in libpng 1.5.17 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.17 [July 18, 2013]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@@ -16,6 +16,9 @@
|
|||||||
|
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SUPPORTED
|
||||||
|
if (((png_ptr->options >> PNG_MAXIMUM_INFLATE_WINDOW) & 3) ==
|
||||||
|
PNG_OPTION_ON)
|
||||||
#if PNG_ARM_NEON_OPT > 0
|
#if PNG_ARM_NEON_OPT > 0
|
||||||
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
|
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
|
||||||
#include <signal.h> /* for sig_atomic_t */
|
#include <signal.h> /* for sig_atomic_t */
|
||||||
@@ -217,3 +220,4 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
* Last changed in libpng 1.5.17 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.17 [July 18, 2013]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SUPPORTED
|
||||||
#if PNG_ARM_NEON_OPT > 0
|
#if PNG_ARM_NEON_OPT > 0
|
||||||
|
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
@@ -233,3 +234,4 @@ func png_read_filter_row_paeth3_neon, export=1
|
|||||||
pop {r4,pc}
|
pop {r4,pc}
|
||||||
endfunc
|
endfunc
|
||||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ AC_PREREQ([2.68])
|
|||||||
|
|
||||||
dnl Version number stuff here:
|
dnl Version number stuff here:
|
||||||
|
|
||||||
AC_INIT([libpng],[1.6.3beta08],[png-mng-implement@lists.sourceforge.net])
|
AC_INIT([libpng],[1.6.4],[png-mng-implement@lists.sourceforge.net])
|
||||||
AC_CONFIG_MACRO_DIR([scripts])
|
AC_CONFIG_MACRO_DIR([scripts])
|
||||||
|
|
||||||
# libpng does not follow GNU file name conventions (hence 'foreign')
|
# 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 AM_PREREQ([1.11.2])
|
||||||
dnl stop configure from automagically running automake
|
dnl stop configure from automagically running automake
|
||||||
|
|
||||||
PNGLIB_VERSION=1.6.3beta08
|
PNGLIB_VERSION=1.6.4
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=6
|
PNGLIB_MINOR=6
|
||||||
PNGLIB_RELEASE=3
|
PNGLIB_RELEASE=4
|
||||||
|
|
||||||
dnl End of version number stuff
|
dnl End of version number stuff
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/* png-fix-itxt version 1.0.0
|
/* png-fix-itxt version 1.0.0
|
||||||
*
|
*
|
||||||
* Copyright 2013 Glenn Randers-Pehrson
|
* Copyright 2013 Glenn Randers-Pehrson
|
||||||
* Last changed in libpng 1.6.3 [(PENDING RELEASE)]
|
* Last changed in libpng 1.6.3 [July 18, 2013]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
4010
contrib/tools/pngfix.c
Normal file
4010
contrib/tools/pngfix.c
Normal file
File diff suppressed because it is too large
Load Diff
10
example.c
10
example.c
@@ -2,7 +2,7 @@
|
|||||||
#if 0 /* in case someone actually tries to compile this */
|
#if 0 /* in case someone actually tries to compile this */
|
||||||
|
|
||||||
/* example.c - an example of using libpng
|
/* example.c - an example of using libpng
|
||||||
* Last changed in libpng 1.6.0 [February 14, 2013]
|
* Last changed in libpng 1.6.3 [July 18, 2013]
|
||||||
* Maintained 1998-2013 Glenn Randers-Pehrson
|
* Maintained 1998-2013 Glenn Randers-Pehrson
|
||||||
* Maintained 1996, 1997 Andreas Dilger)
|
* Maintained 1996, 1997 Andreas Dilger)
|
||||||
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -441,9 +441,9 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
|
|||||||
/* If we don't have another value */
|
/* If we don't have another value */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen_gamma = 2.2; /* A good guess for a PC monitor in a dimly
|
screen_gamma = PNG_DEFAULT_sRGB; /* A good guess for a PC monitor
|
||||||
lit room */
|
in a dimly lit room */
|
||||||
screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */
|
screen_gamma = PNG_GAMMA_MAC_18 or 1.0; /* Good guesses for Mac systems */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tell libpng to handle the gamma conversion for you. The final call
|
/* Tell libpng to handle the gamma conversion for you. The final call
|
||||||
@@ -455,7 +455,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
|
|||||||
int intent;
|
int intent;
|
||||||
|
|
||||||
if (png_get_sRGB(png_ptr, info_ptr, &intent))
|
if (png_get_sRGB(png_ptr, info_ptr, &intent))
|
||||||
png_set_gamma(png_ptr, screen_gamma, 0.45455);
|
png_set_gamma(png_ptr, screen_gamma, PNG_DEFAULT_sRGB);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double image_gamma;
|
double image_gamma;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.6.3beta08 - June 18, 2013
|
libpng version 1.6.4 - September 12, 2013
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
@@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.6.3beta08 - June 18, 2013
|
libpng versions 0.97, January 1998, through 1.6.4 - September 12, 2013
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -740,7 +740,7 @@ situations:
|
|||||||
encoding.
|
encoding.
|
||||||
|
|
||||||
You would use the linear (unencoded) value if you need to process the pixel
|
You would use the linear (unencoded) value if you need to process the pixel
|
||||||
values further because this avoids the need to decode and reencode each
|
values further because this avoids the need to decode and re-encode each
|
||||||
component value whenever arithmetic is performed. A lot of graphics software
|
component value whenever arithmetic is performed. A lot of graphics software
|
||||||
uses linear values for this reason, often with higher precision component values
|
uses linear values for this reason, often with higher precision component values
|
||||||
to preserve overall accuracy.
|
to preserve overall accuracy.
|
||||||
@@ -2289,7 +2289,7 @@ For a more compact example of reading a PNG image, see the file example.c.
|
|||||||
|
|
||||||
Reading PNG files progressively
|
Reading PNG files progressively
|
||||||
|
|
||||||
The progressive reader is slightly different then the non-progressive
|
The progressive reader is slightly different from the non-progressive
|
||||||
reader. Instead of calling png_read_info(), png_read_rows(), and
|
reader. Instead of calling png_read_info(), png_read_rows(), and
|
||||||
png_read_end(), you make one call to png_process_data(), which calls
|
png_read_end(), you make one call to png_process_data(), which calls
|
||||||
callbacks when it has the info, a row, or the end of the image. You
|
callbacks when it has the info, a row, or the end of the image. You
|
||||||
@@ -3535,7 +3535,7 @@ The simplified API, which became available in libpng-1.6.0, hides the details
|
|||||||
of both libpng and the PNG file format itself.
|
of both libpng and the PNG file format itself.
|
||||||
It allows PNG files to be read into a very limited number of
|
It allows PNG files to be read into a very limited number of
|
||||||
in-memory bitmap formats or to be written from the same formats. If these
|
in-memory bitmap formats or to be written from the same formats. If these
|
||||||
formats do not accomodate your needs then you can, and should, use the more
|
formats do not accommodate your needs then you can, and should, use the more
|
||||||
sophisticated APIs above - these support a wide variety of in-memory formats
|
sophisticated APIs above - these support a wide variety of in-memory formats
|
||||||
and a wide variety of sophisticated transformations to those formats as well
|
and a wide variety of sophisticated transformations to those formats as well
|
||||||
as a wide variety of APIs to manipulate ancilliary information.
|
as a wide variety of APIs to manipulate ancilliary information.
|
||||||
@@ -4026,9 +4026,12 @@ as warnings.
|
|||||||
|
|
||||||
png_set_benign_errors (png_ptr, int allowed);
|
png_set_benign_errors (png_ptr, int allowed);
|
||||||
|
|
||||||
allowed: 0: (default) treat png_benign_error() an error.
|
allowed: 0: treat png_benign_error() as an error.
|
||||||
1: treat png_benign_error() as a warning.
|
1: treat png_benign_error() as a warning.
|
||||||
|
|
||||||
|
As of libpng-1.6.0, the default condition is to treat benign errors as
|
||||||
|
warnings while reading and as errors while writing.
|
||||||
|
|
||||||
Custom chunks
|
Custom chunks
|
||||||
|
|
||||||
If you need to read or write custom chunks, you may need to get deeper
|
If you need to read or write custom chunks, you may need to get deeper
|
||||||
@@ -4606,7 +4609,7 @@ it has not been well tested and doesn't actually "dither".
|
|||||||
The code was not
|
The code was not
|
||||||
removed, however, and could be enabled by building libpng with
|
removed, however, and could be enabled by building libpng with
|
||||||
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
|
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
|
||||||
was reenabled, but the function was renamed png_set_quantize() to
|
was re-enabled, but the function was renamed png_set_quantize() to
|
||||||
reflect more accurately what it actually does. At the same time,
|
reflect more accurately what it actually does. At the same time,
|
||||||
the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
|
the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
|
||||||
PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
|
PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
|
||||||
@@ -4750,7 +4753,7 @@ did not exist.)
|
|||||||
Applications can now choose whether to use these macros or to call the
|
Applications can now choose whether to use these macros or to call the
|
||||||
corresponding function by defining PNG_USE_READ_MACROS or
|
corresponding function by defining PNG_USE_READ_MACROS or
|
||||||
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
||||||
only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0
|
only supported from 1.5.0; defining PNG_NO_USE_READ_MACROS prior to 1.5.0
|
||||||
will lead to a link failure.
|
will lead to a link failure.
|
||||||
|
|
||||||
Prior to libpng-1.5.4, the zlib compressor used the same set of parameters
|
Prior to libpng-1.5.4, the zlib compressor used the same set of parameters
|
||||||
@@ -4786,6 +4789,9 @@ limits are now
|
|||||||
png_user_chunk_cache_max 0 (unlimited) 128
|
png_user_chunk_cache_max 0 (unlimited) 128
|
||||||
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
||||||
|
|
||||||
|
The png_set_option() function (and the "options" member of the png struct) was
|
||||||
|
added to libpng-1.5.15.
|
||||||
|
|
||||||
B. Changes to the build and configuration of libpng
|
B. Changes to the build and configuration of libpng
|
||||||
|
|
||||||
Details of internal changes to the library code can be found in the CHANGES
|
Details of internal changes to the library code can be found in the CHANGES
|
||||||
@@ -5016,9 +5022,16 @@ even if the image only contains gray pixels, only RGB profiles may appear
|
|||||||
in images with color type 2, 3, or 6, is now enforced. The sRGB chunk
|
in images with color type 2, 3, or 6, is now enforced. The sRGB chunk
|
||||||
is allowed to appear in images with any color type.
|
is allowed to appear in images with any color type.
|
||||||
|
|
||||||
|
Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained
|
||||||
|
an empty language field or an empty translated keyword. Both of these
|
||||||
|
are allowed by the PNG specification, so these warnings are no longer issued.
|
||||||
|
|
||||||
The library now issues an error if the application attempts to set a
|
The library now issues an error if the application attempts to set a
|
||||||
transform after it calls png_read_update_info().
|
transform after it calls png_read_update_info().
|
||||||
|
|
||||||
|
The default condition for benign_errors is now to treat benign errors as
|
||||||
|
warnings while reading and as errors while writing.
|
||||||
|
|
||||||
The library now issues a warning if both background processing and RGB to
|
The library now issues a warning if both background processing and RGB to
|
||||||
gray are used when gamma correction happens. As with previous versions of
|
gray are used when gamma correction happens. As with previous versions of
|
||||||
the library the results are numerically very incorrect in this case.
|
the library the results are numerically very incorrect in this case.
|
||||||
@@ -5041,8 +5054,12 @@ to set the size of the sliding window for reading instead of using the default
|
|||||||
files in the wild that have incorrect CMF bytes that cause libpng to now issue
|
files in the wild that have incorrect CMF bytes that cause libpng to now issue
|
||||||
a "too far back" error and reject the file. Libpng-1.6.3 provides a way to
|
a "too far back" error and reject the file. Libpng-1.6.3 provides a way to
|
||||||
revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a
|
revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a
|
||||||
32-kbyte sliding window), and provides a tool
|
32-kbyte sliding window), by using
|
||||||
(contrib/tools/png-fix-too-far-back) for optimizing the CMF bytes
|
|
||||||
|
png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW,
|
||||||
|
PNG_OPTION_ON);
|
||||||
|
|
||||||
|
and provides a tool (contrib/tools/pngfix) for optimizing the CMF bytes
|
||||||
correctly.
|
correctly.
|
||||||
|
|
||||||
Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong
|
Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong
|
||||||
@@ -5212,13 +5229,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XVI. Y2K Compliance in libpng
|
XVI. Y2K Compliance in libpng
|
||||||
|
|
||||||
June 18, 2013
|
September 12, 2013
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.6.3beta08 are Y2K compliant. It is my belief that earlier
|
upward through 1.6.4 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has two year fields. One is a 2-byte unsigned integer
|
Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||||
|
|||||||
88
libpng.3
88
libpng.3
@@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNG 3 "June 18, 2013"
|
.TH LIBPNG 3 "September 12, 2013"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.3beta08
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.4
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB
|
\fB
|
||||||
#include <png.h>\fP
|
#include <png.h>\fP
|
||||||
@@ -504,7 +504,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.6.3beta08 - June 18, 2013
|
libpng version 1.6.4 - September 12, 2013
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
@@ -515,7 +515,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.6.3beta08 - June 18, 2013
|
libpng versions 0.97, January 1998, through 1.6.4 - September 12, 2013
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ All APIs that take (double) arguments also have a matching API that
|
|||||||
takes the corresponding fixed point integer arguments. The fixed point
|
takes the corresponding fixed point integer arguments. The fixed point
|
||||||
API has the same name as the floating point one with "_fixed" appended.
|
API has the same name as the floating point one with "_fixed" appended.
|
||||||
The actual range of values permitted in the APIs is frequently less than
|
The actual range of values permitted in the APIs is frequently less than
|
||||||
the full range of (png_fixed_point) (-21474 to +21474). When APIs require
|
the full range of (png_fixed_point) (\-21474 to +21474). When APIs require
|
||||||
a non-negative argument the type is recorded as png_uint_32 above. Consult
|
a non-negative argument the type is recorded as png_uint_32 above. Consult
|
||||||
the header file and the text below for more information.
|
the header file and the text below for more information.
|
||||||
|
|
||||||
@@ -713,7 +713,7 @@ The easiest way to make minor changes to the libpng configuration when
|
|||||||
auto-configuration is supported is to add definitions to the command line
|
auto-configuration is supported is to add definitions to the command line
|
||||||
using (typically) CPPFLAGS. For example:
|
using (typically) CPPFLAGS. For example:
|
||||||
|
|
||||||
CPPFLAGS=-DPNG_NO_FLOATING_ARITHMETIC
|
CPPFLAGS=\-DPNG_NO_FLOATING_ARITHMETIC
|
||||||
|
|
||||||
will change the internal libpng math implementation for gamma correction and
|
will change the internal libpng math implementation for gamma correction and
|
||||||
other arithmetic calculations to fixed point, avoiding the need for fast
|
other arithmetic calculations to fixed point, avoiding the need for fast
|
||||||
@@ -721,7 +721,7 @@ floating point support. The result can be seen in the generated pnglibconf.h -
|
|||||||
make sure it contains the changed feature macro setting.
|
make sure it contains the changed feature macro setting.
|
||||||
|
|
||||||
If you need to make more extensive configuration changes - more than one or two
|
If you need to make more extensive configuration changes - more than one or two
|
||||||
feature macro settings - you can either add -DPNG_USER_CONFIG to the build
|
feature macro settings - you can either add \-DPNG_USER_CONFIG to the build
|
||||||
command line and put a list of feature macro settings in pngusr.h or you can set
|
command line and put a list of feature macro settings in pngusr.h or you can set
|
||||||
DFA_XTRA (a makefile variable) to a file containing the same information in the
|
DFA_XTRA (a makefile variable) to a file containing the same information in the
|
||||||
form of 'option' settings.
|
form of 'option' settings.
|
||||||
@@ -780,7 +780,7 @@ pngusr.dfa in these directories.
|
|||||||
|
|
||||||
C. Configuration using PNG_USR_CONFIG
|
C. Configuration using PNG_USR_CONFIG
|
||||||
|
|
||||||
If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
|
If \-DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
|
||||||
pngusr.h will automatically be included before the options in
|
pngusr.h will automatically be included before the options in
|
||||||
scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only
|
scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only
|
||||||
macro definitions turning features on or off or setting settings.
|
macro definitions turning features on or off or setting settings.
|
||||||
@@ -1010,7 +1010,7 @@ input stream. You must supply the function
|
|||||||
unknown chunk structure, process it, and return one
|
unknown chunk structure, process it, and return one
|
||||||
of the following: */
|
of the following: */
|
||||||
|
|
||||||
return (-n); /* chunk had an error */
|
return (\-n); /* chunk had an error */
|
||||||
return (0); /* did not recognize */
|
return (0); /* did not recognize */
|
||||||
return (n); /* success */
|
return (n); /* success */
|
||||||
}
|
}
|
||||||
@@ -1061,7 +1061,7 @@ non-interlaced case the row that was just handled is simply one less than the
|
|||||||
passed in row number, and pass will always be 0. For the interlaced case the
|
passed in row number, and pass will always be 0. For the interlaced case the
|
||||||
same applies unless the row value is 0, in which case the row just handled was
|
same applies unless the row value is 0, in which case the row just handled was
|
||||||
the last one from one of the preceding passes. Because interlacing may skip a
|
the last one from one of the preceding passes. Because interlacing may skip a
|
||||||
pass you cannot be sure that the preceding pass is just 'pass-1', if you really
|
pass you cannot be sure that the preceding pass is just 'pass\-1', if you really
|
||||||
need to know what the last pass is record (row,pass) from the callback and use
|
need to know what the last pass is record (row,pass) from the callback and use
|
||||||
the last recorded value each time.
|
the last recorded value each time.
|
||||||
|
|
||||||
@@ -1151,7 +1151,7 @@ callback function:
|
|||||||
.SS User limits
|
.SS User limits
|
||||||
|
|
||||||
The PNG specification allows the width and height of an image to be as
|
The PNG specification allows the width and height of an image to be as
|
||||||
large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns.
|
large as 2^(31\-1 (0x7fffffff), or about 2.147 billion rows and columns.
|
||||||
Since very few applications really need to process such large images,
|
Since very few applications really need to process such large images,
|
||||||
we have imposed an arbitrary 1-million limit on rows and columns.
|
we have imposed an arbitrary 1-million limit on rows and columns.
|
||||||
Larger images will be rejected immediately with a png_error() call. If
|
Larger images will be rejected immediately with a png_error() call. If
|
||||||
@@ -1244,7 +1244,7 @@ situations:
|
|||||||
encoding.
|
encoding.
|
||||||
|
|
||||||
You would use the linear (unencoded) value if you need to process the pixel
|
You would use the linear (unencoded) value if you need to process the pixel
|
||||||
values further because this avoids the need to decode and reencode each
|
values further because this avoids the need to decode and re-encode each
|
||||||
component value whenever arithmetic is performed. A lot of graphics software
|
component value whenever arithmetic is performed. A lot of graphics software
|
||||||
uses linear values for this reason, often with higher precision component values
|
uses linear values for this reason, often with higher precision component values
|
||||||
to preserve overall accuracy.
|
to preserve overall accuracy.
|
||||||
@@ -2723,13 +2723,13 @@ point to libpng-allocated storage with the following function:
|
|||||||
or simply PNG_FREE_ALL
|
or simply PNG_FREE_ALL
|
||||||
|
|
||||||
seq - sequence number of item to be freed
|
seq - sequence number of item to be freed
|
||||||
(-1 for all items)
|
(\-1 for all items)
|
||||||
|
|
||||||
This function may be safely called when the relevant storage has
|
This function may be safely called when the relevant storage has
|
||||||
already been freed, or has not yet been allocated, or was allocated
|
already been freed, or has not yet been allocated, or was allocated
|
||||||
by the user and not by libpng, and will in those cases do nothing.
|
by the user and not by libpng, and will in those cases do nothing.
|
||||||
The "seq" parameter is ignored if only one item of the selected data
|
The "seq" parameter is ignored if only one item of the selected data
|
||||||
type, such as PLTE, is allowed. If "seq" is not -1, and multiple items
|
type, such as PLTE, is allowed. If "seq" is not \-1, and multiple items
|
||||||
are allowed for the data type identified in the mask, such as text or
|
are allowed for the data type identified in the mask, such as text or
|
||||||
sPLT, only the n'th item in the structure is freed, where n is "seq".
|
sPLT, only the n'th item in the structure is freed, where n is "seq".
|
||||||
|
|
||||||
@@ -2793,7 +2793,7 @@ For a more compact example of reading a PNG image, see the file example.c.
|
|||||||
|
|
||||||
.SS Reading PNG files progressively
|
.SS Reading PNG files progressively
|
||||||
|
|
||||||
The progressive reader is slightly different then the non-progressive
|
The progressive reader is slightly different from the non-progressive
|
||||||
reader. Instead of calling png_read_info(), png_read_rows(), and
|
reader. Instead of calling png_read_info(), png_read_rows(), and
|
||||||
png_read_end(), you make one call to png_process_data(), which calls
|
png_read_end(), you make one call to png_process_data(), which calls
|
||||||
callbacks when it has the info, a row, or the end of the image. You
|
callbacks when it has the info, a row, or the end of the image. You
|
||||||
@@ -3130,7 +3130,7 @@ non-interlaced case the row that was just handled is simply one less than the
|
|||||||
passed in row number, and pass will always be 0. For the interlaced case the
|
passed in row number, and pass will always be 0. For the interlaced case the
|
||||||
same applies unless the row value is 0, in which case the row just handled was
|
same applies unless the row value is 0, in which case the row just handled was
|
||||||
the last one from one of the preceding passes. Because interlacing may skip a
|
the last one from one of the preceding passes. Because interlacing may skip a
|
||||||
pass you cannot be sure that the preceding pass is just 'pass-1', if you really
|
pass you cannot be sure that the preceding pass is just 'pass\-1', if you really
|
||||||
need to know what the last pass is record (row,pass) from the callback and use
|
need to know what the last pass is record (row,pass) from the callback and use
|
||||||
the last recorded value each time.
|
the last recorded value each time.
|
||||||
|
|
||||||
@@ -3970,13 +3970,13 @@ point to libpng-allocated storage with the following function:
|
|||||||
or simply PNG_FREE_ALL
|
or simply PNG_FREE_ALL
|
||||||
|
|
||||||
seq - sequence number of item to be freed
|
seq - sequence number of item to be freed
|
||||||
(-1 for all items)
|
(\-1 for all items)
|
||||||
|
|
||||||
This function may be safely called when the relevant storage has
|
This function may be safely called when the relevant storage has
|
||||||
already been freed, or has not yet been allocated, or was allocated
|
already been freed, or has not yet been allocated, or was allocated
|
||||||
by the user and not by libpng, and will in those cases do nothing.
|
by the user and not by libpng, and will in those cases do nothing.
|
||||||
The "seq" parameter is ignored if only one item of the selected data
|
The "seq" parameter is ignored if only one item of the selected data
|
||||||
type, such as PLTE, is allowed. If "seq" is not -1, and multiple items
|
type, such as PLTE, is allowed. If "seq" is not \-1, and multiple items
|
||||||
are allowed for the data type identified in the mask, such as text or
|
are allowed for the data type identified in the mask, such as text or
|
||||||
sPLT, only the n'th item in the structure is freed, where n is "seq".
|
sPLT, only the n'th item in the structure is freed, where n is "seq".
|
||||||
|
|
||||||
@@ -4039,7 +4039,7 @@ The simplified API, which became available in libpng-1.6.0, hides the details
|
|||||||
of both libpng and the PNG file format itself.
|
of both libpng and the PNG file format itself.
|
||||||
It allows PNG files to be read into a very limited number of
|
It allows PNG files to be read into a very limited number of
|
||||||
in-memory bitmap formats or to be written from the same formats. If these
|
in-memory bitmap formats or to be written from the same formats. If these
|
||||||
formats do not accomodate your needs then you can, and should, use the more
|
formats do not accommodate your needs then you can, and should, use the more
|
||||||
sophisticated APIs above - these support a wide variety of in-memory formats
|
sophisticated APIs above - these support a wide variety of in-memory formats
|
||||||
and a wide variety of sophisticated transformations to those formats as well
|
and a wide variety of sophisticated transformations to those formats as well
|
||||||
as a wide variety of APIs to manipulate ancilliary information.
|
as a wide variety of APIs to manipulate ancilliary information.
|
||||||
@@ -4530,9 +4530,12 @@ as warnings.
|
|||||||
|
|
||||||
png_set_benign_errors (png_ptr, int allowed);
|
png_set_benign_errors (png_ptr, int allowed);
|
||||||
|
|
||||||
allowed: 0: (default) treat png_benign_error() an error.
|
allowed: 0: treat png_benign_error() as an error.
|
||||||
1: treat png_benign_error() as a warning.
|
1: treat png_benign_error() as a warning.
|
||||||
|
|
||||||
|
As of libpng-1.6.0, the default condition is to treat benign errors as
|
||||||
|
warnings while reading and as errors while writing.
|
||||||
|
|
||||||
.SS Custom chunks
|
.SS Custom chunks
|
||||||
|
|
||||||
If you need to read or write custom chunks, you may need to get deeper
|
If you need to read or write custom chunks, you may need to get deeper
|
||||||
@@ -4826,7 +4829,7 @@ this version of libpng, but if you insert some they will be printed.
|
|||||||
|
|
||||||
Starting with libpng-1.6.0, you can configure libpng (when using the
|
Starting with libpng-1.6.0, you can configure libpng (when using the
|
||||||
"configure" script) to prefix all exported symbols by means of the
|
"configure" script) to prefix all exported symbols by means of the
|
||||||
configuration option "--with-libpng-prefix=FOO_", where FOO_ can be any
|
configuration option "\-\-with\-libpng\-prefix=FOO_", where FOO_ can be any
|
||||||
string beginning with a letter and containing only uppercase
|
string beginning with a letter and containing only uppercase
|
||||||
and lowercase letters, digits, and the underscore (i.e., a C language
|
and lowercase letters, digits, and the underscore (i.e., a C language
|
||||||
identifier). This creates a set of macros in pnglibconf.h, so this is
|
identifier). This creates a set of macros in pnglibconf.h, so this is
|
||||||
@@ -5111,7 +5114,7 @@ it has not been well tested and doesn't actually "dither".
|
|||||||
The code was not
|
The code was not
|
||||||
removed, however, and could be enabled by building libpng with
|
removed, however, and could be enabled by building libpng with
|
||||||
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
|
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
|
||||||
was reenabled, but the function was renamed png_set_quantize() to
|
was re-enabled, but the function was renamed png_set_quantize() to
|
||||||
reflect more accurately what it actually does. At the same time,
|
reflect more accurately what it actually does. At the same time,
|
||||||
the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
|
the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
|
||||||
PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
|
PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
|
||||||
@@ -5149,7 +5152,7 @@ reading, and after png_write_png() or png_write_image() while writing.
|
|||||||
|
|
||||||
int max_palette = png_get_palette_max(png_ptr, info_ptr);
|
int max_palette = png_get_palette_max(png_ptr, info_ptr);
|
||||||
|
|
||||||
This will return the maximum palette index found in the image, or "-1" if
|
This will return the maximum palette index found in the image, or "\-1" if
|
||||||
the palette was not checked, or "0" if no palette was found. Note that this
|
the palette was not checked, or "0" if no palette was found. Note that this
|
||||||
does not account for any palette index used by ancillary chunks such as the
|
does not account for any palette index used by ancillary chunks such as the
|
||||||
bKGD chunk; you must check those separately to determine the maximum
|
bKGD chunk; you must check those separately to determine the maximum
|
||||||
@@ -5255,7 +5258,7 @@ did not exist.)
|
|||||||
Applications can now choose whether to use these macros or to call the
|
Applications can now choose whether to use these macros or to call the
|
||||||
corresponding function by defining PNG_USE_READ_MACROS or
|
corresponding function by defining PNG_USE_READ_MACROS or
|
||||||
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
||||||
only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0
|
only supported from 1.5.0; defining PNG_NO_USE_READ_MACROS prior to 1.5.0
|
||||||
will lead to a link failure.
|
will lead to a link failure.
|
||||||
|
|
||||||
Prior to libpng-1.5.4, the zlib compressor used the same set of parameters
|
Prior to libpng-1.5.4, the zlib compressor used the same set of parameters
|
||||||
@@ -5291,6 +5294,9 @@ limits are now
|
|||||||
png_user_chunk_cache_max 0 (unlimited) 128
|
png_user_chunk_cache_max 0 (unlimited) 128
|
||||||
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
||||||
|
|
||||||
|
The png_set_option() function (and the "options" member of the png struct) was
|
||||||
|
added to libpng-1.5.15.
|
||||||
|
|
||||||
B. Changes to the build and configuration of libpng
|
B. Changes to the build and configuration of libpng
|
||||||
|
|
||||||
Details of internal changes to the library code can be found in the CHANGES
|
Details of internal changes to the library code can be found in the CHANGES
|
||||||
@@ -5521,9 +5527,16 @@ even if the image only contains gray pixels, only RGB profiles may appear
|
|||||||
in images with color type 2, 3, or 6, is now enforced. The sRGB chunk
|
in images with color type 2, 3, or 6, is now enforced. The sRGB chunk
|
||||||
is allowed to appear in images with any color type.
|
is allowed to appear in images with any color type.
|
||||||
|
|
||||||
|
Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained
|
||||||
|
an empty language field or an empty translated keyword. Both of these
|
||||||
|
are allowed by the PNG specification, so these warnings are no longer issued.
|
||||||
|
|
||||||
The library now issues an error if the application attempts to set a
|
The library now issues an error if the application attempts to set a
|
||||||
transform after it calls png_read_update_info().
|
transform after it calls png_read_update_info().
|
||||||
|
|
||||||
|
The default condition for benign_errors is now to treat benign errors as
|
||||||
|
warnings while reading and as errors while writing.
|
||||||
|
|
||||||
The library now issues a warning if both background processing and RGB to
|
The library now issues a warning if both background processing and RGB to
|
||||||
gray are used when gamma correction happens. As with previous versions of
|
gray are used when gamma correction happens. As with previous versions of
|
||||||
the library the results are numerically very incorrect in this case.
|
the library the results are numerically very incorrect in this case.
|
||||||
@@ -5546,8 +5559,12 @@ to set the size of the sliding window for reading instead of using the default
|
|||||||
files in the wild that have incorrect CMF bytes that cause libpng to now issue
|
files in the wild that have incorrect CMF bytes that cause libpng to now issue
|
||||||
a "too far back" error and reject the file. Libpng-1.6.3 provides a way to
|
a "too far back" error and reject the file. Libpng-1.6.3 provides a way to
|
||||||
revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a
|
revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a
|
||||||
32-kbyte sliding window), and provides a tool
|
32-kbyte sliding window), by using
|
||||||
(contrib/tools/png-fix-too-far-back) for optimizing the CMF bytes
|
|
||||||
|
png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW,
|
||||||
|
PNG_OPTION_ON);
|
||||||
|
|
||||||
|
and provides a tool (contrib/tools/pngfix) for optimizing the CMF bytes
|
||||||
correctly.
|
correctly.
|
||||||
|
|
||||||
Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong
|
Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong
|
||||||
@@ -5696,7 +5713,7 @@ C binary operator and after "for" or "while", and before
|
|||||||
being cast, nor do we put one between a function name and the
|
being cast, nor do we put one between a function name and the
|
||||||
left parenthesis that follows it:
|
left parenthesis that follows it:
|
||||||
|
|
||||||
for (i = 2; i > 0; --i)
|
for (i = 2; i > 0; \-\-i)
|
||||||
y[i] = a(x) + (int)b;
|
y[i] = a(x) + (int)b;
|
||||||
|
|
||||||
We prefer #ifdef and #ifndef to #if defined() and #if !defined()
|
We prefer #ifdef and #ifndef to #if defined() and #if !defined()
|
||||||
@@ -5717,13 +5734,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XVI. Y2K Compliance in libpng
|
.SH XVI. Y2K Compliance in libpng
|
||||||
|
|
||||||
June 18, 2013
|
September 12, 2013
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.6.3beta08 are Y2K compliant. It is my belief that earlier
|
upward through 1.6.4 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has two year fields. One is a 2-byte unsigned integer
|
Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||||
@@ -5937,7 +5954,12 @@ the first widely used release:
|
|||||||
1.6.2beta01 16 10602 16.so.16.2[.0]
|
1.6.2beta01 16 10602 16.so.16.2[.0]
|
||||||
1.6.2rc01-06 16 10602 16.so.16.2[.0]
|
1.6.2rc01-06 16 10602 16.so.16.2[.0]
|
||||||
1.6.2 16 10602 16.so.16.2[.0]
|
1.6.2 16 10602 16.so.16.2[.0]
|
||||||
1.6.3beta01-08 16 10603 16.so.16.3[.0]
|
1.6.3beta01-11 16 10603 16.so.16.3[.0]
|
||||||
|
1.6.3rc01 16 10603 16.so.16.3[.0]
|
||||||
|
1.6.3 16 10603 16.so.16.3[.0]
|
||||||
|
1.6.4beta01-02 16 10604 16.so.16.4[.0]
|
||||||
|
1.6.4rc01 16 10604 16.so.16.4[.0]
|
||||||
|
1.6.4 16 10604 16.so.16.4[.0]
|
||||||
|
|
||||||
Henceforth the source version will match the shared-library minor
|
Henceforth the source version will match the shared-library minor
|
||||||
and patch numbers; the shared-library major version number will be
|
and patch numbers; the shared-library major version number will be
|
||||||
@@ -5994,7 +6016,7 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.6.3beta08 - June 18, 2013:
|
Libpng version 1.6.4 - September 12, 2013:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||||
|
|
||||||
@@ -6017,7 +6039,7 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.6.3beta08, June 18, 2013, are
|
libpng versions 1.2.6, August 15, 2004, through 1.6.4, September 12, 2013, are
|
||||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
@@ -6116,7 +6138,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
June 18, 2013
|
September 12, 2013
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNGPF 3 "June 18, 2013"
|
.TH LIBPNGPF 3 "September 12, 2013"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.3beta08
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.4
|
||||||
(private functions)
|
(private functions)
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB#include \fI"pngpriv.h"
|
\fB#include \fI"pngpriv.h"
|
||||||
|
|||||||
2
png.5
2
png.5
@@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "June 18, 2013"
|
.TH PNG 5 "September 12, 2013"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|||||||
10
png.c
10
png.c
@@ -14,7 +14,7 @@
|
|||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_6_3beta08 Your_png_h_is_not_version_1_6_3beta08;
|
typedef png_libpng_version_1_6_4 Your_png_h_is_not_version_1_6_4;
|
||||||
|
|
||||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
/* 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
|
* of the PNG file signature. If the PNG data is embedded into another
|
||||||
@@ -768,13 +768,13 @@ png_get_copyright(png_const_structrp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.6.3beta08 - June 18, 2013" PNG_STRING_NEWLINE \
|
"libpng version 1.6.4 - September 12, 2013" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2013 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2013 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.6.3beta08 - June 18, 2013\
|
return "libpng version 1.6.4 - September 12, 2013\
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||||
@@ -855,7 +855,7 @@ png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name)
|
|||||||
return PNG_HANDLE_CHUNK_AS_DEFAULT;
|
return PNG_HANDLE_CHUNK_AS_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||||
int /* PRIVATE */
|
int /* PRIVATE */
|
||||||
png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name)
|
png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name)
|
||||||
{
|
{
|
||||||
@@ -864,7 +864,7 @@ png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name)
|
|||||||
PNG_CSTRING_FROM_CHUNK(chunk_string, chunk_name);
|
PNG_CSTRING_FROM_CHUNK(chunk_string, chunk_name);
|
||||||
return png_handle_as_unknown(png_ptr, chunk_string);
|
return png_handle_as_unknown(png_ptr, chunk_string);
|
||||||
}
|
}
|
||||||
#endif /* READ_UNKNOWN_CHUNKS */
|
#endif /* HANDLE_AS_UNKNOWN */
|
||||||
#endif /* SET_UNKNOWN_CHUNKS */
|
#endif /* SET_UNKNOWN_CHUNKS */
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
|
|||||||
31
png.h
31
png.h
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.6.3beta08 - June 18, 2013
|
* libpng version 1.6.4 - September 12, 2013
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* 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.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.6.3beta08 - June 18, 2013: Glenn
|
* libpng versions 0.97, January 1998, through 1.6.4 - September 12, 2013: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@@ -175,7 +175,12 @@
|
|||||||
* 1.6.2beta01 16 10602 16.so.16.2[.0]
|
* 1.6.2beta01 16 10602 16.so.16.2[.0]
|
||||||
* 1.6.2rc01-06 16 10602 16.so.16.2[.0]
|
* 1.6.2rc01-06 16 10602 16.so.16.2[.0]
|
||||||
* 1.6.2 16 10602 16.so.16.2[.0]
|
* 1.6.2 16 10602 16.so.16.2[.0]
|
||||||
* 1.6.3beta01-08 16 10603 16.so.16.3[.0]
|
* 1.6.3beta01-11 16 10603 16.so.16.3[.0]
|
||||||
|
* 1.6.3rc01 16 10603 16.so.16.3[.0]
|
||||||
|
* 1.6.3 16 10603 16.so.16.3[.0]
|
||||||
|
* 1.6.4beta01-02 16 10604 16.so.16.4[.0]
|
||||||
|
* 1.6.4rc01 16 10604 16.so.16.4[.0]
|
||||||
|
* 1.6.4 16 10604 16.so.16.4[.0]
|
||||||
*
|
*
|
||||||
* Henceforth the source version will match the shared-library major
|
* Henceforth the source version will match the shared-library major
|
||||||
* and minor numbers; the shared-library major version number will be
|
* and minor numbers; the shared-library major version number will be
|
||||||
@@ -207,7 +212,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.6.3beta08, June 18, 2013, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.6.4, September 12, 2013, are
|
||||||
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
@@ -319,13 +324,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* June 18, 2013
|
* September 12, 2013
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
*
|
*
|
||||||
* This is your unofficial assurance that libpng from version 0.71 and
|
* This is your unofficial assurance that libpng from version 0.71 and
|
||||||
* upward through 1.6.3beta08 are Y2K compliant. It is my belief that
|
* upward through 1.6.4 are Y2K compliant. It is my belief that
|
||||||
* earlier versions were also Y2K compliant.
|
* earlier versions were also Y2K compliant.
|
||||||
*
|
*
|
||||||
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||||
@@ -385,9 +390,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.6.3beta08"
|
#define PNG_LIBPNG_VER_STRING "1.6.4"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.6.3beta08 - June 18, 2013\n"
|
" libpng version 1.6.4 - September 12, 2013\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 16
|
#define PNG_LIBPNG_VER_SONUM 16
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 16
|
#define PNG_LIBPNG_VER_DLLNUM 16
|
||||||
@@ -395,13 +400,13 @@
|
|||||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||||
#define PNG_LIBPNG_VER_MAJOR 1
|
#define PNG_LIBPNG_VER_MAJOR 1
|
||||||
#define PNG_LIBPNG_VER_MINOR 6
|
#define PNG_LIBPNG_VER_MINOR 6
|
||||||
#define PNG_LIBPNG_VER_RELEASE 3
|
#define PNG_LIBPNG_VER_RELEASE 4
|
||||||
|
|
||||||
/* This should match the numeric part of the final component of
|
/* This should match the numeric part of the final component of
|
||||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_BUILD 08
|
#define PNG_LIBPNG_VER_BUILD 0
|
||||||
|
|
||||||
/* Release Status */
|
/* Release Status */
|
||||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||||
@@ -418,7 +423,7 @@
|
|||||||
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
||||||
PNG_LIBPNG_BUILD_PRIVATE */
|
PNG_LIBPNG_BUILD_PRIVATE */
|
||||||
|
|
||||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
|
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
|
||||||
|
|
||||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||||
* We must not include leading zeros.
|
* We must not include leading zeros.
|
||||||
@@ -426,7 +431,7 @@
|
|||||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
* 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
|
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
||||||
*/
|
*/
|
||||||
#define PNG_LIBPNG_VER 10603 /* 1.6.3 */
|
#define PNG_LIBPNG_VER 10604 /* 1.6.4 */
|
||||||
|
|
||||||
/* Library configuration: these options cannot be changed after
|
/* Library configuration: these options cannot be changed after
|
||||||
* the library has been built.
|
* the library has been built.
|
||||||
@@ -531,7 +536,7 @@ extern "C" {
|
|||||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||||
* do not agree upon the version number.
|
* do not agree upon the version number.
|
||||||
*/
|
*/
|
||||||
typedef char* png_libpng_version_1_6_3beta08;
|
typedef char* png_libpng_version_1_6_4;
|
||||||
|
|
||||||
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.6.3beta08 - June 18, 2013
|
* libpng version 1.6.4 - September 12, 2013
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ png_process_some_data(png_structrp png_ptr, png_inforp info_ptr)
|
|||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
|
png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
|
||||||
{
|
{
|
||||||
png_size_t num_checked = png_ptr->sig_bytes,
|
png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
|
||||||
num_to_check = 8 - num_checked;
|
num_to_check = 8 - num_checked;
|
||||||
|
|
||||||
if (png_ptr->buffer_size < num_to_check)
|
if (png_ptr->buffer_size < num_to_check)
|
||||||
|
|||||||
83
pngpriv.h
83
pngpriv.h
@@ -6,7 +6,7 @@
|
|||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.3 [(PENDING RELEASE)]
|
* Last changed in libpng 1.6.3 [July 18, 2013]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@@ -670,37 +670,64 @@
|
|||||||
* architectures where (int) is only 16 bits.
|
* architectures where (int) is only 16 bits.
|
||||||
*/
|
*/
|
||||||
#define PNG_32b(b,s) ((png_uint_32)(b) << (s))
|
#define PNG_32b(b,s) ((png_uint_32)(b) << (s))
|
||||||
#define PNG_CHUNK(b1,b2,b3,b4) \
|
#define PNG_U32(b1,b2,b3,b4) \
|
||||||
(PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0))
|
(PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0))
|
||||||
|
|
||||||
#define png_IHDR PNG_CHUNK( 73, 72, 68, 82)
|
/* Constants for known chunk types.
|
||||||
#define png_IDAT PNG_CHUNK( 73, 68, 65, 84)
|
*
|
||||||
#define png_IEND PNG_CHUNK( 73, 69, 78, 68)
|
* MAINTAINERS: If you need to add a chunk, define the name here.
|
||||||
#define png_PLTE PNG_CHUNK( 80, 76, 84, 69)
|
* For historical reasons these constants have the form png_<name>; i.e.
|
||||||
#define png_bKGD PNG_CHUNK( 98, 75, 71, 68)
|
* the prefix is lower case. Please use decimal values as the parameters to
|
||||||
#define png_cHRM PNG_CHUNK( 99, 72, 82, 77)
|
* match the ISO PNG specification and to avoid relying on the C locale
|
||||||
#define png_gAMA PNG_CHUNK(103, 65, 77, 65)
|
* interpretation of character values. Please keep the list sorted.
|
||||||
#define png_hIST PNG_CHUNK(104, 73, 83, 84)
|
*
|
||||||
#define png_iCCP PNG_CHUNK(105, 67, 67, 80)
|
* Notice that PNG_U32 is used to define a 32-bit value for the 4 byte chunk
|
||||||
#define png_iTXt PNG_CHUNK(105, 84, 88, 116)
|
* type. In fact the specification does not express chunk types this way,
|
||||||
#define png_oFFs PNG_CHUNK(111, 70, 70, 115)
|
* however using a 32-bit value means that the chunk type can be read from the
|
||||||
#define png_pCAL PNG_CHUNK(112, 67, 65, 76)
|
* stream using exactly the same code as used for a 32-bit unsigned value and
|
||||||
#define png_sCAL PNG_CHUNK(115, 67, 65, 76)
|
* can be examined far more efficiently (using one arithmetic compare).
|
||||||
#define png_pHYs PNG_CHUNK(112, 72, 89, 115)
|
*
|
||||||
#define png_sBIT PNG_CHUNK(115, 66, 73, 84)
|
* Prior to 1.5.6 the chunk type constants were expressed as C strings. The
|
||||||
#define png_sPLT PNG_CHUNK(115, 80, 76, 84)
|
* libpng API still uses strings for 'unknown' chunks and a macro,
|
||||||
#define png_sRGB PNG_CHUNK(115, 82, 71, 66)
|
* PNG_STRING_FROM_CHUNK, allows a string to be generated if required. Notice
|
||||||
#define png_sTER PNG_CHUNK(115, 84, 69, 82)
|
* that for portable code numeric values must still be used; the string "IHDR"
|
||||||
#define png_tEXt PNG_CHUNK(116, 69, 88, 116)
|
* is not portable and neither is PNG_U32('I', 'H', 'D', 'R').
|
||||||
#define png_tIME PNG_CHUNK(116, 73, 77, 69)
|
*
|
||||||
#define png_tRNS PNG_CHUNK(116, 82, 78, 83)
|
* In 1.7.0 the definitions will be made public in png.h to avoid having to
|
||||||
#define png_zTXt PNG_CHUNK(122, 84, 88, 116)
|
* duplicate the same definitions in application code.
|
||||||
|
*/
|
||||||
|
#define png_IDAT PNG_U32( 73, 68, 65, 84)
|
||||||
|
#define png_IEND PNG_U32( 73, 69, 78, 68)
|
||||||
|
#define png_IHDR PNG_U32( 73, 72, 68, 82)
|
||||||
|
#define png_PLTE PNG_U32( 80, 76, 84, 69)
|
||||||
|
#define png_bKGD PNG_U32( 98, 75, 71, 68)
|
||||||
|
#define png_cHRM PNG_U32( 99, 72, 82, 77)
|
||||||
|
#define png_fRAc PNG_U32(102, 82, 65, 99) /* registered, not defined */
|
||||||
|
#define png_gAMA PNG_U32(103, 65, 77, 65)
|
||||||
|
#define png_gIFg PNG_U32(103, 73, 70, 103)
|
||||||
|
#define png_gIFt PNG_U32(103, 73, 70, 116) /* deprecated */
|
||||||
|
#define png_gIFx PNG_U32(103, 73, 70, 120)
|
||||||
|
#define png_hIST PNG_U32(104, 73, 83, 84)
|
||||||
|
#define png_iCCP PNG_U32(105, 67, 67, 80)
|
||||||
|
#define png_iTXt PNG_U32(105, 84, 88, 116)
|
||||||
|
#define png_oFFs PNG_U32(111, 70, 70, 115)
|
||||||
|
#define png_pCAL PNG_U32(112, 67, 65, 76)
|
||||||
|
#define png_pHYs PNG_U32(112, 72, 89, 115)
|
||||||
|
#define png_sBIT PNG_U32(115, 66, 73, 84)
|
||||||
|
#define png_sCAL PNG_U32(115, 67, 65, 76)
|
||||||
|
#define png_sPLT PNG_U32(115, 80, 76, 84)
|
||||||
|
#define png_sRGB PNG_U32(115, 82, 71, 66)
|
||||||
|
#define png_sTER PNG_U32(115, 84, 69, 82)
|
||||||
|
#define png_tEXt PNG_U32(116, 69, 88, 116)
|
||||||
|
#define png_tIME PNG_U32(116, 73, 77, 69)
|
||||||
|
#define png_tRNS PNG_U32(116, 82, 78, 83)
|
||||||
|
#define png_zTXt PNG_U32(122, 84, 88, 116)
|
||||||
|
|
||||||
/* The following will work on (signed char*) strings, whereas the get_uint_32
|
/* The following will work on (signed char*) strings, whereas the get_uint_32
|
||||||
* macro will fail on top-bit-set values because of the sign extension.
|
* macro will fail on top-bit-set values because of the sign extension.
|
||||||
*/
|
*/
|
||||||
#define PNG_CHUNK_FROM_STRING(s)\
|
#define PNG_CHUNK_FROM_STRING(s)\
|
||||||
PNG_CHUNK(0xff&(s)[0], 0xff&(s)[1], 0xff&(s)[2], 0xff&(s)[3])
|
PNG_U32(0xff&(s)[0], 0xff&(s)[1], 0xff&(s)[2], 0xff&(s)[3])
|
||||||
|
|
||||||
/* This uses (char), not (png_byte) to avoid warnings on systems where (char) is
|
/* This uses (char), not (png_byte) to avoid warnings on systems where (char) is
|
||||||
* signed and the argument is a (char[]) This macro will fail miserably on
|
* signed and the argument is a (char[]) This macro will fail miserably on
|
||||||
@@ -1404,15 +1431,13 @@ PNG_INTERNAL_FUNCTION(void,png_handle_unknown,(png_structrp png_ptr,
|
|||||||
* just skips the chunk or errors out if it is critical.
|
* just skips the chunk or errors out if it is critical.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||||
#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(int,png_chunk_unknown_handling,
|
PNG_INTERNAL_FUNCTION(int,png_chunk_unknown_handling,
|
||||||
(png_const_structrp png_ptr, png_uint_32 chunk_name),PNG_EMPTY);
|
(png_const_structrp png_ptr, png_uint_32 chunk_name),PNG_EMPTY);
|
||||||
/* Exactly as the API png_handle_as_unknown() except that the argument is a
|
/* Exactly as the API png_handle_as_unknown() except that the argument is a
|
||||||
* 32-bit chunk name, not a string.
|
* 32-bit chunk name, not a string.
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif /* PNG_HANDLE_AS_UNKNOWN_SUPPORTED */
|
||||||
#endif /* PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */
|
|
||||||
#endif /* PNG_READ_SUPPORTED */
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|
||||||
/* Handle the transformations for reading and writing */
|
/* Handle the transformations for reading and writing */
|
||||||
|
|||||||
@@ -3285,7 +3285,7 @@ png_image_read_background(png_voidp argument)
|
|||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
/* 8-bit sRGB gray values with an alpha channel; the alpha channel is
|
/* 8-bit sRGB gray values with an alpha channel; the alpha channel is
|
||||||
* to be removed by composing on a backgroundi: either the row if
|
* to be removed by composing on a background: either the row if
|
||||||
* display->background is NULL or display->background->green if not.
|
* display->background is NULL or display->background->green if not.
|
||||||
* Unlike the code above ALPHA_OPTIMIZED has *not* been done.
|
* Unlike the code above ALPHA_OPTIMIZED has *not* been done.
|
||||||
*/
|
*/
|
||||||
|
|||||||
47
pngrtran.c
47
pngrtran.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.2 [April 25, 2013]
|
* Last changed in libpng 1.6.4 [September 12, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -1116,12 +1116,18 @@ png_init_palette_transformations(png_structrp png_ptr)
|
|||||||
|
|
||||||
/* Ignore if all the entries are opaque (unlikely!) */
|
/* Ignore if all the entries are opaque (unlikely!) */
|
||||||
for (i=0; i<png_ptr->num_trans; ++i)
|
for (i=0; i<png_ptr->num_trans; ++i)
|
||||||
|
{
|
||||||
if (png_ptr->trans_alpha[i] == 255)
|
if (png_ptr->trans_alpha[i] == 255)
|
||||||
continue;
|
continue;
|
||||||
else if (png_ptr->trans_alpha[i] == 0)
|
else if (png_ptr->trans_alpha[i] == 0)
|
||||||
input_has_transparency = 1;
|
input_has_transparency = 1;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
input_has_transparency = 1;
|
||||||
input_has_alpha = 1;
|
input_has_alpha = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If no alpha we can optimize. */
|
/* If no alpha we can optimize. */
|
||||||
@@ -1878,31 +1884,34 @@ png_init_read_transformations(png_structrp png_ptr)
|
|||||||
* the number of significant bits is 0 then no shift is done (this is an
|
* the number of significant bits is 0 then no shift is done (this is an
|
||||||
* error condition which is silently ignored.)
|
* error condition which is silently ignored.)
|
||||||
*/
|
*/
|
||||||
if (shift > 0 && shift < 8) for (i=0; i<istop; ++i)
|
if (shift > 0 && shift < 8)
|
||||||
{
|
for (i=0; i<istop; ++i)
|
||||||
int component = png_ptr->palette[i].red;
|
{
|
||||||
|
int component = png_ptr->palette[i].red;
|
||||||
|
|
||||||
component >>= shift;
|
component >>= shift;
|
||||||
png_ptr->palette[i].red = (png_byte)component;
|
png_ptr->palette[i].red = (png_byte)component;
|
||||||
}
|
}
|
||||||
|
|
||||||
shift = 8 - png_ptr->sig_bit.green;
|
shift = 8 - png_ptr->sig_bit.green;
|
||||||
if (shift > 0 && shift < 8) for (i=0; i<istop; ++i)
|
if (shift > 0 && shift < 8)
|
||||||
{
|
for (i=0; i<istop; ++i)
|
||||||
int component = png_ptr->palette[i].green;
|
{
|
||||||
|
int component = png_ptr->palette[i].green;
|
||||||
|
|
||||||
component >>= shift;
|
component >>= shift;
|
||||||
png_ptr->palette[i].green = (png_byte)component;
|
png_ptr->palette[i].green = (png_byte)component;
|
||||||
}
|
}
|
||||||
|
|
||||||
shift = 8 - png_ptr->sig_bit.blue;
|
shift = 8 - png_ptr->sig_bit.blue;
|
||||||
if (shift > 0 && shift < 8) for (i=0; i<istop; ++i)
|
if (shift > 0 && shift < 8)
|
||||||
{
|
for (i=0; i<istop; ++i)
|
||||||
int component = png_ptr->palette[i].blue;
|
{
|
||||||
|
int component = png_ptr->palette[i].blue;
|
||||||
|
|
||||||
component >>= shift;
|
component >>= shift;
|
||||||
png_ptr->palette[i].blue = (png_byte)component;
|
png_ptr->palette[i].blue = (png_byte)component;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_READ_SHIFT_SUPPORTED */
|
#endif /* PNG_READ_SHIFT_SUPPORTED */
|
||||||
}
|
}
|
||||||
|
|||||||
25
pngrutil.c
25
pngrutil.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.3 [(PENDING RELEASE)]
|
* Last changed in libpng 1.6.4 [September 12, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -2764,7 +2764,6 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
|
|||||||
|
|
||||||
png_debug(1, "in png_handle_unknown");
|
png_debug(1, "in png_handle_unknown");
|
||||||
|
|
||||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
|
||||||
/* NOTE: this code is based on the code in libpng-1.4.12 except for fixing
|
/* NOTE: this code is based on the code in libpng-1.4.12 except for fixing
|
||||||
* the bug which meant that setting a non-default behavior for a specific
|
* the bug which meant that setting a non-default behavior for a specific
|
||||||
* chunk would be ignored (the default was always used unless a user
|
* chunk would be ignored (the default was always used unless a user
|
||||||
@@ -2776,16 +2775,15 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
|
|||||||
* This is just an optimization to avoid multiple calls to the lookup
|
* This is just an optimization to avoid multiple calls to the lookup
|
||||||
* function.
|
* function.
|
||||||
*/
|
*/
|
||||||
# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
# ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||||
# ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
|
keep = png_chunk_unknown_handling(png_ptr, png_ptr->chunk_name);
|
||||||
keep = png_chunk_unknown_handling(png_ptr, png_ptr->chunk_name);
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* One of the following methods will read the chunk or skip it (at least one
|
/* One of the following methods will read the chunk or skip it (at least one
|
||||||
* of these is always defined because this is the only way to switch on
|
* of these is always defined because this is the only way to switch on
|
||||||
* PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
|
* PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
|
||||||
*/
|
*/
|
||||||
|
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
# ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|
# ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|
||||||
/* The user callback takes precedence over the chunk keep value, but the
|
/* The user callback takes precedence over the chunk keep value, but the
|
||||||
* keep value is still required to validate a save of a critical chunk.
|
* keep value is still required to validate a save of a critical chunk.
|
||||||
@@ -2893,7 +2891,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
|
|||||||
|
|
||||||
png_crc_finish(png_ptr, length);
|
png_crc_finish(png_ptr, length);
|
||||||
}
|
}
|
||||||
# endif
|
# endif /* PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED */
|
||||||
|
|
||||||
# ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
|
# ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
/* Now store the chunk in the chunk list if appropriate, and if the limits
|
/* Now store the chunk in the chunk list if appropriate, and if the limits
|
||||||
@@ -3694,7 +3692,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
|||||||
|
|
||||||
for (i = 0; i < row_info->width; i++)
|
for (i = 0; i < row_info->width; i++)
|
||||||
{
|
{
|
||||||
png_byte v[8];
|
png_byte v[8]; /* SAFE; pixel_depth does not exceed 64 */
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
memcpy(v, sp, pixel_bytes);
|
memcpy(v, sp, pixel_bytes);
|
||||||
@@ -3880,7 +3878,8 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
png_init_filter_functions(png_structrp pp)
|
png_init_filter_functions(png_structrp pp)
|
||||||
/* This function is called once for every PNG image to set the
|
/* This function is called once for every PNG image (except for PNG images
|
||||||
|
* that only use PNG_FILTER_VALUE_NONE for all rows) to set the
|
||||||
* implementations required to reverse the filtering of PNG rows. Reversing
|
* implementations required to reverse the filtering of PNG rows. Reversing
|
||||||
* the filter is the first transformation performed on the row data. It is
|
* the filter is the first transformation performed on the row data. It is
|
||||||
* performed in place, therefore an implementation can be selected based on
|
* performed in place, therefore an implementation can be selected based on
|
||||||
@@ -3922,10 +3921,13 @@ png_read_filter_row(png_structrp pp, png_row_infop row_info, png_bytep row,
|
|||||||
* PNG_FILTER_OPTIMIZATIONS to a function that overrides the generic
|
* PNG_FILTER_OPTIMIZATIONS to a function that overrides the generic
|
||||||
* implementations. See png_init_filter_functions above.
|
* implementations. See png_init_filter_functions above.
|
||||||
*/
|
*/
|
||||||
if (pp->read_filter[0] == NULL)
|
|
||||||
png_init_filter_functions(pp);
|
|
||||||
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
||||||
|
{
|
||||||
|
if (pp->read_filter[0] == NULL)
|
||||||
|
png_init_filter_functions(pp);
|
||||||
|
|
||||||
pp->read_filter[filter-1](row_info, row, prev_row);
|
pp->read_filter[filter-1](row_info, row, prev_row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||||
@@ -4469,5 +4471,4 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
|||||||
|
|
||||||
png_ptr->flags |= PNG_FLAG_ROW_INIT;
|
png_ptr->flags |= PNG_FLAG_ROW_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* PNG_READ_SUPPORTED */
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|||||||
2
pngset.c
2
pngset.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.3 [(PENDING RELEASE)]
|
* Last changed in libpng 1.6.3 [July 18, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
|||||||
@@ -1968,4 +1968,4 @@ main(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_6_3beta08 Your_png_h_is_not_version_1_6_3beta08;
|
typedef png_libpng_version_1_6_4 Your_png_h_is_not_version_1_6_4;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
VisualStudio instructions
|
VisualStudio instructions
|
||||||
|
|
||||||
libpng version 1.6.3beta08 - June 18, 2013
|
libpng version 1.6.4 - September 12, 2013
|
||||||
|
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* zlib.props - location of zlib source
|
* zlib.props - location of zlib source
|
||||||
*
|
*
|
||||||
* libpng version 1.6.3beta08 - June 18, 2013
|
* libpng version 1.6.4 - September 12, 2013
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
Makefiles for libpng version 1.6.3beta08 - June 18, 2013
|
Makefiles for libpng version 1.6.4 - September 12, 2013
|
||||||
|
|
||||||
pnglibconf.h.prebuilt => Stores configuration settings
|
pnglibconf.h.prebuilt => Stores configuration settings
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng16.so.16.1.6.3beta08)
|
(gcc, creates libpng16.so.16.1.6.4)
|
||||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||||
ansi2knr (Requires ansi2knr.c from
|
ansi2knr (Requires ansi2knr.c from
|
||||||
@@ -20,7 +20,7 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
|||||||
makefile.dec => DEC Alpha UNIX makefile
|
makefile.dec => DEC Alpha UNIX makefile
|
||||||
makefile.dj2 => DJGPP 2 makefile
|
makefile.dj2 => DJGPP 2 makefile
|
||||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||||
(gcc, creates libpng16.so.16.1.6.3beta08)
|
(gcc, creates libpng16.so.16.1.6.4)
|
||||||
makefile.freebsd => FreeBSD makefile
|
makefile.freebsd => FreeBSD makefile
|
||||||
makefile.gcc => Generic gcc makefile
|
makefile.gcc => Generic gcc makefile
|
||||||
makefile.hpgcc => HPUX makefile using gcc
|
makefile.hpgcc => HPUX makefile using gcc
|
||||||
@@ -35,12 +35,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
|||||||
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
||||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
makefile.sggcc => Silicon Graphics (gcc,
|
makefile.sggcc => Silicon Graphics (gcc,
|
||||||
creates libpng16.so.16.1.6.3beta08)
|
creates libpng16.so.16.1.6.4)
|
||||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||||
creates libpng16.so.16.1.6.3beta08)
|
creates libpng16.so.16.1.6.4)
|
||||||
makefile.so9 => Solaris 9 makefile (gcc,
|
makefile.so9 => Solaris 9 makefile (gcc,
|
||||||
creates libpng16.so.16.1.6.3beta08)
|
creates libpng16.so.16.1.6.4)
|
||||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||||
makefile.sunos => Sun makefile
|
makefile.sunos => Sun makefile
|
||||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
|
|||||||
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
|
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
|
||||||
PNG_DFN ""
|
PNG_DFN ""
|
||||||
PNG_DFN "EXPORTS"
|
PNG_DFN "EXPORTS"
|
||||||
PNG_DFN ";Version 1.6.3beta08"
|
PNG_DFN ";Version 1.6.4"
|
||||||
|
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
# Modeled after libxml-config.
|
# Modeled after libxml-config.
|
||||||
|
|
||||||
version=1.6.3beta08
|
version=1.6.4
|
||||||
prefix=""
|
prefix=""
|
||||||
libdir=""
|
libdir=""
|
||||||
libs=""
|
libs=""
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
|
|||||||
|
|
||||||
Name: libpng
|
Name: libpng
|
||||||
Description: Loads and saves PNG files
|
Description: Loads and saves PNG files
|
||||||
Version: 1.6.3beta08
|
Version: 1.6.4
|
||||||
Libs: -L${libdir} -lpng16
|
Libs: -L${libdir} -lpng16
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
VERMAJ = 1
|
VERMAJ = 1
|
||||||
VERMIN = 6
|
VERMIN = 6
|
||||||
VERMIC = 3
|
VERMIC = 4
|
||||||
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
||||||
NAME = libpng
|
NAME = libpng
|
||||||
PACKAGE = $(NAME)-$(VER)
|
PACKAGE = $(NAME)-$(VER)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng16
|
LIBNAME = libpng16
|
||||||
PNGMAJ = 16
|
PNGMAJ = 16
|
||||||
RELEASE = 3
|
RELEASE = 4
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).so
|
LIBSO=$(LIBNAME).so
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ exec_prefix=$(prefix)
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng16
|
LIBNAME = libpng16
|
||||||
PNGMAJ = 16
|
PNGMAJ = 16
|
||||||
RELEASE = 3
|
RELEASE = 4
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).dll
|
LIBSO=$(LIBNAME).dll
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16
|
|||||||
|
|
||||||
LIB= png16
|
LIB= png16
|
||||||
SHLIB_MAJOR= 0
|
SHLIB_MAJOR= 0
|
||||||
SHLIB_MINOR= 1.6.3beta08
|
SHLIB_MINOR= 1.6.4
|
||||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
|
|||||||
|
|
||||||
LIB= png
|
LIB= png
|
||||||
SHLIB_MAJOR= 16
|
SHLIB_MAJOR= 16
|
||||||
SHLIB_MINOR= 1.6.3beta08
|
SHLIB_MINOR= 1.6.4
|
||||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
|
|||||||
MANDIR= ${PREFIX}/man/cat
|
MANDIR= ${PREFIX}/man/cat
|
||||||
|
|
||||||
SHLIB_MAJOR= 16
|
SHLIB_MAJOR= 16
|
||||||
SHLIB_MINOR= 1.6.3beta08
|
SHLIB_MINOR= 1.6.4
|
||||||
|
|
||||||
LIB= png
|
LIB= png
|
||||||
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/* libpng 1.6.3beta08 STANDARD API DEFINITION */
|
/* libpng 1.6.4 STANDARD API DEFINITION */
|
||||||
|
|
||||||
/* pnglibconf.h - library build configuration */
|
/* pnglibconf.h - library build configuration */
|
||||||
|
|
||||||
/* Libpng version 1.6.3beta08 - June 18, 2013 */
|
/* Libpng version 1.6.4 - September 12, 2013 */
|
||||||
|
|
||||||
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
;Version 1.6.3beta08
|
;Version 1.6.4
|
||||||
;--------------------------------------------------------------
|
;--------------------------------------------------------------
|
||||||
; LIBPNG symbol list as a Win32 DEF file
|
; LIBPNG symbol list as a Win32 DEF file
|
||||||
; Contains all the symbols that can be exported from libpng
|
; Contains all the symbols that can be exported from libpng
|
||||||
|
|||||||
Reference in New Issue
Block a user