merged libpng 1.5.7 to trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
137
src/png/ANNOUNCE
137
src/png/ANNOUNCE
@@ -1,4 +1,5 @@
|
|||||||
Libpng 1.5.6 - November 3, 2011
|
|
||||||
|
Libpng 1.5.7 - December 15, 2011
|
||||||
|
|
||||||
This is a public release of libpng, intended for use in production codes.
|
This is a public release of libpng, intended for use in production codes.
|
||||||
|
|
||||||
@@ -7,76 +8,86 @@ 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
|
||||||
|
|
||||||
libpng-1.5.6.tar.xz (LZMA-compressed, recommended)
|
libpng-1.5.7.tar.xz (LZMA-compressed, recommended)
|
||||||
libpng-1.5.6.tar.gz
|
libpng-1.5.7.tar.gz
|
||||||
libpng-1.5.6.tar.bz2
|
libpng-1.5.7.tar.bz2
|
||||||
|
|
||||||
Source files with CRLF line endings (for Windows), without the
|
Source files with CRLF line endings (for Windows), without the
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
lpng156.7z (LZMA-compressed, recommended)
|
lpng157.7z (LZMA-compressed, recommended)
|
||||||
lpng156.zip
|
lpng157.zip
|
||||||
|
|
||||||
Other information:
|
Other information:
|
||||||
|
|
||||||
libpng-1.5.6-README.txt
|
libpng-1.5.7-README.txt
|
||||||
libpng-1.5.6-LICENSE.txt
|
libpng-1.5.7-LICENSE.txt
|
||||||
|
|
||||||
Changes since the last public release (1.5.5):
|
Changes since the last public release (1.5.6):
|
||||||
|
Added support for ARM processor (Mans Rullgard)
|
||||||
Fixed some 64-bit type conversion warnings in pngrtran.c
|
Fixed bug in pngvalid on early allocation failure; fixed type cast in
|
||||||
Moved row_info from png_struct to a local variable.
|
pngmem.c; pngvalid would attempt to call png_error() if the allocation
|
||||||
The various interlace mask arrays have been made into arrays of
|
of a png_struct or png_info failed. This would probably have led to a
|
||||||
bytes and made PNG_CONST and static (previously some arrays were
|
crash. The pngmem.c implementation of png_malloc() included a cast
|
||||||
marked PNG_CONST and some weren't).
|
to png_size_t which would fail on large allocations on 16-bit systems.
|
||||||
Additional checks have been added to the transform code to validate the
|
Fix for the preprocessor of the Intel C compiler. The preprocessor
|
||||||
pixel depths after the transforms on both read and write.
|
splits adjacent @ signs with a space; this changes the concatentation
|
||||||
Removed some redundant code from pngwrite.c, in png_desgtroy_write_struct().
|
token from @-@-@ to PNG_JOIN; that should work with all compiler
|
||||||
Changed chunk reading/writing code to use png_uint_32 instead of png_byte[4].
|
preprocessors.
|
||||||
This removes the need to allocate temporary strings for chunk names on
|
Paeth filter speed improvements from work by Siarhei Siamashka. This
|
||||||
the stack in the read/write code. Unknown chunk handling still uses the
|
changes the 'Paeth' reconstruction function to improve the GCC code
|
||||||
string form because this is exposed in the API.
|
generation on x86. The changes are only part of the suggested ones;
|
||||||
Added a note in the manual the png_read_update_info() must be called only
|
just the changes that definitely improve speed and remain simple.
|
||||||
once with a particular info_ptr.
|
The changes also slightly increase the clarity of the code.
|
||||||
Revised test-pngtest.sh to report FAIL when pngtest fails.
|
Check compression_type parameter in png_get_iCCP and remove spurious
|
||||||
Added "--strict" option to pngtest, to report FAIL when the failure is
|
casts. The compression_type parameter is always assigned to, so must
|
||||||
only because the resulting valid files are different.
|
be non-NULL. The cast of the profile length potentially truncated the
|
||||||
Revised CMakeLists.txt to work with mingw and removed some material from
|
value unnecessarily on a 16-bit int system, so the cast of the (byte)
|
||||||
CMakeLists.txt that is no longer useful in libpng-1.5.
|
compression type to (int) is specified by ANSI-C anyway.
|
||||||
Fixed typo in Makefile.in and Makefile.am ("-M Wl" should be "-M -Wl")."
|
Fixed FP division by zero in pngvalid.c; the 'test_pixel' code left
|
||||||
Speed up png_combine_row() for interlaced images. This reduces the generality
|
the sBIT fields in the test pixel as 0, which resulted in a floating
|
||||||
of the code, allowing it to be optimized for Adam7 interlace. The masks
|
point division by zero which was irrelevant but causes systems where
|
||||||
passed to png_combine_row() are now generated internally, avoiding
|
FP exceptions cause a crash. Added code to pngvalid to turn on FP
|
||||||
some code duplication and localizing the interlace handling somewhat.
|
exceptions if the appropriate glibc support is there to ensure this is
|
||||||
Align png_struct::row_buf - previously it was always unaligned, caused by
|
tested in the future.
|
||||||
a bug in the code that attempted to align it; the code needs to subtract
|
Added versioning to pnglibconf.h comments.
|
||||||
one from the pointer to take account of the filter byte prepended to
|
Installed more accurate linear to sRGB conversion tables. The slightly
|
||||||
each row.
|
modified tables reduce the number of 16-bit values that
|
||||||
Optimized png_combine_row() when rows are aligned. This gains a small
|
convert to an off-by-one 8-bit value. The "makesRGB.c" code that was used
|
||||||
percentage for 16-bit and 32-bit pixels in the typical case where the
|
to generate the tables is now in a contrib/sRGBtables sub-directory.
|
||||||
output row buffers are appropriately aligned. The optimization was not
|
Added run-time detection of NEON support.
|
||||||
previously possible because the png_struct buffer was always misaligned.
|
Multiple transform bug fixes plus a work-round for double gamma correction.
|
||||||
Removed two redundant tests for unitialized row.
|
libpng does not support more than one transform that requires linear data
|
||||||
Fixed a relatively harmless memory overwrite in compressed text writing
|
at once - if this is tried typically the results is double gamma
|
||||||
with a 1 byte zlib buffer.
|
correction. Since the simplified APIs can need rgb to gray combined with
|
||||||
Add ability to call png_read_update_info multiple times to pngvalid.c
|
a compose operation it is necessary to do one of these outside the main
|
||||||
Fixes for multiple calls to png_read_update_info. These fixes attend to
|
libpng transform code. This check-in also contains fixes to various bugs
|
||||||
most of the errors revealed in pngvalid, however doing the gamma work
|
in compose and rgb to gray (on palette).
|
||||||
twice results in inaccuracies that can't be easily fixed. There is now
|
Fixes for C++ compilation using g++ When libpng source is compiled
|
||||||
a warning in the code if this is going to happen.
|
using g++. The compiler imposes C++ rules on the C source; thus it
|
||||||
Turned on multiple png_read_update_info in pngvalid transform tests.
|
is desireable to make the source work with either C or C++ rules
|
||||||
Prevent libpng from overwriting unused bits at the end of the image when
|
without throwing away useful error information. This change adds
|
||||||
it is not byte aligned, while reading. Prior to libpng-1.5.6 libpng would
|
png_voidcast to allow C semantic (void*) cases or the corresponding
|
||||||
overwrite the partial byte at the end of each row if the row width was not
|
C++ static_cast operation, as appropriate.
|
||||||
an exact multiple of 8 bits and the image is not interlaced.
|
Added --noexecstack to assembler file compilation. GCC does not set
|
||||||
Made png_ptr->prev_row an aligned pointer into png_ptr->big_prev_row
|
this on assembler compilation, even though it does on C compilation.
|
||||||
(Mans Rullgard).
|
This creates security issues if assembler code is enabled; the
|
||||||
Changed misleading "Missing PLTE before cHRM" warning to "Out of place cHRM"
|
work-around is to set it by default in the flags for $(CCAS)
|
||||||
Added PNG_LSR() and PNG_LSL() macros to defend against buggy compilers that
|
Removed "zTXt" from warning in generic chunk decompression function.
|
||||||
evaluate non-taken code branches and complain about out-of-range shifts.
|
Validate time settings passed to pngset() and png_convert_to_rfc1123()
|
||||||
Renamed the local variable 'byte' because it appears in a MSYS header
|
(Frank Busse).
|
||||||
file.
|
Added MINGW support to CMakeLists.txt
|
||||||
Added #define PNG_ALIGN_TYPE PNG_ALIGN_NONE to contrib/pngminim/*/pngusr.h
|
Reject invalid compression flag or method when reading the iTXt chunk.
|
||||||
|
Moved pngvalid.c into contrib/libtests
|
||||||
|
Rebuilt Makefile.in, configure, etc., with autoconf-2.68
|
||||||
|
Replaced an "#if" with "#ifdef" in pngrtran.c
|
||||||
|
Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else)
|
||||||
|
Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400,
|
||||||
|
as in libpng-1.5.4.
|
||||||
|
Put CRLF line endings in the owatcom project files.
|
||||||
|
Updated CMakeLists.txt to account for the relocation of pngvalid.c
|
||||||
|
Minor fixes to pngvalid.c for gcc 4.6.2 compatibility to remove warnings
|
||||||
|
reported by earlier versions.
|
||||||
|
|
||||||
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
|
||||||
|
111
src/png/CHANGES
111
src/png/CHANGES
@@ -196,7 +196,8 @@ Version 0.97 [January, 1998]
|
|||||||
Added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P)
|
Added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P)
|
||||||
Minor corrections in libpng.txt
|
Minor corrections in libpng.txt
|
||||||
Added simple sRGB support (Glenn R-P)
|
Added simple sRGB support (Glenn R-P)
|
||||||
Easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
|
Easier conditional compiling, e.g.,
|
||||||
|
define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
|
||||||
all configurable options can be selected from command-line instead
|
all configurable options can be selected from command-line instead
|
||||||
of having to edit pngconf.h (Glenn R-P)
|
of having to edit pngconf.h (Glenn R-P)
|
||||||
Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
|
Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
|
||||||
@@ -207,7 +208,8 @@ Version 0.97 [January, 1998]
|
|||||||
Tested NODIV support and made it default behavior (Greg Roelofs)
|
Tested NODIV support and made it default behavior (Greg Roelofs)
|
||||||
Added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler)
|
Added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler)
|
||||||
Regularized version numbering scheme and bumped shared-library major
|
Regularized version numbering scheme and bumped shared-library major
|
||||||
version number to 2 to avoid problems with libpng 0.89 apps (Greg Roelofs)
|
version number to 2 to avoid problems with libpng 0.89 apps
|
||||||
|
(Greg Roelofs)
|
||||||
|
|
||||||
Version 0.98 [January, 1998]
|
Version 0.98 [January, 1998]
|
||||||
Cleaned up some typos in libpng.txt and in code documentation
|
Cleaned up some typos in libpng.txt and in code documentation
|
||||||
@@ -3669,6 +3671,111 @@ Version 1.5.6rc03 [October 28, 2011]
|
|||||||
Version 1.5.6 [November 3, 2011]
|
Version 1.5.6 [November 3, 2011]
|
||||||
No changes.
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.7beta01 [November 4, 2011]
|
||||||
|
Added support for ARM processor (Mans Rullgard)
|
||||||
|
Fixed bug in pngvalid on early allocation failure; fixed type cast in
|
||||||
|
pngmem.c; pngvalid would attempt to call png_error() if the allocation
|
||||||
|
of a png_struct or png_info failed. This would probably have led to a
|
||||||
|
crash. The pngmem.c implementation of png_malloc() included a cast
|
||||||
|
to png_size_t which would fail on large allocations on 16-bit systems.
|
||||||
|
Fix for the preprocessor of the Intel C compiler. The preprocessor
|
||||||
|
splits adjacent @ signs with a space; this changes the concatentation
|
||||||
|
token from @-@-@ to PNG_JOIN; that should work with all compiler
|
||||||
|
preprocessors.
|
||||||
|
Paeth filter speed improvements from work by Siarhei Siamashka. This
|
||||||
|
changes the 'Paeth' reconstruction function to improve the GCC code
|
||||||
|
generation on x86. The changes are only part of the suggested ones;
|
||||||
|
just the changes that definitely improve speed and remain simple.
|
||||||
|
The changes also slightly increase the clarity of the code.
|
||||||
|
|
||||||
|
Version 1.5.7beta02 [November 11, 2011]
|
||||||
|
Check compression_type parameter in png_get_iCCP and remove spurious
|
||||||
|
casts. The compression_type parameter is always assigned to, so must
|
||||||
|
be non-NULL. The cast of the profile length potentially truncated the
|
||||||
|
value unnecessarily on a 16-bit int system, so the cast of the (byte)
|
||||||
|
compression type to (int) is specified by ANSI-C anyway.
|
||||||
|
Fixed FP division by zero in pngvalid.c; the 'test_pixel' code left
|
||||||
|
the sBIT fields in the test pixel as 0, which resulted in a floating
|
||||||
|
point division by zero which was irrelevant but causes systems where
|
||||||
|
FP exceptions cause a crash. Added code to pngvalid to turn on FP
|
||||||
|
exceptions if the appropriate glibc support is there to ensure this is
|
||||||
|
tested in the future.
|
||||||
|
Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the
|
||||||
|
new PNG_JOIN macro.
|
||||||
|
Added versioning to pnglibconf.h comments.
|
||||||
|
Simplified read/write API initial version; basic read/write tested on
|
||||||
|
a variety of images, limited documentation (in the header file.)
|
||||||
|
Installed more accurate linear to sRGB conversion tables. The slightly
|
||||||
|
modified tables reduce the number of 16-bit values that
|
||||||
|
convert to an off-by-one 8-bit value. The "makesRGB.c" code that was used
|
||||||
|
to generate the tables is now in a contrib/sRGBtables sub-directory.
|
||||||
|
|
||||||
|
Version 1.5.7beta03 [November 17, 2011]
|
||||||
|
Removed PNG_CONST from the sRGB table declarations in pngpriv.h and png.c
|
||||||
|
Added run-time detection of NEON support.
|
||||||
|
Added contrib/libtests; includes simplified API test and timing test and
|
||||||
|
a color conversion utility for rapid checking of failed 'pngstest' results.
|
||||||
|
Multiple transform bug fixes plus a work-round for double gamma correction.
|
||||||
|
libpng does not support more than one transform that requires linear data
|
||||||
|
at once - if this is tried typically the results is double gamma
|
||||||
|
correction. Since the simplified APIs can need rgb to gray combined with
|
||||||
|
a compose operation it is necessary to do one of these outside the main
|
||||||
|
libpng transform code. This check-in also contains fixes to various bugs
|
||||||
|
in the simplified APIs themselves and to some bugs in compose and rgb to
|
||||||
|
gray (on palette) itself.
|
||||||
|
Fixes for C++ compilation using g++ When libpng source is compiled
|
||||||
|
using g++. The compiler imposes C++ rules on the C source; thus it
|
||||||
|
is desireable to make the source work with either C or C++ rules
|
||||||
|
without throwing away useful error information. This change adds
|
||||||
|
png_voidcast to allow C semantic (void*) cases or the corresponding
|
||||||
|
C++ static_cast operation, as appropriate.
|
||||||
|
Added --noexecstack to assembler file compilation. GCC does not set
|
||||||
|
this on assembler compilation, even though it does on C compilation.
|
||||||
|
This creates security issues if assembler code is enabled; the
|
||||||
|
work-around is to set it by default in the flags for $(CCAS)
|
||||||
|
Work around compilers that don't support declaration of const data. Some
|
||||||
|
compilers fault 'extern const' data declarations (because the data is
|
||||||
|
not initialized); this turns on const-ness only for compilers where
|
||||||
|
this is known to work.
|
||||||
|
|
||||||
|
Version 1.5.7beta04 [November 17, 2011]
|
||||||
|
Since the gcc driver does not recognize the --noexecstack flag, we must
|
||||||
|
use the -Wa prefix to have it passed through to the assembler.
|
||||||
|
Also removed a duplicate setting of this flag.
|
||||||
|
Added files that were omitted from the libpng-1.5.7beta03 zip distribution.
|
||||||
|
|
||||||
|
Version 1.5.7beta05 [November 25, 2011]
|
||||||
|
Removed "zTXt" from warning in generic chunk decompression function.
|
||||||
|
Validate time settings passed to pngset() and png_convert_to_rfc1123()
|
||||||
|
(Frank Busse).
|
||||||
|
Added MINGW support to CMakeLists.txt
|
||||||
|
Reject invalid compression flag or method when reading the iTXt chunk.
|
||||||
|
Backed out 'simplified' API changes. The API seems too complex and there
|
||||||
|
is a lack of consensus or enthusiasm for the proposals. The API also
|
||||||
|
reveals significant bugs inside libpng (double gamma correction and the
|
||||||
|
known bug of being unable to retrieve a corrected palette). It seems
|
||||||
|
better to wait until the bugs, at least, are corrected.
|
||||||
|
Moved pngvalid.c into contrib/libtests
|
||||||
|
Rebuilt Makefile.in, configure, etc., with autoconf-2.68
|
||||||
|
|
||||||
|
Version 1.5.7rc01 [December 1, 2011]
|
||||||
|
Replaced an "#if" with "#ifdef" in pngrtran.c
|
||||||
|
Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else)
|
||||||
|
|
||||||
|
Version 1.5.7rc02 [December 5, 2011]
|
||||||
|
Revised project files and contrib/pngvalid/pngvalid.c to account for
|
||||||
|
the relocation of pngvalid into contrib/libtests.
|
||||||
|
Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400,
|
||||||
|
as in libpng-1.5.4.
|
||||||
|
Put CRLF line endings in the owatcom project files.
|
||||||
|
|
||||||
|
Version 1.5.7rc03 [December 7, 2011]
|
||||||
|
Updated CMakeLists.txt to account for the relocation of pngvalid.c
|
||||||
|
|
||||||
|
Version 1.5.7 [December 15, 2011]
|
||||||
|
Minor fixes to pngvalid.c for gcc 4.6.2 compatibility to remove warnings
|
||||||
|
reported by earlier versions.
|
||||||
|
|
||||||
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
|
||||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
|
@@ -35,7 +35,7 @@ enable_testing()
|
|||||||
|
|
||||||
set(PNGLIB_MAJOR 1)
|
set(PNGLIB_MAJOR 1)
|
||||||
set(PNGLIB_MINOR 5)
|
set(PNGLIB_MINOR 5)
|
||||||
set(PNGLIB_RELEASE 6)
|
set(PNGLIB_RELEASE 7)
|
||||||
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})
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ set(pngtest_sources
|
|||||||
pngtest.c
|
pngtest.c
|
||||||
)
|
)
|
||||||
set(pngvalid_sources
|
set(pngvalid_sources
|
||||||
pngvalid.c
|
contrib/libtests/pngvalid.c
|
||||||
)
|
)
|
||||||
# SOME NEEDED DEFINITIONS
|
# SOME NEEDED DEFINITIONS
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
|||||||
# copies if different.
|
# copies if different.
|
||||||
macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
|
macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
|
||||||
FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
||||||
if(WIN32 AND NOT CYGWIN)
|
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
|
OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
|
||||||
@@ -196,10 +196,10 @@ macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
|
|||||||
DEPENDS ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC}
|
DEPENDS ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC}
|
||||||
)
|
)
|
||||||
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
||||||
else(WIN32 AND NOT CYGWIN)
|
else(WIN32 AND NOT CYGWIN AND NOT MINGW)
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
endif(WIN32 AND NOT CYGWIN)
|
endif(WIN32 AND NOT CYGWIN AND NOT MINGW)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# libpng is a library so default to 'lib'
|
# libpng is a library so default to 'lib'
|
||||||
@@ -211,7 +211,7 @@ endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
|||||||
# we use the same files like ./configure, so we have to set its vars
|
# we use the same files like ./configure, so we have to set its vars
|
||||||
# Only do this on Windows for Cygwin - the files don't make much sense outside
|
# Only do this on Windows for Cygwin - the files don't make much sense outside
|
||||||
# a UNIX look alike
|
# a UNIX look alike
|
||||||
if(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||||
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||||
@@ -224,12 +224,12 @@ CREATE_SYMLINK(${PNGLIB_NAME}.pc libpng.pc)
|
|||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
|
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
|
||||||
CREATE_SYMLINK(${PNGLIB_NAME}-config libpng-config)
|
CREATE_SYMLINK(${PNGLIB_NAME}-config libpng-config)
|
||||||
endif(NOT WIN32 OR CYGWIN)
|
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 15.${PNGLIB_RELEASE}.1.5.6
|
# VERSION 15.${PNGLIB_RELEASE}.1.5.7
|
||||||
VERSION 15.${PNGLIB_RELEASE}.0
|
VERSION 15.${PNGLIB_RELEASE}.0
|
||||||
SOVERSION 15
|
SOVERSION 15
|
||||||
CLEAN_DIRECT_OUTPUT 1)
|
CLEAN_DIRECT_OUTPUT 1)
|
||||||
@@ -264,13 +264,13 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
|||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
|
||||||
# Create a symlink for libpng.dll.a => libpng15.dll.a on Cygwin
|
# Create a symlink for libpng.dll.a => libpng15.dll.a on Cygwin
|
||||||
if(CYGWIN)
|
if(CYGWIN OR MINGW)
|
||||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE})
|
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE})
|
||||||
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
||||||
CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_IMPORT_LIBRARY_SUFFIX})
|
CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_IMPORT_LIBRARY_SUFFIX})
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
endif(CYGWIN)
|
endif(CYGWIN OR MINGW)
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE})
|
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE})
|
||||||
@@ -286,13 +286,13 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
|||||||
${PNG_EXPORT_RULE}
|
${PNG_EXPORT_RULE}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
if(NOT WIN32 OR CYGWIN)
|
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||||
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME_STATIC} LOCATION_${CMAKE_BUILD_TYPE})
|
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME_STATIC} LOCATION_${CMAKE_BUILD_TYPE})
|
||||||
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
||||||
CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
|
CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
endif(NOT WIN32 OR CYGWIN)
|
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -133,3 +133,23 @@ run "make install".
|
|||||||
Further information can be found in the README and libpng-manual.txt
|
Further information can be found in the README and libpng-manual.txt
|
||||||
files, in the individual makefiles, in png.h, and the manual pages
|
files, in the individual makefiles, in png.h, and the manual pages
|
||||||
libpng.3 and png.5.
|
libpng.3 and png.5.
|
||||||
|
|
||||||
|
Using the ./configure script -- 16 December 2002.
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
The ./configure script should work compatibly with what scripts/makefile.*
|
||||||
|
did, however there are some options you might need to add to configure
|
||||||
|
explicitly, which previously was done semi-automatically (if you didn't edit
|
||||||
|
scripts/makefile.* yourself, that is)
|
||||||
|
|
||||||
|
CFLAGS="-Wall -O -funroll-loops \
|
||||||
|
-malign-loops=2 -malign-functions=2" ./configure --prefix=/usr/include \
|
||||||
|
--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include
|
||||||
|
|
||||||
|
You can alternatively specify --includedir=/usr/include, /usr/local/include,
|
||||||
|
/usr/include/libpng%NN%, or whatever.
|
||||||
|
|
||||||
|
If you find that the configure script is out-of-date or is not supporting
|
||||||
|
your platform properly, try running autogen.sh to regenerate "configure",
|
||||||
|
"Makefile.in", and the other configuration files. Then try configure again.
|
||||||
|
|
||||||
|
@@ -10,7 +10,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.5.6, November 3, 2011, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.7, December 15, 2011, are
|
||||||
Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004, 2006-2011 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
|
||||||
November 3, 2011
|
December 15, 2011
|
||||||
|
227
src/png/Makefile.am
Normal file
227
src/png/Makefile.am
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
# Makefile.am:
|
||||||
|
# Source file for Makefile.in (and hence Makefile)
|
||||||
|
#
|
||||||
|
|
||||||
|
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
||||||
|
|
||||||
|
# libpng does not follow GNU file name conventions
|
||||||
|
|
||||||
|
# "color-tests" requires automake 1.11.1 or later. Enable it if you like,
|
||||||
|
# to get red "FAIL" and green "PASS" notations during tests.
|
||||||
|
# AUTOMAKE_OPTIONS = foreign color-tests
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
|
# test programs - run on make check, make distcheck
|
||||||
|
TESTS_ENVIRONMENT= srcdir=$(srcdir)
|
||||||
|
check_PROGRAMS= pngtest
|
||||||
|
pngtest_SOURCES = pngtest.c
|
||||||
|
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
TESTS = test-pngtest.sh
|
||||||
|
|
||||||
|
# Only do the following if the contrib directory is present.
|
||||||
|
check_PROGRAMS+= pngvalid
|
||||||
|
pngvalid_SOURCES = contrib/libtests/pngvalid.c
|
||||||
|
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
TESTS += test-pngvalid-simple.sh test-pngvalid-full.sh
|
||||||
|
|
||||||
|
# man pages
|
||||||
|
dist_man_MANS= libpng.3 libpngpf.3 png.5
|
||||||
|
|
||||||
|
# generate the -config scripts if required
|
||||||
|
binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
|
||||||
|
EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
|
||||||
|
bin_SCRIPTS= @binconfigs@
|
||||||
|
|
||||||
|
# rules to build libpng, only build the old library on request
|
||||||
|
lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
# EXTRA_LTLIBRARIES= libpng.la
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
||||||
|
pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\
|
||||||
|
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\
|
||||||
|
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
|
||||||
|
|
||||||
|
if PNG_ARM_NEON
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/filter_neon.S
|
||||||
|
endif
|
||||||
|
|
||||||
|
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
||||||
|
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||||
|
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
|
||||||
|
-version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0
|
||||||
|
|
||||||
|
if HAVE_LD_VERSION_SCRIPT
|
||||||
|
# Versioned symbols and restricted exports
|
||||||
|
if HAVE_SOLARIS_LD
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,-M -Wl,libpng.vers
|
||||||
|
else
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers
|
||||||
|
endif
|
||||||
|
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
|
||||||
|
else
|
||||||
|
# Only restricted exports when possible
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
||||||
|
endif
|
||||||
|
|
||||||
|
#distribute headers in /usr/include/libpng/*
|
||||||
|
pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
|
||||||
|
pkginclude_HEADERS= png.h pngconf.h
|
||||||
|
nodist_pkginclude_HEADERS= pnglibconf.h
|
||||||
|
|
||||||
|
# pkg-config stuff, note that libpng.pc is always required in order
|
||||||
|
# to get the correct library
|
||||||
|
pkgconfigdir = @pkgconfigdir@
|
||||||
|
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
|
||||||
|
|
||||||
|
#extra source distribution files.
|
||||||
|
EXTRA_DIST= \
|
||||||
|
ANNOUNCE CHANGES INSTALL LICENSE README TODO \
|
||||||
|
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
|
||||||
|
${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
|
||||||
|
$(TESTS) \
|
||||||
|
CMakeLists.txt example.c libpng-manual.txt
|
||||||
|
|
||||||
|
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.dfn
|
||||||
|
|
||||||
|
CLEANFILES= dfn.c dfn?.out pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
|
||||||
|
check.new pnglibconf.* symbols.new pngtest-log.txt \
|
||||||
|
$(SCRIPT_CLEANFILES)
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
|
||||||
|
config.sub configure depcomp install-sh ltmain.sh missing
|
||||||
|
|
||||||
|
# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe
|
||||||
|
# other operating systems (NeXT?) the C preprocessor selected by configure
|
||||||
|
# checks input tokens for validity - effectively it performs part of the ANSI-C
|
||||||
|
# parsing - and therefore fails with the .df files. configure.ac has special
|
||||||
|
# checks for this and sets DFNCPP appropriately.
|
||||||
|
DFNCPP = @DFNCPP@
|
||||||
|
|
||||||
|
SUFFIXES = .chk .dfn .out
|
||||||
|
|
||||||
|
$(PNGLIB_BASENAME).pc: libpng.pc
|
||||||
|
cp libpng.pc $@
|
||||||
|
|
||||||
|
$(PNGLIB_BASENAME)-config: libpng-config
|
||||||
|
cp libpng-config $@
|
||||||
|
|
||||||
|
scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h
|
||||||
|
scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
|
libpng.sym: scripts/sym.out
|
||||||
|
rm -f $@
|
||||||
|
cp $? $@
|
||||||
|
libpng.vers: scripts/vers.out
|
||||||
|
rm -f $@
|
||||||
|
cp $? $@
|
||||||
|
pnglibconf.h: pnglibconf.out
|
||||||
|
rm -f $@
|
||||||
|
cp $? $@
|
||||||
|
$(srcdir)/scripts/pnglibconf.h.prebuilt:
|
||||||
|
@echo "Attempting to build $@" >&2
|
||||||
|
@echo "This is a machine generated file, but if you want to make" >&2
|
||||||
|
@echo "a new one simply make 'scripts/pnglibconf.out' and copy that" >&2
|
||||||
|
@exit 1
|
||||||
|
|
||||||
|
# The following is necessary to ensure that the local pnglibconf.h is used, not
|
||||||
|
# an installed one (this can happen immediately after on a clean system if
|
||||||
|
# 'make test' is the first thing the user does.)
|
||||||
|
contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# interfering with the symbol file format.
|
||||||
|
SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
|
||||||
|
-DPNGLIB_VERSION='@PNGLIB_VERSION@'\
|
||||||
|
-DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\
|
||||||
|
-DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE
|
||||||
|
|
||||||
|
.dfn.out:
|
||||||
|
rm -f $@ dfn.c dfn?.out
|
||||||
|
test -d scripts || mkdir scripts
|
||||||
|
echo '#include "$<"' >dfn.c
|
||||||
|
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
||||||
|
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
||||||
|
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
|
||||||
|
dfn1.out >dfn2.out
|
||||||
|
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
||||||
|
rm -f dfn.c dfn[12].out
|
||||||
|
mv dfn3.out $@
|
||||||
|
|
||||||
|
# The .dfn file for pnglibconf.h is machine generated
|
||||||
|
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
||||||
|
rm -f $@ dfn?.out
|
||||||
|
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out version=search\
|
||||||
|
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
||||||
|
$(DFA_XTRA) 1>&2
|
||||||
|
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
||||||
|
rm dfn1.out
|
||||||
|
mv dfn2.out $@
|
||||||
|
|
||||||
|
# Symbol checks (.def and .out files should match)
|
||||||
|
scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
|
||||||
|
.out.chk:
|
||||||
|
rm -f $@ symbols.new
|
||||||
|
$(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
|
||||||
|
$< >&2
|
||||||
|
mv symbols.new $@
|
||||||
|
|
||||||
|
# used on demand to regenerate the standard header, CPPFLAGS should
|
||||||
|
# be empty - no non-standard defines
|
||||||
|
scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
||||||
|
rm -f $@ dfn?.out
|
||||||
|
test -z "$(CPPFLAGS)"
|
||||||
|
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
||||||
|
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out logunsupported=1
|
||||||
|
version=search ${srcdir}/pngconf.h -\
|
||||||
|
${srcdir}/scripts/pnglibconf.dfa 1>&2
|
||||||
|
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
||||||
|
rm dfn1.out
|
||||||
|
mv dfn2.out $@
|
||||||
|
|
||||||
|
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
|
||||||
|
pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h
|
||||||
|
|
||||||
|
test: check-am
|
||||||
|
|
||||||
|
# Extra checks
|
||||||
|
check: scripts/symbols.chk
|
||||||
|
|
||||||
|
# Don't distribute the generated script files
|
||||||
|
dist-hook:
|
||||||
|
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
|
||||||
|
|
||||||
|
# install the .../include headers as links to the new ones
|
||||||
|
install-data-hook:
|
||||||
|
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h pnglibconf.h
|
||||||
|
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
|
||||||
|
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \
|
||||||
|
pngconf.h
|
||||||
|
cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \
|
||||||
|
pnglibconf.h
|
||||||
|
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
|
||||||
|
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
||||||
|
|
||||||
|
# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used
|
||||||
|
install-exec-hook:
|
||||||
|
cd $(DESTDIR)$(bindir); rm -f libpng-config
|
||||||
|
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
||||||
|
@set -x;\
|
||||||
|
cd $(DESTDIR)$(libdir);\
|
||||||
|
for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib dll.a; do\
|
||||||
|
rm -f libpng.$$ext;\
|
||||||
|
if test -f $(PNGLIB_BASENAME).$$ext; then\
|
||||||
|
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
||||||
|
fi;\
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-hook:
|
||||||
|
cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h pnglibconf.h
|
||||||
|
rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc
|
||||||
|
rm -f $(DESTDIR)$(bindir)/libpng-config
|
||||||
|
rm -f $(DESTDIR)$(libdir)/libpng.a
|
||||||
|
rm -f $(DESTDIR)$(libdir)/libpng.la
|
1442
src/png/Makefile.in
Normal file
1442
src/png/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
README for libpng version 1.5.6 - November 3, 2011 (shared library 15.0)
|
README for libpng version 1.5.7 - December 15, 2011 (shared library 15.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.
|
||||||
|
9612
src/png/aclocal.m4
vendored
Normal file
9612
src/png/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
225
src/png/arm/filter_neon.S
Normal file
225
src/png/arm/filter_neon.S
Normal file
@@ -0,0 +1,225 @@
|
|||||||
|
|
||||||
|
/* filter_neon.S - NEON optimised filter functions
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011 Glenn Randers-Pehrson
|
||||||
|
* Written by Mans Rullgard, 2011.
|
||||||
|
*
|
||||||
|
* This code is released under the libpng license.
|
||||||
|
* For conditions of distribution and use, see the disclaimer
|
||||||
|
* and license in png.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(__linux__) && defined(__ELF__)
|
||||||
|
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __ELF__
|
||||||
|
# define ELF
|
||||||
|
#else
|
||||||
|
# define ELF @
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.arch armv7-a
|
||||||
|
.fpu neon
|
||||||
|
|
||||||
|
.macro func name, export=0
|
||||||
|
.macro endfunc
|
||||||
|
ELF .size \name, . - \name
|
||||||
|
.endfunc
|
||||||
|
.purgem endfunc
|
||||||
|
.endm
|
||||||
|
.text
|
||||||
|
.if \export
|
||||||
|
.global \name
|
||||||
|
.endif
|
||||||
|
ELF .type \name, STT_FUNC
|
||||||
|
.func \name
|
||||||
|
\name:
|
||||||
|
.endm
|
||||||
|
|
||||||
|
func png_read_filter_row_sub4_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||||
|
vadd.u8 d0, d3, d4
|
||||||
|
vadd.u8 d1, d0, d5
|
||||||
|
vadd.u8 d2, d1, d6
|
||||||
|
vadd.u8 d3, d2, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||||
|
subs r3, r3, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_sub3_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r2, #3
|
||||||
|
mov r12, #12
|
||||||
|
vld1.8 {q11}, [r0], r12
|
||||||
|
1:
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vadd.u8 d0, d3, d22
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vadd.u8 d1, d0, d5
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], r12
|
||||||
|
vst1.32 {d0[0]}, [r1,:32], r2
|
||||||
|
vadd.u8 d2, d1, d6
|
||||||
|
vst1.32 {d1[0]}, [r1], r2
|
||||||
|
vadd.u8 d3, d2, d7
|
||||||
|
vst1.32 {d2[0]}, [r1], r2
|
||||||
|
vst1.32 {d3[0]}, [r1], r2
|
||||||
|
subs r3, r3, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_up_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
1:
|
||||||
|
vld1.8 {q0}, [r1,:128]
|
||||||
|
vld1.8 {q1}, [r2,:128]!
|
||||||
|
vadd.u8 q0, q0, q1
|
||||||
|
vst1.8 {q0}, [r1,:128]!
|
||||||
|
subs r3, r3, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_avg4_neon, export=1
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||||
|
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
||||||
|
vhadd.u8 d0, d3, d16
|
||||||
|
vadd.u8 d0, d0, d4
|
||||||
|
vhadd.u8 d1, d0, d17
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vhadd.u8 d2, d1, d18
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vhadd.u8 d3, d2, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||||
|
subs r12, r12, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_avg3_neon, export=1
|
||||||
|
push {r4,lr}
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r4, #3
|
||||||
|
mov lr, #12
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
1:
|
||||||
|
vld1.8 {q10}, [r2], lr
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vhadd.u8 d0, d3, d20
|
||||||
|
vext.8 d17, d20, d21, #3
|
||||||
|
vadd.u8 d0, d0, d22
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vhadd.u8 d1, d0, d17
|
||||||
|
vext.8 d18, d20, d21, #6
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
vst1.32 {d0[0]}, [r1,:32], r4
|
||||||
|
vhadd.u8 d2, d1, d18
|
||||||
|
vst1.32 {d1[0]}, [r1], r4
|
||||||
|
vext.8 d19, d21, d21, #1
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vhadd.u8 d3, d2, d19
|
||||||
|
vst1.32 {d2[0]}, [r1], r4
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst1.32 {d3[0]}, [r1], r4
|
||||||
|
subs r12, r12, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
pop {r4,pc}
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
.macro paeth rx, ra, rb, rc
|
||||||
|
vaddl.u8 q12, \ra, \rb @ a + b
|
||||||
|
vaddl.u8 q15, \rc, \rc @ 2*c
|
||||||
|
vabdl.u8 q13, \rb, \rc @ pa
|
||||||
|
vabdl.u8 q14, \ra, \rc @ pb
|
||||||
|
vabd.u16 q15, q12, q15 @ pc
|
||||||
|
vcle.u16 q12, q13, q14 @ pa <= pb
|
||||||
|
vcle.u16 q13, q13, q15 @ pa <= pc
|
||||||
|
vcle.u16 q14, q14, q15 @ pb <= pc
|
||||||
|
vand q12, q12, q13 @ pa <= pb && pa <= pc
|
||||||
|
vmovn.u16 d28, q14
|
||||||
|
vmovn.u16 \rx, q12
|
||||||
|
vbsl d28, \rb, \rc
|
||||||
|
vbsl \rx, \ra, d28
|
||||||
|
.endm
|
||||||
|
|
||||||
|
func png_read_filter_row_paeth4_neon, export=1
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
vmov.i8 d20, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||||
|
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
||||||
|
paeth d0, d3, d16, d20
|
||||||
|
vadd.u8 d0, d0, d4
|
||||||
|
paeth d1, d0, d17, d16
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
paeth d2, d1, d18, d17
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
paeth d3, d2, d19, d18
|
||||||
|
vmov d20, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||||
|
subs r12, r12, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_paeth3_neon, export=1
|
||||||
|
push {r4,lr}
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
vmov.i8 d4, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r4, #3
|
||||||
|
mov lr, #12
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
1:
|
||||||
|
vld1.8 {q10}, [r2], lr
|
||||||
|
paeth d0, d3, d20, d4
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vadd.u8 d0, d0, d22
|
||||||
|
vext.8 d17, d20, d21, #3
|
||||||
|
paeth d1, d0, d17, d20
|
||||||
|
vst1.32 {d0[0]}, [r1,:32], r4
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vext.8 d18, d20, d21, #6
|
||||||
|
paeth d2, d1, d18, d17
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
vst1.32 {d1[0]}, [r1], r4
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vext.8 d19, d21, d21, #1
|
||||||
|
paeth d3, d2, d19, d18
|
||||||
|
vst1.32 {d2[0]}, [r1], r4
|
||||||
|
vmov d4, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst1.32 {d3[0]}, [r1], r4
|
||||||
|
subs r12, r12, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
pop {r4,pc}
|
||||||
|
endfunc
|
34
src/png/autogen.sh
Executable file
34
src/png/autogen.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# a quick hack script to generate necessary files from
|
||||||
|
# auto* tools.
|
||||||
|
#
|
||||||
|
# WARNING: if you run this you will change the versions
|
||||||
|
# of the tools which are used and, maybe, required!
|
||||||
|
|
||||||
|
# You can define your own replacements in your environment.
|
||||||
|
# $AUTOCONF, $AUTOMAKE, $AUTOHEADER, $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE
|
||||||
|
|
||||||
|
touch Makefile.am configure.ac
|
||||||
|
{
|
||||||
|
LT=${LIBTOOLIZE-libtoolize}
|
||||||
|
echo "running $LT" >&2
|
||||||
|
$LT --force --copy --automake
|
||||||
|
} && {
|
||||||
|
AL=${ACLOCAL-aclocal}
|
||||||
|
echo "running $AL" >&2
|
||||||
|
$AL
|
||||||
|
} && {
|
||||||
|
AH=${AUTOHEADER-autoheader}
|
||||||
|
echo "running $AH [ignore the warnings]" >&2
|
||||||
|
$AH
|
||||||
|
} && {
|
||||||
|
AM=${AUTOMAKE-automake}
|
||||||
|
echo "running $AM" >&2
|
||||||
|
$AM --force-missing --foreign -a -c
|
||||||
|
} && {
|
||||||
|
AC=${AUTOCONF-autoconf}
|
||||||
|
echo "running $AC" >&2
|
||||||
|
$AC
|
||||||
|
} &&
|
||||||
|
echo "autogen complete" >&2 ||
|
||||||
|
echo "ERROR: autogen.sh failed, autogen is incomplete" >&2
|
1407
src/png/config.guess
vendored
Executable file
1407
src/png/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
109
src/png/config.h.in
Normal file
109
src/png/config.h.in
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `feenableexcept' function. */
|
||||||
|
#undef HAVE_FEENABLEEXCEPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `m' library (-lm). */
|
||||||
|
#undef HAVE_LIBM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `z' library (-lz). */
|
||||||
|
#undef HAVE_LIBZ
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
|
#undef HAVE_MALLOC_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memset' function. */
|
||||||
|
#undef HAVE_MEMSET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `pow' function. */
|
||||||
|
#undef HAVE_POW
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||||
|
*/
|
||||||
|
#undef LT_OBJDIR
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#undef PACKAGE_URL
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Align row buffers */
|
||||||
|
#undef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
|
|
||||||
|
/* Enable ARM NEON optimizations */
|
||||||
|
#undef PNG_ARM_NEON
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||||
|
#undef TM_IN_SYS_TIME
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#undef const
|
||||||
|
|
||||||
|
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
||||||
|
nothing if this is not supported. Do not define if restrict is
|
||||||
|
supported directly. */
|
||||||
|
#undef restrict
|
||||||
|
/* Work around a bug in Sun C++: it does not support _Restrict or
|
||||||
|
__restrict__, even though the corresponding Sun C compiler ends up with
|
||||||
|
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
||||||
|
previous line. Perhaps some future version of Sun C++ will work with
|
||||||
|
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
||||||
|
#if defined __SUNPRO_CC && !defined __RESTRICT
|
||||||
|
# define _Restrict
|
||||||
|
# define __restrict__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
|
#undef size_t
|
1504
src/png/config.sub
vendored
Executable file
1504
src/png/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
15265
src/png/configure
vendored
15265
src/png/configure
vendored
File diff suppressed because it is too large
Load Diff
205
src/png/configure.ac
Normal file
205
src/png/configure.ac
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
# configure.ac
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
dnl
|
||||||
|
dnl Minor upgrades (compatible ABI): increment the package version
|
||||||
|
dnl (third field in two places below) and set the PNGLIB_RELEASE
|
||||||
|
dnl variable.
|
||||||
|
dnl
|
||||||
|
dnl Major upgrades (incompatible ABI): increment the package major
|
||||||
|
dnl version (second field, or first if desired), set the minor
|
||||||
|
dnl to 0, set PNGLIB_MAJOR below *and* follow the instructions in
|
||||||
|
dnl Makefile.am to upgrade the package name.
|
||||||
|
|
||||||
|
dnl This is here to prevent earlier autoconf from being used, it
|
||||||
|
dnl should not be necessary to regenerate configure if the time
|
||||||
|
dnl stamps are correct
|
||||||
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
|
dnl Version number stuff here:
|
||||||
|
|
||||||
|
AC_INIT([libpng], [1.5.7], [png-mng-implement@lists.sourceforge.net])
|
||||||
|
AM_INIT_AUTOMAKE
|
||||||
|
dnl stop configure from automagically running automake
|
||||||
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
|
PNGLIB_VERSION=1.5.7
|
||||||
|
PNGLIB_MAJOR=1
|
||||||
|
PNGLIB_MINOR=5
|
||||||
|
PNGLIB_RELEASE=7
|
||||||
|
|
||||||
|
dnl End of version number stuff
|
||||||
|
|
||||||
|
AC_CONFIG_SRCDIR([pngget.c])
|
||||||
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_LANG([C])
|
||||||
|
AC_PROG_CC
|
||||||
|
AM_PROG_AS
|
||||||
|
AC_PROG_LD
|
||||||
|
AC_PROG_CPP
|
||||||
|
AC_CHECK_TOOL(SED, sed, :)
|
||||||
|
AC_CHECK_TOOL(AWK, awk, :)
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LN_S
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
LT_INIT([win32-dll])
|
||||||
|
|
||||||
|
# On Solaris 10 and 12 CPP gets set to cc -E, however this still
|
||||||
|
# does some input parsing. We need strict ANSI-C style tokenization,
|
||||||
|
# check this:
|
||||||
|
AC_REQUIRE_CPP
|
||||||
|
AC_MSG_CHECKING([for a C preprocessor that does not parse its input])
|
||||||
|
AC_TRY_CPP([1.5.0 16BIT],
|
||||||
|
[DFNCPP="$CPP"],
|
||||||
|
[DFNCPP=""
|
||||||
|
sav_CPP="$CPP"
|
||||||
|
for CPP in "${CC-cc} -E" "${CC-cc} -E -traditional-cpp" "/lib/cpp" "cpp"; do
|
||||||
|
AC_TRY_CPP([1.5.0 16BIT],
|
||||||
|
[DFNCPP="$CPP"]
|
||||||
|
[break],,)
|
||||||
|
done
|
||||||
|
CPP="$sav_CPP"])
|
||||||
|
if test -n "$DFNCPP"; then
|
||||||
|
AC_MSG_RESULT([$DFNCPP])
|
||||||
|
AC_SUBST(DFNCPP)
|
||||||
|
else
|
||||||
|
AC_MSG_FAILURE([not found], 1)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_STRUCT_TM
|
||||||
|
AC_C_RESTRICT
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_STRTOD
|
||||||
|
AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
|
||||||
|
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
|
||||||
|
AC_ARG_WITH(zlib-prefix,
|
||||||
|
AC_HELP_STRING([--with-zlib-prefix],
|
||||||
|
[prefix that may have been used in installed zlib]),
|
||||||
|
[ZPREFIX=${withval}],
|
||||||
|
[ZPREFIX='z_'])
|
||||||
|
AC_CHECK_LIB(z, zlibVersion, ,
|
||||||
|
AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, ,
|
||||||
|
AC_ERROR([zlib not installed])))
|
||||||
|
|
||||||
|
# The following is for pngvalid, to ensure it catches FP errors even on
|
||||||
|
# platforms that don't enable FP exceptions, the function appears in the math
|
||||||
|
# library (typically), it's not an error if it is not found.
|
||||||
|
AC_CHECK_LIB([m], [feenableexcept])
|
||||||
|
AC_CHECK_FUNCS([feenableexcept])
|
||||||
|
|
||||||
|
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
|
||||||
|
LIBPNG_DEFINES=$LIBPNG_DEFINES
|
||||||
|
AC_SUBST(LIBPNG_DEFINES)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if libraries can be versioned])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if using Solaris linker])
|
||||||
|
SLD=`$LD --version 2>&1 | grep Solaris`
|
||||||
|
if test "$SLD"; then
|
||||||
|
have_solaris_ld=yes
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
have_solaris_ld=no
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(HAVE_SOLARIS_LD, test "$have_solaris_ld" = "yes")
|
||||||
|
|
||||||
|
# Special case for PE/COFF platforms: ld reports
|
||||||
|
# support for version-script, but doesn't actually
|
||||||
|
# DO anything with it.
|
||||||
|
case $host in
|
||||||
|
*cygwin* | *mingw32* | *interix* )
|
||||||
|
have_ld_version_script=no
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
|
||||||
|
if test "$have_solaris_ld" = "yes"; then
|
||||||
|
GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'`
|
||||||
|
else
|
||||||
|
GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$GLD"; then
|
||||||
|
have_ld_version_script=yes
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
have_ld_version_script=no
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_WARN(*** You have not enabled versioned symbols.)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
||||||
|
|
||||||
|
if test "$have_ld_version_script" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([for symbol prefix])
|
||||||
|
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
|
||||||
|
| ${CPP-${CC-gcc} -E} - 2>&1 \
|
||||||
|
| ${EGREP-grep} "^PREFIX=" \
|
||||||
|
| ${SED-sed} "s:^PREFIX=::"`
|
||||||
|
AC_SUBST(SYMBOL_PREFIX)
|
||||||
|
AC_MSG_RESULT($SYMBOL_PREFIX)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Substitutions for .in files
|
||||||
|
AC_SUBST(PNGLIB_VERSION)
|
||||||
|
AC_SUBST(PNGLIB_MAJOR)
|
||||||
|
AC_SUBST(PNGLIB_MINOR)
|
||||||
|
AC_SUBST(PNGLIB_RELEASE)
|
||||||
|
|
||||||
|
# Additional arguments (and substitutions)
|
||||||
|
# Allow the pkg-config directory to be set
|
||||||
|
AC_ARG_WITH(pkgconfigdir,
|
||||||
|
AC_HELP_STRING([--with-pkgconfigdir],
|
||||||
|
[Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
|
||||||
|
[pkgconfigdir=${withval}],
|
||||||
|
[pkgconfigdir='${libdir}/pkgconfig'])
|
||||||
|
|
||||||
|
AC_SUBST([pkgconfigdir])
|
||||||
|
AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
|
||||||
|
|
||||||
|
# Make the *-config binary config scripts optional
|
||||||
|
AC_ARG_WITH(binconfigs,
|
||||||
|
AC_HELP_STRING([--with-binconfigs],
|
||||||
|
[Generate shell libpng-config scripts as well as pkg-config data]
|
||||||
|
[@<:@default=yes@:>@]),
|
||||||
|
[if test "${withval}" = no; then
|
||||||
|
binconfigs=
|
||||||
|
AC_MSG_NOTICE([libpng-config scripts will not be built])
|
||||||
|
else
|
||||||
|
binconfigs='${binconfigs}'
|
||||||
|
fi],
|
||||||
|
[binconfigs='${binconfigs}'])
|
||||||
|
AC_SUBST([binconfigs])
|
||||||
|
|
||||||
|
# Because GCC by default assembles code with an executable stack, even though it
|
||||||
|
# compiles C code with a non-executable stack, it is necessary to do a fixup
|
||||||
|
# here (this may by GCC specific)
|
||||||
|
AC_SUBST([AM_CCASFLAGS], [-Wa,--noexecstack])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([arm-neon],
|
||||||
|
AC_HELP_STRING([--enable-arm-neon], [Enable ARM NEON optimizations]),
|
||||||
|
[if test "${enableval}" = yes; then
|
||||||
|
AC_DEFINE([PNG_ARM_NEON], [1], [Enable ARM NEON optimizations])
|
||||||
|
AC_DEFINE([PNG_ALIGNED_MEMORY_SUPPORTED], [1], [Align row buffers])
|
||||||
|
fi])
|
||||||
|
AM_CONDITIONAL([PNG_ARM_NEON], [test "${enable_arm_neon:-no}" = yes])
|
||||||
|
|
||||||
|
# Config files, substituting as above
|
||||||
|
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
|
||||||
|
AC_CONFIG_FILES([libpng-config:libpng-config.in],
|
||||||
|
[chmod +x libpng-config])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
630
src/png/depcomp
Executable file
630
src/png/depcomp
Executable file
@@ -0,0 +1,630 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||||
|
# Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||||
|
as side-effects.
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
depmode Dependency tracking mode.
|
||||||
|
source Source file read by `PROGRAMS ARGS'.
|
||||||
|
object Object file output by `PROGRAMS ARGS'.
|
||||||
|
DEPDIR directory where to store dependencies.
|
||||||
|
depfile Dependency file to output.
|
||||||
|
tmpdepfile Temporary file to use when outputing dependencies.
|
||||||
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "depcomp $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||||
|
depfile=${depfile-`echo "$object" |
|
||||||
|
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
cygpath_u="cygpath -u -f -"
|
||||||
|
if test "$depmode" = msvcmsys; then
|
||||||
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||||
|
depmode=msvisualcpp
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||||
|
## the command line argument order; so add the flags where they
|
||||||
|
## appear in depend2.am. Note that the slowdown incurred here
|
||||||
|
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||||
|
*) set fnord "$@" "$arg" ;;
|
||||||
|
esac
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
done
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say).
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||||
|
## The second -e expression handles DOS-style file names with drive letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the `deleted header file' problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" |
|
||||||
|
## Some versions of gcc put a space before the `:'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||||
|
tr '
|
||||||
|
' ' ' >> "$depfile"
|
||||||
|
echo >> "$depfile"
|
||||||
|
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> "$depfile"
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. In older versions, this file always lives in the
|
||||||
|
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||||
|
# start of each line; $object doesn't have directory information.
|
||||||
|
# Version 6 uses the directory in both cases.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$base.u
|
||||||
|
tmpdepfile3=$dir.libs/$base.u
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$dir$base.u
|
||||||
|
tmpdepfile3=$dir$base.u
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form `foo.o: dependent.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
|
# That's a tab and a space in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
icc)
|
||||||
|
# Intel's C compiler understands `-MD -MF file'. However on
|
||||||
|
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||||
|
# ICC 7.0 will fill foo.d with something like
|
||||||
|
# foo.o: sub/foo.c
|
||||||
|
# foo.o: sub/foo.h
|
||||||
|
# which is wrong. We want:
|
||||||
|
# sub/foo.o: sub/foo.c
|
||||||
|
# sub/foo.o: sub/foo.h
|
||||||
|
# sub/foo.c:
|
||||||
|
# sub/foo.h:
|
||||||
|
# ICC 7.1 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using \ :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||||
|
sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp2)
|
||||||
|
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||||
|
# compilers, which have integrated preprocessors. The correct option
|
||||||
|
# to use with these is +Maked; it writes dependencies to a file named
|
||||||
|
# 'foo.d', which lands next to the object file, wherever that
|
||||||
|
# happens to be.
|
||||||
|
# Much of this is similar to the tru64 case; see comments there.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir.libs/$base.d
|
||||||
|
"$@" -Wc,+Maked
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
"$@" +Maked
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||||
|
# Add `dependent.h:' lines.
|
||||||
|
sed -ne '2,${
|
||||||
|
s/^ *//
|
||||||
|
s/ \\*$//
|
||||||
|
s/$/:/
|
||||||
|
p
|
||||||
|
}' "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in `foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
# With Tru64 cc, shared objects can also be used to make a
|
||||||
|
# static library. This mechanism is used in libtool 1.4 series to
|
||||||
|
# handle both shared and static libraries in a single compilation.
|
||||||
|
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||||
|
#
|
||||||
|
# With libtool 1.5 this exception was removed, and libtool now
|
||||||
|
# generates 2 separate objects for the 2 libraries. These two
|
||||||
|
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||||
|
# in $dir$base.o.d. We have to check for both files, because
|
||||||
|
# one of the two compilations can be disabled. We should prefer
|
||||||
|
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||||
|
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||||
|
# the former would cause a distcleancheck panic.
|
||||||
|
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||||
|
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.o.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
tmpdepfile3=$dir$base.d
|
||||||
|
tmpdepfile4=$dir$base.d
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
|
# That's a tab and a space in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for `:'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no eat=no
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
if test $eat = yes; then
|
||||||
|
eat=no
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-arch)
|
||||||
|
eat=yes ;;
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||||
|
' | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E |
|
||||||
|
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||||
|
sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E 2>/dev/null |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
|
echo " " >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvcmsys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
@@ -2,11 +2,10 @@
|
|||||||
#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.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* This file has been placed in the public domain by the authors.
|
|
||||||
* Maintained 1998-2011 Glenn Randers-Pehrson
|
* Maintained 1998-2011 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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* This is an example of how to use libpng to read and write PNG files.
|
/* This is an example of how to use libpng to read and write PNG files.
|
||||||
@@ -14,6 +13,8 @@
|
|||||||
* read it, do so first. This was designed to be a starting point of an
|
* read it, do so first. This was designed to be a starting point of an
|
||||||
* implementation. This is not officially part of libpng, is hereby placed
|
* implementation. This is not officially part of libpng, is hereby placed
|
||||||
* in the public domain, and therefore does not require a copyright notice.
|
* in the public domain, and therefore does not require a copyright notice.
|
||||||
|
* To the extent possible under law, the authors have waived all copyright and
|
||||||
|
* related or neighboring rights to this file.
|
||||||
*
|
*
|
||||||
* This file does not currently compile, because it is missing certain
|
* This file does not currently compile, because it is missing certain
|
||||||
* parts, like allocating memory to hold an image. You will have to
|
* parts, like allocating memory to hold an image. You will have to
|
||||||
|
520
src/png/install-sh
Executable file
520
src/png/install-sh
Executable file
@@ -0,0 +1,520 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
# following copyright and license.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1994 X Consortium
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to
|
||||||
|
# deal in the Software without restriction, including without limitation the
|
||||||
|
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
# sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||||
|
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
# Except as contained in this notice, the name of the X Consortium shall not
|
||||||
|
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||||
|
# ings in this Software without prior written authorization from the X Consor-
|
||||||
|
# tium.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# FSF changes to this file are in the public domain.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# `make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit=${DOITPROG-}
|
||||||
|
if test -z "$doit"; then
|
||||||
|
doit_exec=exec
|
||||||
|
else
|
||||||
|
doit_exec=$doit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Put in absolute file names if you don't have them in your path;
|
||||||
|
# or use environment vars.
|
||||||
|
|
||||||
|
chgrpprog=${CHGRPPROG-chgrp}
|
||||||
|
chmodprog=${CHMODPROG-chmod}
|
||||||
|
chownprog=${CHOWNPROG-chown}
|
||||||
|
cmpprog=${CMPPROG-cmp}
|
||||||
|
cpprog=${CPPROG-cp}
|
||||||
|
mkdirprog=${MKDIRPROG-mkdir}
|
||||||
|
mvprog=${MVPROG-mv}
|
||||||
|
rmprog=${RMPROG-rm}
|
||||||
|
stripprog=${STRIPPROG-strip}
|
||||||
|
|
||||||
|
posix_glob='?'
|
||||||
|
initialize_posix_glob='
|
||||||
|
test "$posix_glob" != "?" || {
|
||||||
|
if (set -f) 2>/dev/null; then
|
||||||
|
posix_glob=
|
||||||
|
else
|
||||||
|
posix_glob=:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
'
|
||||||
|
|
||||||
|
posix_mkdir=
|
||||||
|
|
||||||
|
# Desired mode of installed file.
|
||||||
|
mode=0755
|
||||||
|
|
||||||
|
chgrpcmd=
|
||||||
|
chmodcmd=$chmodprog
|
||||||
|
chowncmd=
|
||||||
|
mvcmd=$mvprog
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
stripcmd=
|
||||||
|
|
||||||
|
src=
|
||||||
|
dst=
|
||||||
|
dir_arg=
|
||||||
|
dst_arg=
|
||||||
|
|
||||||
|
copy_on_change=false
|
||||||
|
no_target_directory=
|
||||||
|
|
||||||
|
usage="\
|
||||||
|
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||||
|
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||||
|
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||||
|
or: $0 [OPTION]... -d DIRECTORIES...
|
||||||
|
|
||||||
|
In the 1st form, copy SRCFILE to DSTFILE.
|
||||||
|
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||||
|
In the 4th, create DIRECTORIES.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--help display this help and exit.
|
||||||
|
--version display version info and exit.
|
||||||
|
|
||||||
|
-c (ignored)
|
||||||
|
-C install only if different (preserve the last data modification time)
|
||||||
|
-d create directories instead of installing files.
|
||||||
|
-g GROUP $chgrpprog installed files to GROUP.
|
||||||
|
-m MODE $chmodprog installed files to MODE.
|
||||||
|
-o USER $chownprog installed files to USER.
|
||||||
|
-s $stripprog installed files.
|
||||||
|
-t DIRECTORY install into DIRECTORY.
|
||||||
|
-T report an error if DSTFILE is a directory.
|
||||||
|
|
||||||
|
Environment variables override the default commands:
|
||||||
|
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||||
|
RMPROG STRIPPROG
|
||||||
|
"
|
||||||
|
|
||||||
|
while test $# -ne 0; do
|
||||||
|
case $1 in
|
||||||
|
-c) ;;
|
||||||
|
|
||||||
|
-C) copy_on_change=true;;
|
||||||
|
|
||||||
|
-d) dir_arg=true;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
|
-m) mode=$2
|
||||||
|
case $mode in
|
||||||
|
*' '* | *' '* | *'
|
||||||
|
'* | *'*'* | *'?'* | *'['*)
|
||||||
|
echo "$0: invalid mode: $mode" >&2
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
|
-t) dst_arg=$2
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-T) no_target_directory=true;;
|
||||||
|
|
||||||
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
|
--) shift
|
||||||
|
break;;
|
||||||
|
|
||||||
|
-*) echo "$0: invalid option: $1" >&2
|
||||||
|
exit 1;;
|
||||||
|
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
|
# When -d is used, all remaining arguments are directories to create.
|
||||||
|
# When -t is used, the destination is already specified.
|
||||||
|
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$dst_arg"; then
|
||||||
|
# $@ is not empty: it contains at least $arg.
|
||||||
|
set fnord "$@" "$dst_arg"
|
||||||
|
shift # fnord
|
||||||
|
fi
|
||||||
|
shift # arg
|
||||||
|
dst_arg=$arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
echo "$0: no input file specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# It's OK to call `install-sh -d' without argument.
|
||||||
|
# This can happen when creating conditional directories.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
trap '(exit $?); exit' 1 2 13 15
|
||||||
|
|
||||||
|
# Set umask so as not to create temps with too-generous modes.
|
||||||
|
# However, 'strip' requires both read and write access to temps.
|
||||||
|
case $mode in
|
||||||
|
# Optimize common cases.
|
||||||
|
*644) cp_umask=133;;
|
||||||
|
*755) cp_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw='% 200'
|
||||||
|
fi
|
||||||
|
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||||
|
*)
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw=,u+rw
|
||||||
|
fi
|
||||||
|
cp_umask=$mode$u_plus_rw;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
for src
|
||||||
|
do
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $src in
|
||||||
|
-*) src=./$src;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
dst=$src
|
||||||
|
dstdir=$dst
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
if test ! -f "$src" && test ! -d "$src"; then
|
||||||
|
echo "$0: $src does not exist." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dst_arg"; then
|
||||||
|
echo "$0: no destination specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dst=$dst_arg
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $dst in
|
||||||
|
-*) dst=./$dst;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; won't work
|
||||||
|
# if double slashes aren't ignored.
|
||||||
|
if test -d "$dst"; then
|
||||||
|
if test -n "$no_target_directory"; then
|
||||||
|
echo "$0: $dst_arg: Is a directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dstdir=$dst
|
||||||
|
dst=$dstdir/`basename "$src"`
|
||||||
|
dstdir_status=0
|
||||||
|
else
|
||||||
|
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||||
|
dstdir=`
|
||||||
|
(dirname "$dst") 2>/dev/null ||
|
||||||
|
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||||
|
X"$dst" : 'X\(//\)[^/]' \| \
|
||||||
|
X"$dst" : 'X\(//\)$' \| \
|
||||||
|
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||||
|
echo X"$dst" |
|
||||||
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)[^/].*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\).*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
s/.*/./; q'
|
||||||
|
`
|
||||||
|
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
obsolete_mkdir_used=false
|
||||||
|
|
||||||
|
if test $dstdir_status != 0; then
|
||||||
|
case $posix_mkdir in
|
||||||
|
'')
|
||||||
|
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||||
|
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||||
|
umask=`umask`
|
||||||
|
case $stripcmd.$umask in
|
||||||
|
# Optimize common cases.
|
||||||
|
*[2367][2367]) mkdir_umask=$umask;;
|
||||||
|
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
mkdir_umask=`expr $umask + 22 \
|
||||||
|
- $umask % 100 % 40 + $umask % 20 \
|
||||||
|
- $umask % 10 % 4 + $umask % 2
|
||||||
|
`;;
|
||||||
|
*) mkdir_umask=$umask,go-w;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# With -d, create the new directory with the user-specified mode.
|
||||||
|
# Otherwise, rely on $mkdir_umask.
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
mkdir_mode=-m$mode
|
||||||
|
else
|
||||||
|
mkdir_mode=
|
||||||
|
fi
|
||||||
|
|
||||||
|
posix_mkdir=false
|
||||||
|
case $umask in
|
||||||
|
*[123567][0-7][0-7])
|
||||||
|
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||||
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||||
|
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||||
|
|
||||||
|
if (umask $mkdir_umask &&
|
||||||
|
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
if test -z "$dir_arg" || {
|
||||||
|
# Check for POSIX incompatibilities with -m.
|
||||||
|
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||||
|
# other-writeable bit of parent directory when it shouldn't.
|
||||||
|
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||||
|
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||||
|
case $ls_ld_tmpdir in
|
||||||
|
d????-?r-*) different_mode=700;;
|
||||||
|
d????-?--*) different_mode=755;;
|
||||||
|
*) false;;
|
||||||
|
esac &&
|
||||||
|
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||||
|
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||||
|
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
then posix_mkdir=:
|
||||||
|
fi
|
||||||
|
rmdir "$tmpdir/d" "$tmpdir"
|
||||||
|
else
|
||||||
|
# Remove any dirs left behind by ancient mkdir implementations.
|
||||||
|
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||||
|
fi
|
||||||
|
trap '' 0;;
|
||||||
|
esac;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if
|
||||||
|
$posix_mkdir && (
|
||||||
|
umask $mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||||
|
)
|
||||||
|
then :
|
||||||
|
else
|
||||||
|
|
||||||
|
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||||
|
# or it failed possibly due to a race condition. Create the
|
||||||
|
# directory the slow way, step by step, checking for races as we go.
|
||||||
|
|
||||||
|
case $dstdir in
|
||||||
|
/*) prefix='/';;
|
||||||
|
-*) prefix='./';;
|
||||||
|
*) prefix='';;
|
||||||
|
esac
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob"
|
||||||
|
|
||||||
|
oIFS=$IFS
|
||||||
|
IFS=/
|
||||||
|
$posix_glob set -f
|
||||||
|
set fnord $dstdir
|
||||||
|
shift
|
||||||
|
$posix_glob set +f
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
prefixes=
|
||||||
|
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
test -z "$d" && continue
|
||||||
|
|
||||||
|
prefix=$prefix$d
|
||||||
|
if test -d "$prefix"; then
|
||||||
|
prefixes=
|
||||||
|
else
|
||||||
|
if $posix_mkdir; then
|
||||||
|
(umask=$mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
test -d "$prefix" || exit 1
|
||||||
|
else
|
||||||
|
case $prefix in
|
||||||
|
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||||
|
*) qprefix=$prefix;;
|
||||||
|
esac
|
||||||
|
prefixes="$prefixes '$qprefix'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
prefix=$prefix/
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -n "$prefixes"; then
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
(umask $mkdir_umask &&
|
||||||
|
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||||
|
test -d "$dstdir" || exit 1
|
||||||
|
obsolete_mkdir_used=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||||
|
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||||
|
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||||
|
else
|
||||||
|
|
||||||
|
# Make a couple of temp file names in the proper directory.
|
||||||
|
dsttmp=$dstdir/_inst.$$_
|
||||||
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
|
# Trap to clean up those temp files at exit.
|
||||||
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||||
|
|
||||||
|
# Copy the file name to the temp name.
|
||||||
|
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits.
|
||||||
|
#
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||||
|
#
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||||
|
|
||||||
|
# If -C, don't bother to copy if it wouldn't change the file.
|
||||||
|
if $copy_on_change &&
|
||||||
|
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||||
|
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob" &&
|
||||||
|
$posix_glob set -f &&
|
||||||
|
set X $old && old=:$2:$4:$5:$6 &&
|
||||||
|
set X $new && new=:$2:$4:$5:$6 &&
|
||||||
|
$posix_glob set +f &&
|
||||||
|
|
||||||
|
test "$old" = "$new" &&
|
||||||
|
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
rm -f "$dsttmp"
|
||||||
|
else
|
||||||
|
# Rename the file to the real destination.
|
||||||
|
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||||
|
|
||||||
|
# The rename failed, perhaps because mv can't rename something else
|
||||||
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
|
# support -f.
|
||||||
|
{
|
||||||
|
# Now remove or move aside any old file at destination location.
|
||||||
|
# We try this two ways since rm can't unlink itself on some
|
||||||
|
# systems and the destination file might be busy for other
|
||||||
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
|
# file should still install successfully.
|
||||||
|
{
|
||||||
|
test ! -f "$dst" ||
|
||||||
|
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||||
|
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||||
|
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||||
|
} ||
|
||||||
|
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||||
|
(exit 1); exit 1
|
||||||
|
}
|
||||||
|
} &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
|
}
|
||||||
|
fi || exit 1
|
||||||
|
|
||||||
|
trap '' 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
@@ -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.5.6 - November 3, 2011
|
libpng version 1.5.7 - December 15, 2011
|
||||||
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-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 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.5.6 - November 3, 2011
|
libpng versions 0.97, January 1998, through 1.5.7 - December 15, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -1265,10 +1265,13 @@ pointer into the info_ptr is returned for any complex types.
|
|||||||
(empty string for unknown).
|
(empty string for unknown).
|
||||||
|
|
||||||
Note that the itxt_length, lang, and lang_key
|
Note that the itxt_length, lang, and lang_key
|
||||||
members of the text_ptr structure only exist
|
members of the text_ptr structure only exist when the
|
||||||
when the library is built with iTXt chunk support.
|
library is built with iTXt chunk support. Prior to
|
||||||
Prior to libpng-1.4.0, the default build was
|
libpng-1.4.0 the library was built by default without
|
||||||
without iTXt chunk support.
|
iTXt support. Also note that when iTXt is supported,
|
||||||
|
they contain NULL pointers when the "compression"
|
||||||
|
field contains PNG_TEXT_COMPRESSION_NONE or
|
||||||
|
PNG_TEXT_COMPRESSION_zTXt.
|
||||||
|
|
||||||
num_text - number of comments (same as
|
num_text - number of comments (same as
|
||||||
num_comments; you can put NULL here
|
num_comments; you can put NULL here
|
||||||
@@ -2849,11 +2852,15 @@ width, height, bit_depth, and color_type must be the same in each call.
|
|||||||
empty for unknown).
|
empty for unknown).
|
||||||
text_ptr[i].translated_keyword - keyword in UTF-8 (NULL
|
text_ptr[i].translated_keyword - keyword in UTF-8 (NULL
|
||||||
or empty for unknown).
|
or empty for unknown).
|
||||||
|
|
||||||
Note that the itxt_length, lang, and lang_key
|
Note that the itxt_length, lang, and lang_key
|
||||||
members of the text_ptr structure only exist
|
members of the text_ptr structure only exist when the
|
||||||
when the library is built with iTXt chunk support.
|
library is built with iTXt chunk support. Prior to
|
||||||
Prior to libpng-1.4.0 the library was built by default
|
libpng-1.4.0 the library was built by default without
|
||||||
without iTXt support.
|
iTXt support. Also note that when iTXt is supported,
|
||||||
|
they contain NULL pointers when the "compression"
|
||||||
|
field contains PNG_TEXT_COMPRESSION_NONE or
|
||||||
|
PNG_TEXT_COMPRESSION_zTXt.
|
||||||
|
|
||||||
num_text - number of comments
|
num_text - number of comments
|
||||||
|
|
||||||
@@ -4566,13 +4573,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XIV. Y2K Compliance in libpng
|
XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
November 3, 2011
|
December 15, 2011
|
||||||
|
|
||||||
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.5.6 are Y2K compliant. It is my belief that earlier
|
upward through 1.5.7 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNG 3 "November 3, 2011"
|
.TH LIBPNG 3 "December 15, 2011"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.6
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fI\fB
|
\fI\fB
|
||||||
|
|
||||||
@@ -977,7 +977,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.5.6 - November 3, 2011
|
libpng version 1.5.7 - December 15, 2011
|
||||||
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-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
@@ -988,7 +988,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.5.6 - November 3, 2011
|
libpng versions 0.97, January 1998, through 1.5.7 - December 15, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -2242,10 +2242,13 @@ pointer into the info_ptr is returned for any complex types.
|
|||||||
(empty string for unknown).
|
(empty string for unknown).
|
||||||
|
|
||||||
Note that the itxt_length, lang, and lang_key
|
Note that the itxt_length, lang, and lang_key
|
||||||
members of the text_ptr structure only exist
|
members of the text_ptr structure only exist when the
|
||||||
when the library is built with iTXt chunk support.
|
library is built with iTXt chunk support. Prior to
|
||||||
Prior to libpng-1.4.0, the default build was
|
libpng-1.4.0 the library was built by default without
|
||||||
without iTXt chunk support.
|
iTXt support. Also note that when iTXt is supported,
|
||||||
|
they contain NULL pointers when the "compression"
|
||||||
|
field contains PNG_TEXT_COMPRESSION_NONE or
|
||||||
|
PNG_TEXT_COMPRESSION_zTXt.
|
||||||
|
|
||||||
num_text - number of comments (same as
|
num_text - number of comments (same as
|
||||||
num_comments; you can put NULL here
|
num_comments; you can put NULL here
|
||||||
@@ -3826,11 +3829,15 @@ width, height, bit_depth, and color_type must be the same in each call.
|
|||||||
empty for unknown).
|
empty for unknown).
|
||||||
text_ptr[i].translated_keyword - keyword in UTF-8 (NULL
|
text_ptr[i].translated_keyword - keyword in UTF-8 (NULL
|
||||||
or empty for unknown).
|
or empty for unknown).
|
||||||
|
|
||||||
Note that the itxt_length, lang, and lang_key
|
Note that the itxt_length, lang, and lang_key
|
||||||
members of the text_ptr structure only exist
|
members of the text_ptr structure only exist when the
|
||||||
when the library is built with iTXt chunk support.
|
library is built with iTXt chunk support. Prior to
|
||||||
Prior to libpng-1.4.0 the library was built by default
|
libpng-1.4.0 the library was built by default without
|
||||||
without iTXt support.
|
iTXt support. Also note that when iTXt is supported,
|
||||||
|
they contain NULL pointers when the "compression"
|
||||||
|
field contains PNG_TEXT_COMPRESSION_NONE or
|
||||||
|
PNG_TEXT_COMPRESSION_zTXt.
|
||||||
|
|
||||||
num_text - number of comments
|
num_text - number of comments
|
||||||
|
|
||||||
@@ -5544,13 +5551,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XIV. Y2K Compliance in libpng
|
.SH XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
November 3, 2011
|
December 15, 2011
|
||||||
|
|
||||||
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.5.6 are Y2K compliant. It is my belief that earlier
|
upward through 1.5.7 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||||
@@ -5752,6 +5759,9 @@ the first widely used release:
|
|||||||
1.5.6beta01-07 15 10506 15.so.15.6[.0]
|
1.5.6beta01-07 15 10506 15.so.15.6[.0]
|
||||||
1.5.6rc01-03 15 10506 15.so.15.6[.0]
|
1.5.6rc01-03 15 10506 15.so.15.6[.0]
|
||||||
1.5.6 15 10506 15.so.15.6[.0]
|
1.5.6 15 10506 15.so.15.6[.0]
|
||||||
|
1.5.7beta01-05 15 10507 15.so.15.7[.0]
|
||||||
|
1.5.7rc01-03 15 10507 15.so.15.7[.0]
|
||||||
|
1.5.7 15 10507 15.so.15.7[.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
|
||||||
@@ -5808,7 +5818,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.5.6 - November 3, 2011:
|
Libpng version 1.5.7 - December 15, 2011:
|
||||||
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).
|
||||||
|
|
||||||
@@ -5831,7 +5841,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.5.6, November 3, 2011, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.7, December 15, 2011, 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
|
||||||
@@ -5930,7 +5940,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
November 3, 2011
|
December 15, 2011
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNGPF 3 "November 3, 2011"
|
.TH LIBPNGPF 3 "December 15, 2011"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.6
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7
|
||||||
(private functions)
|
(private functions)
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB#include \fI"pngpriv.h"
|
\fB#include \fI"pngpriv.h"
|
||||||
|
9655
src/png/ltmain.sh
Executable file
9655
src/png/ltmain.sh
Executable file
File diff suppressed because it is too large
Load Diff
376
src/png/missing
Executable file
376
src/png/missing
Executable file
@@ -0,0 +1,376 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Common stub for a few missing GNU programs while installing.
|
||||||
|
|
||||||
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||||
|
# 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
run=:
|
||||||
|
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||||
|
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||||
|
|
||||||
|
# In the cases where this matters, `missing' is being run in the
|
||||||
|
# srcdir already.
|
||||||
|
if test -f configure.ac; then
|
||||||
|
configure_ac=configure.ac
|
||||||
|
else
|
||||||
|
configure_ac=configure.in
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg="missing on your system"
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
--run)
|
||||||
|
# Try to run requested program, and just exit if it succeeds.
|
||||||
|
run=
|
||||||
|
shift
|
||||||
|
"$@" && exit 0
|
||||||
|
# Exit code 63 means version mismatch. This often happens
|
||||||
|
# when the user try to use an ancient version of a tool on
|
||||||
|
# a file that requires a minimum version. In this case we
|
||||||
|
# we should proceed has if the program had been absent, or
|
||||||
|
# if --run hadn't been passed.
|
||||||
|
if test $? = 63; then
|
||||||
|
run=:
|
||||||
|
msg="probably too old"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
-h|--h|--he|--hel|--help)
|
||||||
|
echo "\
|
||||||
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
|
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||||
|
error status if there is no known handling for PROGRAM.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help display this help and exit
|
||||||
|
-v, --version output version information and exit
|
||||||
|
--run try to run the given command, and emulate it if it fails
|
||||||
|
|
||||||
|
Supported PROGRAM values:
|
||||||
|
aclocal touch file \`aclocal.m4'
|
||||||
|
autoconf touch file \`configure'
|
||||||
|
autoheader touch file \`config.h.in'
|
||||||
|
autom4te touch the output file, or create a stub one
|
||||||
|
automake touch all \`Makefile.in' files
|
||||||
|
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
flex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
help2man touch the output file
|
||||||
|
lex create \`lex.yy.c', if possible, from existing .c
|
||||||
|
makeinfo touch the output file
|
||||||
|
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||||
|
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||||
|
|
||||||
|
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||||
|
\`g' are ignored when checking the name.
|
||||||
|
|
||||||
|
Send bug reports to <bug-automake@gnu.org>."
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||||
|
echo "missing $scriptversion (GNU Automake)"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*)
|
||||||
|
echo 1>&2 "$0: Unknown \`$1' option"
|
||||||
|
echo 1>&2 "Try \`$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# normalize program name to check for.
|
||||||
|
program=`echo "$1" | sed '
|
||||||
|
s/^gnu-//; t
|
||||||
|
s/^gnu//; t
|
||||||
|
s/^g//; t'`
|
||||||
|
|
||||||
|
# Now exit if we have it, but it failed. Also exit now if we
|
||||||
|
# don't have it and --version was passed (most likely to detect
|
||||||
|
# the program). This is about non-GNU programs, so use $1 not
|
||||||
|
# $program.
|
||||||
|
case $1 in
|
||||||
|
lex*|yacc*)
|
||||||
|
# Not GNU programs, they don't have --version.
|
||||||
|
;;
|
||||||
|
|
||||||
|
tar*)
|
||||||
|
if test -n "$run"; then
|
||||||
|
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||||
|
exit 1
|
||||||
|
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||||
|
# We have it, but it failed.
|
||||||
|
exit 1
|
||||||
|
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||||
|
# Could not run --version or --help. This is probably someone
|
||||||
|
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||||
|
# $TOOL exists and not knowing $TOOL uses missing.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If it does not exist, or fails to run (possibly an outdated version),
|
||||||
|
# try to emulate it.
|
||||||
|
case $program in
|
||||||
|
aclocal*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||||
|
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||||
|
any GNU archive site."
|
||||||
|
touch aclocal.m4
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoconf*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`${configure_ac}'. You might want to install the
|
||||||
|
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||||
|
archive site."
|
||||||
|
touch configure
|
||||||
|
;;
|
||||||
|
|
||||||
|
autoheader*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||||
|
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||||
|
from any GNU archive site."
|
||||||
|
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||||
|
test -z "$files" && files="config.h"
|
||||||
|
touch_files=
|
||||||
|
for f in $files; do
|
||||||
|
case $f in
|
||||||
|
*:*) touch_files="$touch_files "`echo "$f" |
|
||||||
|
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||||
|
*) touch_files="$touch_files $f.in";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
touch $touch_files
|
||||||
|
;;
|
||||||
|
|
||||||
|
automake*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||||
|
You might want to install the \`Automake' and \`Perl' packages.
|
||||||
|
Grab them from any GNU archive site."
|
||||||
|
find . -type f -name Makefile.am -print |
|
||||||
|
sed 's/\.am$/.in/' |
|
||||||
|
while read f; do touch "$f"; done
|
||||||
|
;;
|
||||||
|
|
||||||
|
autom4te*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is needed, but is $msg.
|
||||||
|
You might have modified some files without having the
|
||||||
|
proper tools for further handling them.
|
||||||
|
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||||
|
archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -f "$file"; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo "#! /bin/sh"
|
||||||
|
echo "# Created by GNU Automake missing as a replacement of"
|
||||||
|
echo "# $ $@"
|
||||||
|
echo "exit 0"
|
||||||
|
chmod +x $file
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
bison*|yacc*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' $msg. You should only need it if
|
||||||
|
you modified a \`.y' file. You may need the \`Bison' package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
\`Bison' from any GNU archive site."
|
||||||
|
rm -f y.tab.c y.tab.h
|
||||||
|
if test $# -ne 1; then
|
||||||
|
eval LASTARG="\${$#}"
|
||||||
|
case $LASTARG in
|
||||||
|
*.y)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" y.tab.c
|
||||||
|
fi
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" y.tab.h
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if test ! -f y.tab.h; then
|
||||||
|
echo >y.tab.h
|
||||||
|
fi
|
||||||
|
if test ! -f y.tab.c; then
|
||||||
|
echo 'main() { return 0; }' >y.tab.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
lex*|flex*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a \`.l' file. You may need the \`Flex' package
|
||||||
|
in order for those modifications to take effect. You can get
|
||||||
|
\`Flex' from any GNU archive site."
|
||||||
|
rm -f lex.yy.c
|
||||||
|
if test $# -ne 1; then
|
||||||
|
eval LASTARG="\${$#}"
|
||||||
|
case $LASTARG in
|
||||||
|
*.l)
|
||||||
|
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||||
|
if test -f "$SRCFILE"; then
|
||||||
|
cp "$SRCFILE" lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if test ! -f lex.yy.c; then
|
||||||
|
echo 'main() { return 0; }' >lex.yy.c
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
help2man*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a dependency of a manual page. You may need the
|
||||||
|
\`Help2man' package in order for those modifications to take
|
||||||
|
effect. You can get \`Help2man' from any GNU archive site."
|
||||||
|
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -f "$file"; then
|
||||||
|
touch $file
|
||||||
|
else
|
||||||
|
test -z "$file" || exec >$file
|
||||||
|
echo ".ab help2man is required to generate this page"
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
makeinfo*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is $msg. You should only need it if
|
||||||
|
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||||
|
indirectly affecting the aspect of the manual. The spurious
|
||||||
|
call might also be the consequence of using a buggy \`make' (AIX,
|
||||||
|
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||||
|
the \`GNU make' package. Grab either from any GNU archive site."
|
||||||
|
# The file to touch is that specified with -o ...
|
||||||
|
file=`echo "$*" | sed -n "$sed_output"`
|
||||||
|
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||||
|
if test -z "$file"; then
|
||||||
|
# ... or it is the one specified with @setfilename ...
|
||||||
|
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||||
|
file=`sed -n '
|
||||||
|
/^@setfilename/{
|
||||||
|
s/.* \([^ ]*\) *$/\1/
|
||||||
|
p
|
||||||
|
q
|
||||||
|
}' $infile`
|
||||||
|
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||||
|
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||||
|
fi
|
||||||
|
# If the file does not exist, the user really needs makeinfo;
|
||||||
|
# let's fail without touching anything.
|
||||||
|
test -f $file || exit 1
|
||||||
|
touch $file
|
||||||
|
;;
|
||||||
|
|
||||||
|
tar*)
|
||||||
|
shift
|
||||||
|
|
||||||
|
# We have already tried tar in the generic part.
|
||||||
|
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||||
|
# messages.
|
||||||
|
if (gnutar --version > /dev/null 2>&1); then
|
||||||
|
gnutar "$@" && exit 0
|
||||||
|
fi
|
||||||
|
if (gtar --version > /dev/null 2>&1); then
|
||||||
|
gtar "$@" && exit 0
|
||||||
|
fi
|
||||||
|
firstarg="$1"
|
||||||
|
if shift; then
|
||||||
|
case $firstarg in
|
||||||
|
*o*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/o//`
|
||||||
|
tar "$firstarg" "$@" && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case $firstarg in
|
||||||
|
*h*)
|
||||||
|
firstarg=`echo "$firstarg" | sed s/h//`
|
||||||
|
tar "$firstarg" "$@" && exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||||
|
You may want to install GNU tar or Free paxutils, or check the
|
||||||
|
command line arguments."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo 1>&2 "\
|
||||||
|
WARNING: \`$1' is needed, and is $msg.
|
||||||
|
You might have modified some files without having the
|
||||||
|
proper tools for further handling them. Check the \`README' file,
|
||||||
|
it often tells you about the needed prerequisites for installing
|
||||||
|
this package. You may also peek at any GNU archive site, in case
|
||||||
|
some other package would contain this missing \`$1' program."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
@@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "November 3, 2011"
|
.TH PNG 5 "December 15, 2011"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -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_5_6 Your_png_h_is_not_version_1_5_6;
|
typedef png_libpng_version_1_5_7 Your_png_h_is_not_version_1_5_7;
|
||||||
|
|
||||||
/* 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
|
||||||
@@ -599,9 +599,19 @@ png_convert_to_rfc1123(png_structp png_ptr, png_const_timep ptime)
|
|||||||
if (png_ptr == NULL)
|
if (png_ptr == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
|
if (ptime->year > 9999 /* RFC1123 limitation */ ||
|
||||||
|
ptime->month == 0 || ptime->month > 12 ||
|
||||||
|
ptime->day == 0 || ptime->day > 31 ||
|
||||||
|
ptime->hour > 23 || ptime->minute > 59 ||
|
||||||
|
ptime->second > 60)
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "Ignoring invalid time value");
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
char number_buf[5]; /* enough for a four digit year */
|
char number_buf[5]; /* enough for a four-digit year */
|
||||||
|
|
||||||
# define APPEND_STRING(string)\
|
# define APPEND_STRING(string)\
|
||||||
pos = png_safecat(png_ptr->time_buffer, sizeof png_ptr->time_buffer,\
|
pos = png_safecat(png_ptr->time_buffer, sizeof png_ptr->time_buffer,\
|
||||||
@@ -612,17 +622,17 @@ png_convert_to_rfc1123(png_structp png_ptr, png_const_timep ptime)
|
|||||||
if (pos < (sizeof png_ptr->time_buffer)-1)\
|
if (pos < (sizeof png_ptr->time_buffer)-1)\
|
||||||
png_ptr->time_buffer[pos++] = (ch)
|
png_ptr->time_buffer[pos++] = (ch)
|
||||||
|
|
||||||
APPEND_NUMBER(PNG_NUMBER_FORMAT_u, (unsigned)ptime->day % 32);
|
APPEND_NUMBER(PNG_NUMBER_FORMAT_u, (unsigned)ptime->day);
|
||||||
APPEND(' ');
|
APPEND(' ');
|
||||||
APPEND_STRING(short_months[(ptime->month - 1) % 12]);
|
APPEND_STRING(short_months[(ptime->month - 1)]);
|
||||||
APPEND(' ');
|
APPEND(' ');
|
||||||
APPEND_NUMBER(PNG_NUMBER_FORMAT_u, ptime->year);
|
APPEND_NUMBER(PNG_NUMBER_FORMAT_u, ptime->year);
|
||||||
APPEND(' ');
|
APPEND(' ');
|
||||||
APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->hour % 24);
|
APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->hour);
|
||||||
APPEND(':');
|
APPEND(':');
|
||||||
APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->minute % 60);
|
APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->minute);
|
||||||
APPEND(':');
|
APPEND(':');
|
||||||
APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->second % 61);
|
APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->second);
|
||||||
APPEND_STRING(" +0000"); /* This reliably terminates the buffer */
|
APPEND_STRING(" +0000"); /* This reliably terminates the buffer */
|
||||||
|
|
||||||
# undef APPEND
|
# undef APPEND
|
||||||
@@ -645,13 +655,13 @@ png_get_copyright(png_const_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.5.6 - November 3, 2011" PNG_STRING_NEWLINE \
|
"libpng version 1.5.7 - December 15, 2011" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2011 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.5.6 - November 3, 2011\
|
return "libpng version 1.5.7 - December 15, 2011\
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2011 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.";
|
||||||
@@ -2164,9 +2174,9 @@ png_64bit_product (long v1, long v2, unsigned long *hi_product,
|
|||||||
static png_uint_32
|
static png_uint_32
|
||||||
png_8bit_l2[128] =
|
png_8bit_l2[128] =
|
||||||
{
|
{
|
||||||
# if PNG_DO_BC
|
# ifdef PNG_DO_BC
|
||||||
for (i=128;i<256;++i) { .5 - l(i/255)/l(2)*65536*65536; }
|
for (i=128;i<256;++i) { .5 - l(i/255)/l(2)*65536*65536; }
|
||||||
# endif
|
# else
|
||||||
4270715492U, 4222494797U, 4174646467U, 4127164793U, 4080044201U, 4033279239U,
|
4270715492U, 4222494797U, 4174646467U, 4127164793U, 4080044201U, 4033279239U,
|
||||||
3986864580U, 3940795015U, 3895065449U, 3849670902U, 3804606499U, 3759867474U,
|
3986864580U, 3940795015U, 3895065449U, 3849670902U, 3804606499U, 3759867474U,
|
||||||
3715449162U, 3671346997U, 3627556511U, 3584073329U, 3540893168U, 3498011834U,
|
3715449162U, 3671346997U, 3627556511U, 3584073329U, 3540893168U, 3498011834U,
|
||||||
@@ -2189,6 +2199,8 @@ png_8bit_l2[128] =
|
|||||||
324227938U, 298676034U, 273229066U, 247886176U, 222646516U, 197509248U,
|
324227938U, 298676034U, 273229066U, 247886176U, 222646516U, 197509248U,
|
||||||
172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U,
|
172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U,
|
||||||
24347096U, 0U
|
24347096U, 0U
|
||||||
|
# endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* The following are the values for 16-bit tables - these work fine for the
|
/* The following are the values for 16-bit tables - these work fine for the
|
||||||
* 8-bit conversions but produce very slightly larger errors in the 16-bit
|
* 8-bit conversions but produce very slightly larger errors in the 16-bit
|
||||||
@@ -2323,7 +2335,7 @@ png_log16bit(png_uint_32 x)
|
|||||||
* integer bits (the top 4) simply determine a shift.
|
* integer bits (the top 4) simply determine a shift.
|
||||||
*
|
*
|
||||||
* The worst case is the 16-bit distinction between 65535 and 65534, this
|
* The worst case is the 16-bit distinction between 65535 and 65534, this
|
||||||
* requires perhaps spurious accuracty in the decoding of the logarithm to
|
* requires perhaps spurious accuracy in the decoding of the logarithm to
|
||||||
* distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance
|
* distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance
|
||||||
* of getting this accuracy in practice.
|
* of getting this accuracy in practice.
|
||||||
*
|
*
|
||||||
@@ -2334,17 +2346,18 @@ png_log16bit(png_uint_32 x)
|
|||||||
static png_uint_32
|
static png_uint_32
|
||||||
png_32bit_exp[16] =
|
png_32bit_exp[16] =
|
||||||
{
|
{
|
||||||
# if PNG_DO_BC
|
# ifdef PNG_DO_BC
|
||||||
for (i=0;i<16;++i) { .5 + e(-i/16*l(2))*2^32; }
|
for (i=0;i<16;++i) { .5 + e(-i/16*l(2))*2^32; }
|
||||||
# endif
|
# else
|
||||||
/* NOTE: the first entry is deliberately set to the maximum 32-bit value. */
|
/* NOTE: the first entry is deliberately set to the maximum 32-bit value. */
|
||||||
4294967295U, 4112874773U, 3938502376U, 3771522796U, 3611622603U, 3458501653U,
|
4294967295U, 4112874773U, 3938502376U, 3771522796U, 3611622603U, 3458501653U,
|
||||||
3311872529U, 3171459999U, 3037000500U, 2908241642U, 2784941738U, 2666869345U,
|
3311872529U, 3171459999U, 3037000500U, 2908241642U, 2784941738U, 2666869345U,
|
||||||
2553802834U, 2445529972U, 2341847524U, 2242560872U
|
2553802834U, 2445529972U, 2341847524U, 2242560872U
|
||||||
|
# endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Adjustment table; provided to explain the numbers in the code below. */
|
/* Adjustment table; provided to explain the numbers in the code below. */
|
||||||
#if PNG_DO_BC
|
#ifdef PNG_DO_BC
|
||||||
for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"}
|
for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"}
|
||||||
11 44937.64284865548751208448
|
11 44937.64284865548751208448
|
||||||
10 45180.98734845585101160448
|
10 45180.98734845585101160448
|
||||||
@@ -2507,7 +2520,7 @@ png_gamma_significant(png_fixed_point gamma_val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Internal function to build a single 16-bit table - the table consists of
|
/* Internal function to build a single 16-bit table - the table consists of
|
||||||
* 'num' 256 entry subtables, where 'num' is determined by 'shift' - the amount
|
* 'num' 256-entry subtables, where 'num' is determined by 'shift' - the amount
|
||||||
* to shift the input values right (or 16-number_of_signifiant_bits).
|
* to shift the input values right (or 16-number_of_signifiant_bits).
|
||||||
*
|
*
|
||||||
* The caller is responsible for ensuring that the table gets cleaned up on
|
* The caller is responsible for ensuring that the table gets cleaned up on
|
||||||
@@ -2594,9 +2607,9 @@ png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable,
|
|||||||
png_uint_16pp table = *ptable =
|
png_uint_16pp table = *ptable =
|
||||||
(png_uint_16pp)png_calloc(png_ptr, num * png_sizeof(png_uint_16p));
|
(png_uint_16pp)png_calloc(png_ptr, num * png_sizeof(png_uint_16p));
|
||||||
|
|
||||||
/* 'num' is the number of tables and also the number of low bits of low
|
/* 'num' is the number of tables and also the number of low bits of the
|
||||||
* bits of the input 16-bit value used to select a table. Each table is
|
* input 16-bit value used to select a table. Each table is itself indexed
|
||||||
* itself index by the high 8 bits of the value.
|
* by the high 8 bits of the value.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
table[i] = (png_uint_16p)png_malloc(png_ptr,
|
table[i] = (png_uint_16p)png_malloc(png_ptr,
|
||||||
@@ -2647,7 +2660,7 @@ png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable,
|
|||||||
|
|
||||||
/* Build a single 8-bit table: same as the 16-bit case but much simpler (and
|
/* Build a single 8-bit table: same as the 16-bit case but much simpler (and
|
||||||
* typically much faster). Note that libpng currently does no sBIT processing
|
* typically much faster). Note that libpng currently does no sBIT processing
|
||||||
* (apparently contrary to the spec) so a 256 entry table is always generated.
|
* (apparently contrary to the spec) so a 256-entry table is always generated.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
png_build_8bit_table(png_structp png_ptr, png_bytepp ptable,
|
png_build_8bit_table(png_structp png_ptr, png_bytepp ptable,
|
||||||
@@ -2783,7 +2796,7 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth)
|
|||||||
* Where 'iv' is the input color value and 'ov' is the output value -
|
* Where 'iv' is the input color value and 'ov' is the output value -
|
||||||
* pow(iv, gamma).
|
* pow(iv, gamma).
|
||||||
*
|
*
|
||||||
* Thus the gamma table consists of up to 256 256 entry tables. The table
|
* Thus the gamma table consists of up to 256 256-entry tables. The table
|
||||||
* is selected by the (8-gamma_shift) most significant of the low 8 bits of
|
* is selected by the (8-gamma_shift) most significant of the low 8 bits of
|
||||||
* the color value then indexed by the upper 8 bits:
|
* the color value then indexed by the upper 8 bits:
|
||||||
*
|
*
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.5.6 - November 3, 2011
|
* libpng version 1.5.7 - December 15, 2011
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.5.6 - November 3, 2011: Glenn
|
* libpng versions 0.97, January 1998, through 1.5.7 - December 15, 2011: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@@ -163,6 +163,9 @@
|
|||||||
* 1.5.6beta01-07 15 10506 15.so.15.6[.0]
|
* 1.5.6beta01-07 15 10506 15.so.15.6[.0]
|
||||||
* 1.5.6rc01-03 15 10506 15.so.15.6[.0]
|
* 1.5.6rc01-03 15 10506 15.so.15.6[.0]
|
||||||
* 1.5.6 15 10506 15.so.15.6[.0]
|
* 1.5.6 15 10506 15.so.15.6[.0]
|
||||||
|
* 1.5.7beta01-05 15 10507 15.so.15.7[.0]
|
||||||
|
* 1.5.7rc01-03 15 10507 15.so.15.7[.0]
|
||||||
|
* 1.5.7 15 10507 15.so.15.7[.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
|
||||||
@@ -194,7 +197,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.5.6, November 3, 2011, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.5.7, December 15, 2011, are
|
||||||
* Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2011 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:
|
||||||
@@ -306,13 +309,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* November 3, 2011
|
* December 15, 2011
|
||||||
*
|
*
|
||||||
* 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.5.6 are Y2K compliant. It is my belief that
|
* upward through 1.5.7 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
|
||||||
@@ -364,12 +367,15 @@
|
|||||||
* describes how to use libpng, and the file example.c summarizes it
|
* describes how to use libpng, and the file example.c summarizes it
|
||||||
* with some code on which to build. This file is useful for looking
|
* with some code on which to build. This file is useful for looking
|
||||||
* at the actual function definitions and structure components.
|
* at the actual function definitions and structure components.
|
||||||
|
*
|
||||||
|
* If you just need to read a PNG file and don't want to read the documentation
|
||||||
|
* skip to the end of this file and read the section entitled 'simplified API'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* 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.5.6"
|
#define PNG_LIBPNG_VER_STRING "1.5.7"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.5.6 - November 3, 2011\n"
|
" libpng version 1.5.7 - December 15, 2011\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 15
|
#define PNG_LIBPNG_VER_SONUM 15
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||||
@@ -377,7 +383,8 @@
|
|||||||
/* 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 5
|
#define PNG_LIBPNG_VER_MINOR 5
|
||||||
#define PNG_LIBPNG_VER_RELEASE 6
|
#define PNG_LIBPNG_VER_RELEASE 7
|
||||||
|
|
||||||
/* 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:
|
||||||
*/
|
*/
|
||||||
@@ -407,7 +414,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 10506 /* 1.5.6 */
|
#define PNG_LIBPNG_VER 10507 /* 1.5.7 */
|
||||||
|
|
||||||
/* 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.
|
||||||
@@ -529,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_5_6;
|
typedef char* png_libpng_version_1_5_7;
|
||||||
|
|
||||||
/* Three color definitions. The order of the red, green, and blue, (and the
|
/* Three color definitions. The order of the red, green, and blue, (and the
|
||||||
* exact size) is not important, although the size of the fields need to
|
* exact size) is not important, although the size of the fields need to
|
||||||
@@ -604,11 +611,20 @@ typedef png_sPLT_t FAR * FAR * png_sPLT_tpp;
|
|||||||
#ifdef PNG_TEXT_SUPPORTED
|
#ifdef PNG_TEXT_SUPPORTED
|
||||||
/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
|
/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
|
||||||
* and whether that contents is compressed or not. The "key" field
|
* and whether that contents is compressed or not. The "key" field
|
||||||
* points to a regular zero-terminated C string. The "text", "lang", and
|
* points to a regular zero-terminated C string. The "text" fields can be a
|
||||||
* "lang_key" fields can be regular C strings, empty strings, or NULL pointers.
|
* regular C string, an empty string, or a NULL pointer.
|
||||||
* However, the structure returned by png_get_text() will always contain
|
* However, the structure returned by png_get_text() will always contain
|
||||||
* regular zero-terminated C strings (possibly empty), never NULL pointers,
|
* the "text" field as a regular zero-terminated C string (possibly
|
||||||
* so they can be safely used in printf() and other string-handling functions.
|
* empty), never a NULL pointer, so it can be safely used in printf() and
|
||||||
|
* other string-handling functions. Note that the "itxt_length", "lang", and
|
||||||
|
* "lang_key" members of the structure only exist when the library is built
|
||||||
|
* with iTXt chunk support. Prior to libpng-1.4.0 the library was built by
|
||||||
|
* default without iTXt support. Also note that when iTXt *is* supported,
|
||||||
|
* the "lang" and "lang_key" fields contain NULL pointers when the
|
||||||
|
* "compression" field contains * PNG_TEXT_COMPRESSION_NONE or
|
||||||
|
* PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the
|
||||||
|
* same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag"
|
||||||
|
* which is always 0 or 1, or its "compression method" which is always 0.
|
||||||
*/
|
*/
|
||||||
typedef struct png_text_struct
|
typedef struct png_text_struct
|
||||||
{
|
{
|
||||||
@@ -1123,6 +1139,11 @@ PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structp png_ptr));
|
|||||||
|
|
||||||
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||||
/* Reduce RGB to grayscale. */
|
/* Reduce RGB to grayscale. */
|
||||||
|
#define PNG_ERROR_ACTION_NONE 1
|
||||||
|
#define PNG_ERROR_ACTION_WARN 2
|
||||||
|
#define PNG_ERROR_ACTION_ERROR 3
|
||||||
|
#define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/
|
||||||
|
|
||||||
PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structp png_ptr,
|
PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structp png_ptr,
|
||||||
int error_action, double red, double green));
|
int error_action, double red, double green));
|
||||||
PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr,
|
PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr,
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.5.6 - November 3, 2011
|
* libpng version 1.5.7 - December 15, 2011
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@@ -370,10 +370,10 @@
|
|||||||
# define PNG_USE_RESULT /* not supported */
|
# define PNG_USE_RESULT /* not supported */
|
||||||
# endif
|
# endif
|
||||||
# ifndef PNG_NORETURN
|
# ifndef PNG_NORETURN
|
||||||
# define PNG_NORETURN __declspec(noreturn)
|
# define PNG_NORETURN __declspec(noreturn)
|
||||||
# endif
|
# endif
|
||||||
# ifndef PNG_ALLOCATED
|
# ifndef PNG_ALLOCATED
|
||||||
# if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
# if (_MSC_VER >= 1400)
|
||||||
# define PNG_ALLOCATED __declspec(restrict)
|
# define PNG_ALLOCATED __declspec(restrict)
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngerror.c - stub functions for i/o and memory allocation
|
/* pngerror.c - stub functions for i/o and memory allocation
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngget.c - retrieval of values from info struct
|
/* pngget.c - retrieval of values from info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -682,15 +682,16 @@ png_get_iCCP(png_const_structp png_ptr, png_const_infop info_ptr,
|
|||||||
png_debug1(1, "in %s retrieval function", "iCCP");
|
png_debug1(1, "in %s retrieval function", "iCCP");
|
||||||
|
|
||||||
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
|
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
|
||||||
&& name != NULL && profile != NULL && proflen != NULL)
|
&& name != NULL && compression_type != NULL && profile != NULL &&
|
||||||
|
proflen != NULL)
|
||||||
{
|
{
|
||||||
*name = info_ptr->iccp_name;
|
*name = info_ptr->iccp_name;
|
||||||
*profile = info_ptr->iccp_profile;
|
*profile = info_ptr->iccp_profile;
|
||||||
/* Compression_type is a dummy so the API won't have to change
|
/* Compression_type is a dummy so the API won't have to change
|
||||||
* if we introduce multiple compression types later.
|
* if we introduce multiple compression types later.
|
||||||
*/
|
*/
|
||||||
*proflen = (int)info_ptr->iccp_proflen;
|
*proflen = info_ptr->iccp_proflen;
|
||||||
*compression_type = (int)info_ptr->iccp_compression;
|
*compression_type = info_ptr->iccp_compression;
|
||||||
return (PNG_INFO_iCCP);
|
return (PNG_INFO_iCCP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngmem.c - stub functions for memory allocation
|
/* pngmem.c - stub functions for memory allocation
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.4 [July 7, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -56,9 +56,9 @@ png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr),
|
|||||||
if (malloc_fn != NULL)
|
if (malloc_fn != NULL)
|
||||||
{
|
{
|
||||||
png_struct dummy_struct;
|
png_struct dummy_struct;
|
||||||
png_structp png_ptr = &dummy_struct;
|
memset(&dummy_struct, 0, sizeof dummy_struct);
|
||||||
png_ptr->mem_ptr=mem_ptr;
|
dummy_struct.mem_ptr=mem_ptr;
|
||||||
struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size);
|
struct_ptr = (*(malloc_fn))(&dummy_struct, (png_alloc_size_t)size);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -90,9 +90,9 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
|
|||||||
if (free_fn != NULL)
|
if (free_fn != NULL)
|
||||||
{
|
{
|
||||||
png_struct dummy_struct;
|
png_struct dummy_struct;
|
||||||
png_structp png_ptr = &dummy_struct;
|
memset(&dummy_struct, 0, sizeof dummy_struct);
|
||||||
png_ptr->mem_ptr=mem_ptr;
|
dummy_struct.mem_ptr=mem_ptr;
|
||||||
(*(free_fn))(png_ptr, struct_ptr);
|
(*(free_fn))(&dummy_struct, struct_ptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
|
|||||||
|
|
||||||
# ifdef PNG_USER_MEM_SUPPORTED
|
# ifdef PNG_USER_MEM_SUPPORTED
|
||||||
if (png_ptr->malloc_fn != NULL)
|
if (png_ptr->malloc_fn != NULL)
|
||||||
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
|
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, size));
|
||||||
|
|
||||||
else
|
else
|
||||||
ret = (png_malloc_default(png_ptr, size));
|
ret = (png_malloc_default(png_ptr, size));
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngpread.c - read a png file in push mode
|
/* pngpread.c - read a png file in push mode
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -985,7 +985,7 @@ png_push_process_row(png_structp png_ptr)
|
|||||||
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
|
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
|
||||||
{
|
{
|
||||||
if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST)
|
if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST)
|
||||||
png_read_filter_row(&row_info, png_ptr->row_buf + 1,
|
png_read_filter_row(png_ptr, &row_info, png_ptr->row_buf + 1,
|
||||||
png_ptr->prev_row + 1, png_ptr->row_buf[0]);
|
png_ptr->prev_row + 1, png_ptr->row_buf[0]);
|
||||||
else
|
else
|
||||||
png_error(png_ptr, "bad adaptive filter value");
|
png_error(png_ptr, "bad adaptive filter value");
|
||||||
|
@@ -5,7 +5,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.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -195,6 +195,23 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
|||||||
# define PNG_STATIC static
|
# define PNG_STATIC static
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* C99 restrict is used where possible, to do this 'restrict' is defined as
|
||||||
|
* empty if we can't be sure it is supported. configure builds have already
|
||||||
|
* done this work.
|
||||||
|
*/
|
||||||
|
#ifdef PNG_CONFIGURE_LIBPNG
|
||||||
|
# define PNG_RESTRICT restrict
|
||||||
|
#else
|
||||||
|
/* Modern compilers support restrict, but assume not for anything not
|
||||||
|
* recognized here:
|
||||||
|
*/
|
||||||
|
# if defined __GNUC__ || defined _MSC_VER || defined __WATCOMC__
|
||||||
|
# define PNG_RESTRICT restrict
|
||||||
|
# else
|
||||||
|
# define PNG_RESTRICT
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If warnings or errors are turned off the code is disabled or redirected here.
|
/* If warnings or errors are turned off the code is disabled or redirected here.
|
||||||
* From 1.5.4 functions have been added to allow very limited formatting of
|
* From 1.5.4 functions have been added to allow very limited formatting of
|
||||||
* error and warning messages - this code will also be disabled here.
|
* error and warning messages - this code will also be disabled here.
|
||||||
@@ -216,15 +233,28 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
|||||||
# define png_fixed_error(s1,s2) png_err(s1)
|
# define png_fixed_error(s1,s2) png_err(s1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* C allows up-casts from (void*) to any pointer and (const void*) to any
|
||||||
|
* pointer to a const object. C++ regards this as a type error and requires an
|
||||||
|
* explicit, static, cast and provides the static_cast<> rune to ensure that
|
||||||
|
* const is not cast away.
|
||||||
|
*/
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# define png_voidcast(type, value) static_cast<type>(value)
|
||||||
|
#else
|
||||||
|
# define png_voidcast(type, value) (value)
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#ifndef PNG_EXTERN
|
#ifndef PNG_EXTERN
|
||||||
/* The functions exported by PNG_EXTERN are internal functions, which
|
/* The functions exported by PNG_EXTERN are internal functions, which
|
||||||
* aren't usually used outside the library (as far as I know), so it is
|
* aren't usually used outside the library (as far as I know), so it is
|
||||||
* debatable if they should be exported at all. In the future, when it
|
* debatable if they should be exported at all. In the future, when it
|
||||||
* is possible to have run-time registry of chunk-handling functions,
|
* is possible to have run-time registry of chunk-handling functions,
|
||||||
* some of these might be made available again.
|
* some of these might be made available again.
|
||||||
# define PNG_EXTERN extern
|
*
|
||||||
|
* 1.5.7: turned the use of 'extern' back on, since it is localized to pngpriv.h
|
||||||
|
* it should be safe now (it is unclear why it was turned off.)
|
||||||
*/
|
*/
|
||||||
# define PNG_EXTERN
|
# define PNG_EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Some fixed point APIs are still required even if not exported because
|
/* Some fixed point APIs are still required even if not exported because
|
||||||
@@ -921,9 +951,24 @@ PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
|
|||||||
/* Unfilter a row: check the filter value before calling this, there is no point
|
/* Unfilter a row: check the filter value before calling this, there is no point
|
||||||
* calling it for PNG_FILTER_VALUE_NONE.
|
* calling it for PNG_FILTER_VALUE_NONE.
|
||||||
*/
|
*/
|
||||||
PNG_EXTERN void png_read_filter_row PNGARG((png_row_infop row_info,
|
PNG_EXTERN void png_read_filter_row PNGARG((png_structp pp, png_row_infop row_info,
|
||||||
png_bytep row, png_const_bytep prev_row, int filter));
|
png_bytep row, png_const_bytep prev_row, int filter));
|
||||||
|
|
||||||
|
PNG_EXTERN void png_read_filter_row_up_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_sub3_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_sub4_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_avg3_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_avg4_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_paeth3_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_paeth4_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
|
||||||
/* Choose the best filter to use and filter the row data */
|
/* Choose the best filter to use and filter the row data */
|
||||||
PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
|
PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
|
||||||
png_row_infop row_info));
|
png_row_infop row_info));
|
||||||
@@ -1574,7 +1619,6 @@ PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
|
|||||||
|
|
||||||
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
|
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
|
||||||
|
|
||||||
|
|
||||||
#include "pngdebug.h"
|
#include "pngdebug.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -80,8 +80,9 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
|
|
||||||
#ifdef PNG_SETJMP_SUPPORTED
|
#ifdef PNG_SETJMP_SUPPORTED
|
||||||
/* Applications that neglect to set up their own setjmp() and then
|
/* Applications that neglect to set up their own setjmp() and then
|
||||||
encounter a png_error() will longjmp here. Since the jmpbuf is
|
* encounter a png_error() will longjmp here. Since the jmpbuf is
|
||||||
then meaningless we abort instead of returning. */
|
* then meaningless we abort instead of returning.
|
||||||
|
*/
|
||||||
#ifdef USE_FAR_KEYWORD
|
#ifdef USE_FAR_KEYWORD
|
||||||
if (setjmp(tmp_jmpbuf))
|
if (setjmp(tmp_jmpbuf))
|
||||||
#else
|
#else
|
||||||
@@ -578,7 +579,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
|||||||
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
|
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
|
||||||
{
|
{
|
||||||
if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST)
|
if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST)
|
||||||
png_read_filter_row(&row_info, png_ptr->row_buf + 1,
|
png_read_filter_row(png_ptr, &row_info, png_ptr->row_buf + 1,
|
||||||
png_ptr->prev_row + 1, png_ptr->row_buf[0]);
|
png_ptr->prev_row + 1, png_ptr->row_buf[0]);
|
||||||
else
|
else
|
||||||
png_error(png_ptr, "bad adaptive filter value");
|
png_error(png_ptr, "bad adaptive filter value");
|
||||||
|
@@ -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.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -936,15 +936,15 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
|
|||||||
|
|
||||||
switch(error_action)
|
switch(error_action)
|
||||||
{
|
{
|
||||||
case 1:
|
case PNG_ERROR_ACTION_NONE:
|
||||||
png_ptr->transformations |= PNG_RGB_TO_GRAY;
|
png_ptr->transformations |= PNG_RGB_TO_GRAY;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case PNG_ERROR_ACTION_WARN:
|
||||||
png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN;
|
png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case PNG_ERROR_ACTION_ERROR:
|
||||||
png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR;
|
png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1465,6 +1465,28 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
}
|
}
|
||||||
#endif /* PNG_READ_BACKGROUND_SUPPORTED && PNG_READ_EXPAND_16_SUPPORTED */
|
#endif /* PNG_READ_BACKGROUND_SUPPORTED && PNG_READ_EXPAND_16_SUPPORTED */
|
||||||
|
|
||||||
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
|
||||||
|
(defined(PNG_READ_SCALE_16_TO_8_SUPPORTED) || \
|
||||||
|
defined(PNG_READ_STRIP_16_TO_8_SUPPORTED))
|
||||||
|
if ((png_ptr->transformations & (PNG_16_TO_8|PNG_SCALE_16_TO_8)) &&
|
||||||
|
(png_ptr->transformations & PNG_COMPOSE) &&
|
||||||
|
!(png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&
|
||||||
|
png_ptr->bit_depth == 16)
|
||||||
|
{
|
||||||
|
/* On the other hand, if a 16-bit file is to be reduced to 8-bits per
|
||||||
|
* component this will also happen after PNG_COMPOSE and so the background
|
||||||
|
* color must be pre-expanded here.
|
||||||
|
*
|
||||||
|
* TODO: fix this too.
|
||||||
|
*/
|
||||||
|
png_ptr->background.red = (png_uint_16)(png_ptr->background.red * 257);
|
||||||
|
png_ptr->background.green =
|
||||||
|
(png_uint_16)(png_ptr->background.green * 257);
|
||||||
|
png_ptr->background.blue = (png_uint_16)(png_ptr->background.blue * 257);
|
||||||
|
png_ptr->background.gray = (png_uint_16)(png_ptr->background.gray * 257);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* NOTE: below 'PNG_READ_ALPHA_MODE_SUPPORTED' is presumed to also enable the
|
/* NOTE: below 'PNG_READ_ALPHA_MODE_SUPPORTED' is presumed to also enable the
|
||||||
* background support (see the comments in scripts/pnglibconf.dfa), this
|
* background support (see the comments in scripts/pnglibconf.dfa), this
|
||||||
* allows pre-multiplication of the alpha channel to be implemented as
|
* allows pre-multiplication of the alpha channel to be implemented as
|
||||||
@@ -1512,6 +1534,16 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
#ifdef PNG_READ_BACKGROUND_SUPPORTED
|
#ifdef PNG_READ_BACKGROUND_SUPPORTED
|
||||||
if (png_ptr->transformations & PNG_COMPOSE)
|
if (png_ptr->transformations & PNG_COMPOSE)
|
||||||
{
|
{
|
||||||
|
/* Issue a warning about this combination: because RGB_TO_GRAY is
|
||||||
|
* optimized to do the gamma transform if present yet do_background has
|
||||||
|
* to do the same thing if both options are set a
|
||||||
|
* double-gamma-correction happens. This is true in all versions of
|
||||||
|
* libpng to date.
|
||||||
|
*/
|
||||||
|
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
|
||||||
|
png_warning(png_ptr,
|
||||||
|
"libpng does not support gamma+background+rgb_to_gray");
|
||||||
|
|
||||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
{
|
{
|
||||||
/* We don't get to here unless there is a tRNS chunk with non-opaque
|
/* We don't get to here unless there is a tRNS chunk with non-opaque
|
||||||
@@ -1726,7 +1758,13 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
else
|
else
|
||||||
/* Transformation does not include PNG_BACKGROUND */
|
/* Transformation does not include PNG_BACKGROUND */
|
||||||
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
|
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
|
||||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE
|
||||||
|
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||||
|
/* RGB_TO_GRAY needs to have non-gamma-corrected values! */
|
||||||
|
&& ((png_ptr->transformations & PNG_EXPAND) == 0 ||
|
||||||
|
(png_ptr->transformations & PNG_RGB_TO_GRAY) == 0)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
png_colorp palette = png_ptr->palette;
|
png_colorp palette = png_ptr->palette;
|
||||||
int num_palette = png_ptr->num_palette;
|
int num_palette = png_ptr->num_palette;
|
||||||
@@ -1918,7 +1956,7 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->bit_depth = 8;
|
info_ptr->bit_depth = 8;
|
||||||
# else
|
# else
|
||||||
|
|
||||||
# if PNG_READ_SCALE_16_TO_8_SUPPORTED
|
# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
|
||||||
png_ptr->transformations |= PNG_SCALE_16_TO_8;
|
png_ptr->transformations |= PNG_SCALE_16_TO_8;
|
||||||
info_ptr->bit_depth = 8;
|
info_ptr->bit_depth = 8;
|
||||||
# else
|
# else
|
||||||
@@ -2165,12 +2203,22 @@ png_do_read_transformations(png_structp png_ptr, png_row_infop row_info)
|
|||||||
|
|
||||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
if ((png_ptr->transformations & PNG_GAMMA) &&
|
if ((png_ptr->transformations & PNG_GAMMA) &&
|
||||||
|
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||||
|
/* Because RGB_TO_GRAY does the gamma transform. */
|
||||||
|
!(png_ptr->transformations & PNG_RGB_TO_GRAY) &&
|
||||||
|
#endif
|
||||||
#if (defined PNG_READ_BACKGROUND_SUPPORTED) ||\
|
#if (defined PNG_READ_BACKGROUND_SUPPORTED) ||\
|
||||||
(defined PNG_READ_ALPHA_MODE_SUPPORTED)
|
(defined PNG_READ_ALPHA_MODE_SUPPORTED)
|
||||||
|
/* Because PNG_COMPOSE does the gamma transform if there is something to
|
||||||
|
* do (if there is an alpha channel or transparency.)
|
||||||
|
*/
|
||||||
!((png_ptr->transformations & PNG_COMPOSE) &&
|
!((png_ptr->transformations & PNG_COMPOSE) &&
|
||||||
((png_ptr->num_trans != 0) ||
|
((png_ptr->num_trans != 0) ||
|
||||||
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) &&
|
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) &&
|
||||||
#endif
|
#endif
|
||||||
|
/* Because png_init_read_transformations transforms the palette, unless
|
||||||
|
* RGB_TO_GRAY will do the transform.
|
||||||
|
*/
|
||||||
(png_ptr->color_type != PNG_COLOR_TYPE_PALETTE))
|
(png_ptr->color_type != PNG_COLOR_TYPE_PALETTE))
|
||||||
png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr);
|
png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr);
|
||||||
#endif
|
#endif
|
||||||
@@ -2562,7 +2610,7 @@ png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)
|
|||||||
if (row_info->bit_depth == 16)
|
if (row_info->bit_depth == 16)
|
||||||
{
|
{
|
||||||
png_bytep sp = row; /* source */
|
png_bytep sp = row; /* source */
|
||||||
png_bytep dp = row; /* destinaton */
|
png_bytep dp = row; /* destination */
|
||||||
png_bytep ep = sp + row_info->rowbytes; /* end+1 */
|
png_bytep ep = sp + row_info->rowbytes; /* end+1 */
|
||||||
|
|
||||||
while (sp < ep)
|
while (sp < ep)
|
||||||
@@ -2623,7 +2671,7 @@ png_do_chop(png_row_infop row_info, png_bytep row)
|
|||||||
if (row_info->bit_depth == 16)
|
if (row_info->bit_depth == 16)
|
||||||
{
|
{
|
||||||
png_bytep sp = row; /* source */
|
png_bytep sp = row; /* source */
|
||||||
png_bytep dp = row; /* destinaton */
|
png_bytep dp = row; /* destination */
|
||||||
png_bytep ep = sp + row_info->rowbytes; /* end+1 */
|
png_bytep ep = sp + row_info->rowbytes; /* end+1 */
|
||||||
|
|
||||||
while (sp < ep)
|
while (sp < ep)
|
||||||
@@ -3331,7 +3379,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
if (red != green || red != blue)
|
if (red != green || red != blue)
|
||||||
rgb_error |= 1;
|
rgb_error |= 1;
|
||||||
|
|
||||||
/* From 1.5.5 in the 16 bit case do the accurate convertion even
|
/* From 1.5.5 in the 16 bit case do the accurate conversion even
|
||||||
* in the 'fast' case - this is because this is where the code
|
* in the 'fast' case - this is because this is where the code
|
||||||
* ends up when handling linear 16 bit data.
|
* ends up when handling linear 16 bit data.
|
||||||
*/
|
*/
|
||||||
|
@@ -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.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -490,7 +490,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
|||||||
{
|
{
|
||||||
PNG_WARNING_PARAMETERS(p)
|
PNG_WARNING_PARAMETERS(p)
|
||||||
png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_d, comp_type);
|
png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_d, comp_type);
|
||||||
png_formatted_warning(png_ptr, p, "Unknown zTXt compression type @1");
|
png_formatted_warning(png_ptr, p, "Unknown compression type @1");
|
||||||
|
|
||||||
/* The recovery is to simply drop the data. */
|
/* The recovery is to simply drop the data. */
|
||||||
}
|
}
|
||||||
@@ -2540,6 +2540,14 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
comp_type = *lang++;
|
comp_type = *lang++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (comp_type || (comp_flag && comp_flag != PNG_TEXT_COMPRESSION_zTXt))
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "Unknown iTXt compression type or method");
|
||||||
|
png_free(png_ptr, png_ptr->chunkdata);
|
||||||
|
png_ptr->chunkdata = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (lang_key = lang; *lang_key; lang_key++)
|
for (lang_key = lang; *lang_key; lang_key++)
|
||||||
/* Empty loop */ ;
|
/* Empty loop */ ;
|
||||||
|
|
||||||
@@ -2767,18 +2775,13 @@ png_check_chunk_name(png_structp png_ptr, png_uint_32 chunk_name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Combines the row recently read in with the existing pixels in the
|
/* Combines the row recently read in with the existing pixels in the row. This
|
||||||
* row. This routine takes care of alpha and transparency if requested.
|
* routine takes care of alpha and transparency if requested. This routine also
|
||||||
* This routine also handles the two methods of progressive display
|
* handles the two methods of progressive display of interlaced images,
|
||||||
* of interlaced images, depending on the mask value.
|
* depending on the 'display' value; if 'display' is true then the whole row
|
||||||
* The mask value describes which pixels are to be combined with
|
* (dp) is filled from the start by replicating the available pixels. If
|
||||||
* the row. The pattern always repeats every 8 pixels, so just 8
|
* 'display' is false only those pixels present in the pass are filled in.
|
||||||
* bits are needed. A one indicates the pixel is to be combined,
|
|
||||||
* a zero indicates the pixel is to be skipped. This is in addition
|
|
||||||
* to any alpha or transparency value associated with the pixel. If
|
|
||||||
* you want all pixels to be combined, pass 0xff (255) in mask.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
||||||
{
|
{
|
||||||
@@ -2850,7 +2853,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
|
|
||||||
if (pixel_depth < 8)
|
if (pixel_depth < 8)
|
||||||
{
|
{
|
||||||
/* For pixel depths up to 4-bpp the 8-pixel mask can be expanded to fit
|
/* For pixel depths up to 4 bpp the 8-pixel mask can be expanded to fit
|
||||||
* into 32 bits, then a single loop over the bytes using the four byte
|
* into 32 bits, then a single loop over the bytes using the four byte
|
||||||
* values in the 32-bit mask can be used. For the 'display' option the
|
* values in the 32-bit mask can be used. For the 'display' option the
|
||||||
* expanded mask may also not require any masking within a byte. To
|
* expanded mask may also not require any masking within a byte. To
|
||||||
@@ -2859,7 +2862,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
*
|
*
|
||||||
* The 'regular' case requires a mask for each of the first 6 passes,
|
* The 'regular' case requires a mask for each of the first 6 passes,
|
||||||
* the 'display' case does a copy for the even passes in the range
|
* the 'display' case does a copy for the even passes in the range
|
||||||
* 0..6. This has already been handled in the tst above.
|
* 0..6. This has already been handled in the test above.
|
||||||
*
|
*
|
||||||
* The masks are arranged as four bytes with the first byte to use in
|
* The masks are arranged as four bytes with the first byte to use in
|
||||||
* the lowest bits (little-endian) regardless of the order (PACKSWAP or
|
* the lowest bits (little-endian) regardless of the order (PACKSWAP or
|
||||||
@@ -2867,7 +2870,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
*
|
*
|
||||||
* NOTE: the whole of this logic depends on the caller of this function
|
* NOTE: the whole of this logic depends on the caller of this function
|
||||||
* only calling it on rows appropriate to the pass. This function only
|
* only calling it on rows appropriate to the pass. This function only
|
||||||
* understands the 'x' logic, the 'y' logic is handled by the caller.
|
* understands the 'x' logic; the 'y' logic is handled by the caller.
|
||||||
*
|
*
|
||||||
* The following defines allow generation of compile time constant bit
|
* The following defines allow generation of compile time constant bit
|
||||||
* masks for each pixel depth and each possibility of swapped or not
|
* masks for each pixel depth and each possibility of swapped or not
|
||||||
@@ -2885,7 +2888,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
* the compiler even though it isn't used. Microsoft Visual C (various
|
* the compiler even though it isn't used. Microsoft Visual C (various
|
||||||
* versions) and the Intel C compiler are known to do this. To avoid
|
* versions) and the Intel C compiler are known to do this. To avoid
|
||||||
* this the following macros are used in 1.5.6. This is a temporary
|
* this the following macros are used in 1.5.6. This is a temporary
|
||||||
* solution to avoid destablizing the code during the release process.
|
* solution to avoid destabilizing the code during the release process.
|
||||||
*/
|
*/
|
||||||
# if PNG_USE_COMPILE_TIME_MASKS
|
# if PNG_USE_COMPILE_TIME_MASKS
|
||||||
# define PNG_LSR(x,s) ((x)>>((s) & 0x1f))
|
# define PNG_LSR(x,s) ((x)>>((s) & 0x1f))
|
||||||
@@ -2930,7 +2933,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
#if PNG_USE_COMPILE_TIME_MASKS
|
#if PNG_USE_COMPILE_TIME_MASKS
|
||||||
/* Utility macros to construct all the masks for a depth/swap
|
/* Utility macros to construct all the masks for a depth/swap
|
||||||
* combination. The 's' parameter says whether the format is PNG
|
* combination. The 's' parameter says whether the format is PNG
|
||||||
* (big endian bytes) or not. Only the three odd numbered passes are
|
* (big endian bytes) or not. Only the three odd-numbered passes are
|
||||||
* required for the display/block algorithm.
|
* required for the display/block algorithm.
|
||||||
*/
|
*/
|
||||||
# define S_MASKS(d,s) { S_MASK(0,d,s), S_MASK(1,d,s), S_MASK(2,d,s),\
|
# define S_MASKS(d,s) { S_MASK(0,d,s), S_MASK(1,d,s), S_MASK(2,d,s),\
|
||||||
@@ -2943,7 +2946,8 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
/* Hence the pre-compiled masks indexed by PACKSWAP (or not), depth and
|
/* Hence the pre-compiled masks indexed by PACKSWAP (or not), depth and
|
||||||
* then pass:
|
* then pass:
|
||||||
*/
|
*/
|
||||||
static PNG_CONST png_uint_32 row_mask[2/*PACKSWAP*/][3/*depth*/][6] = {
|
static PNG_CONST png_uint_32 row_mask[2/*PACKSWAP*/][3/*depth*/][6] =
|
||||||
|
{
|
||||||
/* Little-endian byte masks for PACKSWAP */
|
/* Little-endian byte masks for PACKSWAP */
|
||||||
{ S_MASKS(1,0), S_MASKS(2,0), S_MASKS(4,0) },
|
{ S_MASKS(1,0), S_MASKS(2,0), S_MASKS(4,0) },
|
||||||
/* Normal (big-endian byte) masks - PNG format */
|
/* Normal (big-endian byte) masks - PNG format */
|
||||||
@@ -2953,7 +2957,8 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
/* display_mask has only three entries for the odd passes, so index by
|
/* display_mask has only three entries for the odd passes, so index by
|
||||||
* pass>>1.
|
* pass>>1.
|
||||||
*/
|
*/
|
||||||
static PNG_CONST png_uint_32 display_mask[2][3][3] = {
|
static PNG_CONST png_uint_32 display_mask[2][3][3] =
|
||||||
|
{
|
||||||
/* Little-endian byte masks for PACKSWAP */
|
/* Little-endian byte masks for PACKSWAP */
|
||||||
{ B_MASKS(1,0), B_MASKS(2,0), B_MASKS(4,0) },
|
{ B_MASKS(1,0), B_MASKS(2,0), B_MASKS(4,0) },
|
||||||
/* Normal (big-endian byte) masks - PNG format */
|
/* Normal (big-endian byte) masks - PNG format */
|
||||||
@@ -3129,7 +3134,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
/* Check for double byte alignment and, if possible, use a
|
/* Check for double byte alignment and, if possible, use a
|
||||||
* 16-bit copy. Don't attempt this for narrow images - ones that
|
* 16-bit copy. Don't attempt this for narrow images - ones that
|
||||||
* are less than an interlace panel wide. Don't attempt it for
|
* are less than an interlace panel wide. Don't attempt it for
|
||||||
* wide bytes-to-copy either - use the png_memcpy there.
|
* wide bytes_to_copy either - use the png_memcpy there.
|
||||||
*/
|
*/
|
||||||
if (bytes_to_copy < 16 /*else use png_memcpy*/ &&
|
if (bytes_to_copy < 16 /*else use png_memcpy*/ &&
|
||||||
png_isaligned(dp, png_uint_16) &&
|
png_isaligned(dp, png_uint_16) &&
|
||||||
@@ -3498,132 +3503,252 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
|||||||
}
|
}
|
||||||
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||||
|
|
||||||
/* 1.5.6: Changed to just take a png_row_info (not png_ptr) and to ignore bad
|
static void
|
||||||
* adaptive filter bytes.
|
png_read_filter_row_sub(png_row_infop row_info, png_bytep row,
|
||||||
*/
|
png_const_bytep prev_row)
|
||||||
void /* PRIVATE */
|
|
||||||
png_read_filter_row(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row, int filter)
|
|
||||||
{
|
{
|
||||||
switch (filter)
|
png_size_t i;
|
||||||
|
png_size_t istop = row_info->rowbytes;
|
||||||
|
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
||||||
|
png_bytep rp = row + bpp;
|
||||||
|
|
||||||
|
PNG_UNUSED(prev_row)
|
||||||
|
|
||||||
|
for (i = bpp; i < istop; i++)
|
||||||
{
|
{
|
||||||
case PNG_FILTER_VALUE_NONE:
|
*rp = (png_byte)(((int)(*rp) + (int)(*(rp-bpp))) & 0xff);
|
||||||
break;
|
rp++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case PNG_FILTER_VALUE_SUB:
|
static void
|
||||||
|
png_read_filter_row_up(png_row_infop row_info, png_bytep row,
|
||||||
|
png_const_bytep prev_row)
|
||||||
|
{
|
||||||
|
png_size_t i;
|
||||||
|
png_size_t istop = row_info->rowbytes;
|
||||||
|
png_bytep rp = row;
|
||||||
|
png_const_bytep pp = prev_row;
|
||||||
|
|
||||||
|
for (i = 0; i < istop; i++)
|
||||||
|
{
|
||||||
|
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
|
||||||
|
rp++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
png_read_filter_row_avg(png_row_infop row_info, png_bytep row,
|
||||||
|
png_const_bytep prev_row)
|
||||||
|
{
|
||||||
|
png_size_t i;
|
||||||
|
png_bytep rp = row;
|
||||||
|
png_const_bytep pp = prev_row;
|
||||||
|
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
||||||
|
png_size_t istop = row_info->rowbytes - bpp;
|
||||||
|
|
||||||
|
for (i = 0; i < bpp; i++)
|
||||||
|
{
|
||||||
|
*rp = (png_byte)(((int)(*rp) +
|
||||||
|
((int)(*pp++) / 2 )) & 0xff);
|
||||||
|
|
||||||
|
rp++;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < istop; i++)
|
||||||
|
{
|
||||||
|
*rp = (png_byte)(((int)(*rp) +
|
||||||
|
(int)(*pp++ + *(rp-bpp)) / 2 ) & 0xff);
|
||||||
|
|
||||||
|
rp++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
png_read_filter_row_paeth_1byte_pixel(png_row_infop row_info, png_bytep row,
|
||||||
|
png_const_bytep prev_row)
|
||||||
|
{
|
||||||
|
png_bytep rp_end = row + row_info->rowbytes;
|
||||||
|
int a, c;
|
||||||
|
|
||||||
|
/* First pixel/byte */
|
||||||
|
c = *prev_row++;
|
||||||
|
a = *row + c;
|
||||||
|
*row++ = (png_byte)a;
|
||||||
|
|
||||||
|
/* Remainder */
|
||||||
|
while (row < rp_end)
|
||||||
|
{
|
||||||
|
int b, pa, pb, pc, p;
|
||||||
|
|
||||||
|
a &= 0xff; /* From previous iteration or start */
|
||||||
|
b = *prev_row++;
|
||||||
|
|
||||||
|
p = b - c;
|
||||||
|
pc = a - c;
|
||||||
|
|
||||||
|
# ifdef PNG_USE_ABS
|
||||||
|
pa = abs(p);
|
||||||
|
pb = abs(pc);
|
||||||
|
pc = abs(p + pc);
|
||||||
|
# else
|
||||||
|
pa = p < 0 ? -p : p;
|
||||||
|
pb = pc < 0 ? -pc : pc;
|
||||||
|
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Find the best predictor, the least of pa, pb, pc favoring the earlier
|
||||||
|
* ones in the case of a tie.
|
||||||
|
*/
|
||||||
|
if (pb < pa) pa = pb, a = b;
|
||||||
|
if (pc < pa) a = c;
|
||||||
|
|
||||||
|
/* Calculate the current pixel in a, and move the previous row pixel to c
|
||||||
|
* for the next time round the loop
|
||||||
|
*/
|
||||||
|
c = b;
|
||||||
|
a += *row;
|
||||||
|
*row++ = (png_byte)a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
|
||||||
|
png_const_bytep prev_row)
|
||||||
|
{
|
||||||
|
int bpp = (row_info->pixel_depth + 7) >> 3;
|
||||||
|
png_bytep rp_end = row + bpp;
|
||||||
|
|
||||||
|
/* Process the first pixel in the row completely (this is the same as 'up'
|
||||||
|
* because there is only one candidate predictor for the first row).
|
||||||
|
*/
|
||||||
|
while (row < rp_end)
|
||||||
|
{
|
||||||
|
int a = *row + *prev_row++;
|
||||||
|
*row++ = (png_byte)a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remainder */
|
||||||
|
rp_end += row_info->rowbytes - bpp;
|
||||||
|
|
||||||
|
while (row < rp_end)
|
||||||
|
{
|
||||||
|
int a, b, c, pa, pb, pc, p;
|
||||||
|
|
||||||
|
c = *(prev_row - bpp);
|
||||||
|
a = *(row - bpp);
|
||||||
|
b = *prev_row++;
|
||||||
|
|
||||||
|
p = b - c;
|
||||||
|
pc = a - c;
|
||||||
|
|
||||||
|
# ifdef PNG_USE_ABS
|
||||||
|
pa = abs(p);
|
||||||
|
pb = abs(pc);
|
||||||
|
pc = abs(p + pc);
|
||||||
|
# else
|
||||||
|
pa = p < 0 ? -p : p;
|
||||||
|
pb = pc < 0 ? -pc : pc;
|
||||||
|
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
if (pb < pa) pa = pb, a = b;
|
||||||
|
if (pc < pa) a = c;
|
||||||
|
|
||||||
|
c = b;
|
||||||
|
a += *row;
|
||||||
|
*row++ = (png_byte)a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_ARM_NEON
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <elf.h>
|
||||||
|
#include <asm/hwcap.h>
|
||||||
|
|
||||||
|
static int png_have_hwcap(unsigned cap)
|
||||||
|
{
|
||||||
|
FILE *f = fopen("/proc/self/auxv", "r");
|
||||||
|
Elf32_auxv_t aux;
|
||||||
|
int have_cap = 0;
|
||||||
|
|
||||||
|
if (!f)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
while (fread(&aux, sizeof(aux), 1, f) > 0)
|
||||||
|
{
|
||||||
|
if (aux.a_type == AT_HWCAP &&
|
||||||
|
aux.a_un.a_val & cap)
|
||||||
{
|
{
|
||||||
png_size_t i;
|
have_cap = 1;
|
||||||
png_size_t istop = row_info->rowbytes;
|
|
||||||
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
|
||||||
png_bytep rp = row + bpp;
|
|
||||||
png_bytep lp = row;
|
|
||||||
|
|
||||||
for (i = bpp; i < istop; i++)
|
|
||||||
{
|
|
||||||
*rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff);
|
|
||||||
rp++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PNG_FILTER_VALUE_UP:
|
}
|
||||||
{
|
|
||||||
png_size_t i;
|
|
||||||
png_size_t istop = row_info->rowbytes;
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
|
|
||||||
for (i = 0; i < istop; i++)
|
fclose(f);
|
||||||
{
|
|
||||||
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
|
|
||||||
rp++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case PNG_FILTER_VALUE_AVG:
|
|
||||||
{
|
|
||||||
png_size_t i;
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
png_bytep lp = row;
|
|
||||||
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
|
||||||
png_size_t istop = row_info->rowbytes - bpp;
|
|
||||||
|
|
||||||
for (i = 0; i < bpp; i++)
|
return have_cap;
|
||||||
{
|
}
|
||||||
*rp = (png_byte)(((int)(*rp) +
|
#endif /* __linux__ */
|
||||||
((int)(*pp++) / 2 )) & 0xff);
|
|
||||||
|
|
||||||
rp++;
|
static void
|
||||||
}
|
png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
||||||
|
{
|
||||||
for (i = 0; i < istop; i++)
|
#ifdef __linux__
|
||||||
{
|
if (!png_have_hwcap(HWCAP_NEON))
|
||||||
*rp = (png_byte)(((int)(*rp) +
|
return;
|
||||||
(int)(*pp++ + *lp++) / 2 ) & 0xff);
|
|
||||||
|
|
||||||
rp++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case PNG_FILTER_VALUE_PAETH:
|
|
||||||
{
|
|
||||||
png_size_t i;
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
png_bytep lp = row;
|
|
||||||
png_const_bytep cp = prev_row;
|
|
||||||
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
|
||||||
png_size_t istop=row_info->rowbytes - bpp;
|
|
||||||
|
|
||||||
for (i = 0; i < bpp; i++)
|
|
||||||
{
|
|
||||||
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
|
|
||||||
rp++;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < istop; i++) /* Use leftover rp,pp */
|
|
||||||
{
|
|
||||||
int a, b, c, pa, pb, pc, p;
|
|
||||||
|
|
||||||
a = *lp++;
|
|
||||||
b = *pp++;
|
|
||||||
c = *cp++;
|
|
||||||
|
|
||||||
p = b - c;
|
|
||||||
pc = a - c;
|
|
||||||
|
|
||||||
#ifdef PNG_USE_ABS
|
|
||||||
pa = abs(p);
|
|
||||||
pb = abs(pc);
|
|
||||||
pc = abs(p + pc);
|
|
||||||
#else
|
|
||||||
pa = p < 0 ? -p : p;
|
|
||||||
pb = pc < 0 ? -pc : pc;
|
|
||||||
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_neon;
|
||||||
if (pa <= pb && pa <= pc)
|
|
||||||
p = a;
|
|
||||||
|
|
||||||
else if (pb <= pc)
|
if (bpp == 3)
|
||||||
p = b;
|
{
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_neon;
|
||||||
else
|
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_neon;
|
||||||
p = c;
|
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
|
||||||
*/
|
png_read_filter_row_paeth3_neon;
|
||||||
|
|
||||||
p = (pa <= pb && pa <= pc) ? a : (pb <= pc) ? b : c;
|
|
||||||
|
|
||||||
*rp = (png_byte)(((int)(*rp) + p) & 0xff);
|
|
||||||
rp++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
/* NOT REACHED */
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (bpp == 4)
|
||||||
|
{
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_neon;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_neon;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
|
||||||
|
png_read_filter_row_paeth4_neon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* PNG_ARM_NEON */
|
||||||
|
|
||||||
|
static void
|
||||||
|
png_init_filter_functions(png_structp pp)
|
||||||
|
{
|
||||||
|
unsigned int bpp = (pp->pixel_depth + 7) >> 3;
|
||||||
|
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg;
|
||||||
|
if (bpp == 1)
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
|
||||||
|
png_read_filter_row_paeth_1byte_pixel;
|
||||||
|
else
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
|
||||||
|
png_read_filter_row_paeth_multibyte_pixel;
|
||||||
|
|
||||||
|
#ifdef PNG_ARM_NEON
|
||||||
|
png_init_filter_functions_neon(pp, bpp);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void /* PRIVATE */
|
||||||
|
png_read_filter_row(png_structp pp, png_row_infop row_info, png_bytep row,
|
||||||
|
png_const_bytep prev_row, int filter)
|
||||||
|
{
|
||||||
|
if (pp->read_filter[0] == NULL)
|
||||||
|
png_init_filter_functions(pp);
|
||||||
|
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
||||||
|
pp->read_filter[filter-1](row_info, row, prev_row);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||||
@@ -3811,6 +3936,16 @@ png_read_start_row(png_structp png_ptr)
|
|||||||
|
|
||||||
max_pixel_depth = png_ptr->pixel_depth;
|
max_pixel_depth = png_ptr->pixel_depth;
|
||||||
|
|
||||||
|
/* WARNING: * png_read_transform_info (pngrtran.c) performs a simpliar set of
|
||||||
|
* calculations to calculate the final pixel depth, then
|
||||||
|
* png_do_read_transforms actually does the transforms. This means that the
|
||||||
|
* code which effectively calculates this value is actually repeated in three
|
||||||
|
* separate places. They must all match. Innocent changes to the order of
|
||||||
|
* transformations can and will break libpng in a way that causes memory
|
||||||
|
* overwrites.
|
||||||
|
*
|
||||||
|
* TODO: fix this.
|
||||||
|
*/
|
||||||
#ifdef PNG_READ_PACK_SUPPORTED
|
#ifdef PNG_READ_PACK_SUPPORTED
|
||||||
if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8)
|
if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8)
|
||||||
max_pixel_depth = 8;
|
max_pixel_depth = 8;
|
||||||
@@ -3869,10 +4004,7 @@ png_read_start_row(png_structp png_ptr)
|
|||||||
#ifdef PNG_READ_FILLER_SUPPORTED
|
#ifdef PNG_READ_FILLER_SUPPORTED
|
||||||
if (png_ptr->transformations & (PNG_FILLER))
|
if (png_ptr->transformations & (PNG_FILLER))
|
||||||
{
|
{
|
||||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)
|
||||||
max_pixel_depth = 32;
|
|
||||||
|
|
||||||
else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)
|
|
||||||
{
|
{
|
||||||
if (max_pixel_depth <= 8)
|
if (max_pixel_depth <= 8)
|
||||||
max_pixel_depth = 16;
|
max_pixel_depth = 16;
|
||||||
@@ -3881,7 +4013,8 @@ png_read_start_row(png_structp png_ptr)
|
|||||||
max_pixel_depth = 32;
|
max_pixel_depth = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
|
else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB ||
|
||||||
|
png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
{
|
{
|
||||||
if (max_pixel_depth <= 32)
|
if (max_pixel_depth <= 32)
|
||||||
max_pixel_depth = 32;
|
max_pixel_depth = 32;
|
||||||
|
@@ -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.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -864,6 +864,15 @@ png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_const_timep mod_time)
|
|||||||
(png_ptr->mode & PNG_WROTE_tIME))
|
(png_ptr->mode & PNG_WROTE_tIME))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (mod_time->month == 0 || mod_time->month > 12 ||
|
||||||
|
mod_time->day == 0 || mod_time->day > 31 ||
|
||||||
|
mod_time->hour > 23 || mod_time->minute > 59 ||
|
||||||
|
mod_time->second > 60)
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "Ignoring invalid time value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
png_memcpy(&(info_ptr->mod_time), mod_time, png_sizeof(png_time));
|
png_memcpy(&(info_ptr->mod_time), mod_time, png_sizeof(png_time));
|
||||||
info_ptr->valid |= PNG_INFO_tIME;
|
info_ptr->valid |= PNG_INFO_tIME;
|
||||||
}
|
}
|
||||||
|
@@ -353,5 +353,8 @@ struct png_struct_def
|
|||||||
|
|
||||||
/* New member added in libpng-1.5.6 */
|
/* New member added in libpng-1.5.6 */
|
||||||
png_bytep big_prev_row;
|
png_bytep big_prev_row;
|
||||||
|
|
||||||
|
void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row);
|
||||||
};
|
};
|
||||||
#endif /* PNGSTRUCT_H */
|
#endif /* PNGSTRUCT_H */
|
||||||
|
@@ -1163,6 +1163,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0)
|
if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0)
|
||||||
{
|
{
|
||||||
pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text);
|
pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text);
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
printf("\nText compression=%d\n", text_ptr->compression);
|
||||||
|
|
||||||
png_set_text(write_ptr, write_info_ptr, text_ptr, num_text);
|
png_set_text(write_ptr, write_info_ptr, text_ptr, num_text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1813,4 +1817,4 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 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_5_6 Your_png_h_is_not_version_1_5_6;
|
typedef png_libpng_version_1_5_7 Your_png_h_is_not_version_1_5_7;
|
||||||
|
9697
src/png/pngvalid.c
9697
src/png/pngvalid.c
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [November 3, 2011]
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 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.)
|
||||||
@@ -490,8 +490,9 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
|
|
||||||
#ifdef PNG_SETJMP_SUPPORTED
|
#ifdef PNG_SETJMP_SUPPORTED
|
||||||
/* Applications that neglect to set up their own setjmp() and then
|
/* Applications that neglect to set up their own setjmp() and then
|
||||||
encounter a png_error() will longjmp here. Since the jmpbuf is
|
* encounter a png_error() will longjmp here. Since the jmpbuf is
|
||||||
then meaningless we abort instead of returning. */
|
* then meaningless we abort instead of returning.
|
||||||
|
*/
|
||||||
#ifdef USE_FAR_KEYWORD
|
#ifdef USE_FAR_KEYWORD
|
||||||
if (setjmp(tmp_jmpbuf))
|
if (setjmp(tmp_jmpbuf))
|
||||||
#else
|
#else
|
||||||
|
@@ -5,9 +5,9 @@ VpeMain
|
|||||||
1
|
1
|
||||||
WRect
|
WRect
|
||||||
256
|
256
|
||||||
146
|
0
|
||||||
8966
|
8960
|
||||||
9303
|
9284
|
||||||
2
|
2
|
||||||
MProject
|
MProject
|
||||||
3
|
3
|
||||||
@@ -47,8 +47,8 @@ VComponent
|
|||||||
WRect
|
WRect
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
5644
|
5632
|
||||||
4183
|
4164
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
11
|
11
|
||||||
@@ -62,9 +62,9 @@ VComponent
|
|||||||
13
|
13
|
||||||
WRect
|
WRect
|
||||||
1280
|
1280
|
||||||
1560
|
1540
|
||||||
5644
|
5632
|
||||||
4183
|
4164
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
14
|
14
|
||||||
@@ -77,10 +77,10 @@ pngtest.tgt
|
|||||||
VComponent
|
VComponent
|
||||||
16
|
16
|
||||||
WRect
|
WRect
|
||||||
530
|
518
|
||||||
507
|
487
|
||||||
5644
|
5632
|
||||||
4183
|
4164
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
17
|
17
|
||||||
|
@@ -57,9 +57,9 @@ instructions consult and edit projects/openwatcom/pngconfig.dfa
|
|||||||
<<
|
<<
|
||||||
$(DELETE) dfn.c dfn1.out dfn2.out
|
$(DELETE) dfn.c dfn1.out dfn2.out
|
||||||
|
|
||||||
pnglibconf.dfn: ..\..\scripts\pnglibconf.dfa ..\..\scripts\options.awk pngconfig.dfa
|
pnglibconf.dfn: ..\..\scripts\pnglibconf.dfa ..\..\scripts\options.awk pngconfig.dfa ..\..\pngconf.h
|
||||||
$(DELETE) $@ dfn1.out dfn2.out
|
$(DELETE) $@ dfn1.out dfn2.out
|
||||||
$(AWK) -f ..\..\scripts\options.awk out=dfn1.out ..\..\scripts\pnglibconf.dfa pngconfig.dfa $(DFA_XTRA) 1>&2
|
$(AWK) -f ..\..\scripts\options.awk out=dfn1.out version=search ..\..\pngconf.h ..\..\scripts\pnglibconf.dfa pngconfig.dfa $(DFA_XTRA) 1>&2
|
||||||
$(AWK) -f ..\..\scripts\options.awk out=dfn2.out dfn1.out 1>&2
|
$(AWK) -f ..\..\scripts\options.awk out=dfn2.out dfn1.out 1>&2
|
||||||
$(COPY) dfn2.out $@
|
$(COPY) dfn2.out $@
|
||||||
$(DELETE) dfn1.out dfn2.out
|
$(DELETE) dfn1.out dfn2.out
|
||||||
|
@@ -192,8 +192,8 @@ WVList
|
|||||||
0
|
0
|
||||||
47
|
47
|
||||||
MItem
|
MItem
|
||||||
16
|
33
|
||||||
..\..\pngvalid.c
|
..\..\contrib\libtests\pngvalid.c
|
||||||
48
|
48
|
||||||
WString
|
WString
|
||||||
4
|
4
|
||||||
|
@@ -204,14 +204,13 @@
|
|||||||
</Link>
|
</Link>
|
||||||
<CustomBuildStep>
|
<CustomBuildStep>
|
||||||
<Message>Executing PNG validation program</Message>
|
<Message>Executing PNG validation program</Message>
|
||||||
<Command>$(OutDir)pngvalid.exe ..\..\..\pngvalid.png $(IntDir)pngout.png</Command>
|
|
||||||
<Command>"$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out"</Command>
|
<Command>"$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out"</Command>
|
||||||
<Outputs>$(IntDir)pngvalid.out</Outputs>
|
<Outputs>$(IntDir)pngvalid.out</Outputs>
|
||||||
<Inputs>$(OutDir)pngvalid.exe</Inputs>
|
<Inputs>$(OutDir)pngvalid.exe</Inputs>
|
||||||
</CustomBuildStep>
|
</CustomBuildStep>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\..\pngvalid.c" />
|
<ClCompile Include="..\..\..\contrib\libtests\pngvalid.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
VisualStudio instructions
|
VisualStudio instructions
|
||||||
|
|
||||||
libpng version 1.5.6 - November 3, 2011
|
libpng version 1.5.7 - December 15, 2011
|
||||||
|
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
|
|
||||||
|
@@ -2,22 +2,22 @@ Microsoft Visual Studio Solution File, Format Version 11.00
|
|||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867} = {64CE4900-97EA-2DD5-4226-F2E36FFF2867}
|
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF}
|
||||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest\pngtest.vcxproj", "{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest\pngtest.vcxproj", "{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867} = {64CE4900-97EA-2DD5-4226-F2E36FFF2867}
|
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF}
|
||||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
||||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcxproj", "{64CE4900-97EA-2DD5-4226-F2E36FFF2867}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcxproj", "{60F89955-91C6-3A36-8000-13C592FEC2DF}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngvalid", "pngvalid\pngvalid.vcxproj", "{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngvalid", "pngvalid\pngvalid.vcxproj", "{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867} = {64CE4900-97EA-2DD5-4226-F2E36FFF2867}
|
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF}
|
||||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
||||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
@@ -48,14 +48,14 @@ Global
|
|||||||
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|Win32.Build.0 = Release Library|Win32
|
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|Win32.Build.0 = Release Library|Win32
|
||||||
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.ActiveCfg = Release|Win32
|
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.Build.0 = Release|Win32
|
{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.Build.0 = Release|Win32
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867}.Debug Library|Win32.Build.0 = Debug Library|Win32
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|Win32.Build.0 = Debug Library|Win32
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867}.Debug|Win32.ActiveCfg = Debug|Win32
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867}.Debug|Win32.Build.0 = Debug|Win32
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867}.Release Library|Win32.ActiveCfg = Release Library|Win32
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|Win32.ActiveCfg = Release Library|Win32
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867}.Release Library|Win32.Build.0 = Release Library|Win32
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|Win32.Build.0 = Release Library|Win32
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867}.Release|Win32.ActiveCfg = Release|Win32
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{64CE4900-97EA-2DD5-4226-F2E36FFF2867}.Release|Win32.Build.0 = Release|Win32
|
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|Win32.Build.0 = Release|Win32
|
||||||
{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
|
{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
|
||||||
{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|Win32.Build.0 = Debug Library|Win32
|
{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|Win32.Build.0 = Debug Library|Win32
|
||||||
{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug|Win32.ActiveCfg = Debug|Win32
|
{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
@@ -72,6 +72,14 @@ Global
|
|||||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|Win32.Build.0 = Release|Win32
|
{EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|Win32.Build.0 = Release|Win32
|
||||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.ActiveCfg = Release|Win32
|
{EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.Build.0 = Release|Win32
|
{EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug Library|Win32.ActiveCfg = Debug Library|Win32
|
||||||
|
{277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug Library|Win32.Build.0 = Debug Library|Win32
|
||||||
|
{277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release Library|Win32.ActiveCfg = Release Library|Win32
|
||||||
|
{277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release Library|Win32.Build.0 = Release Library|Win32
|
||||||
|
{277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* zlib.props - location of zlib source
|
* zlib.props - location of zlib source
|
||||||
*
|
*
|
||||||
* libpng version 1.5.6 - November 3, 2011
|
* libpng version 1.5.7 - December 15, 2011
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
Makefiles for libpng version 1.5.6 - November 3, 2011
|
Makefiles for libpng version 1.5.7 - December 15, 2011
|
||||||
|
|
||||||
pnglibconf.h.prebuilt => Stores configuration settings
|
pnglibconf.h.prebuilt => Stores configuration settings
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng15.so.15.1.5.6)
|
(gcc, creates libpng15.so.15.1.5.7)
|
||||||
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 libpng15.so.15.1.5.6)
|
(gcc, creates libpng15.so.15.1.5.7)
|
||||||
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 libpng15.so.15.1.5.6)
|
creates libpng15.so.15.1.5.7)
|
||||||
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 libpng15.so.15.1.5.6)
|
creates libpng15.so.15.1.5.7)
|
||||||
makefile.so9 => Solaris 9 makefile (gcc,
|
makefile.so9 => Solaris 9 makefile (gcc,
|
||||||
creates libpng15.so.15.1.5.6)
|
creates libpng15.so.15.1.5.7)
|
||||||
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
|
||||||
|
@@ -27,12 +27,12 @@ S--E
|
|||||||
S-EXPORTS-E
|
S-EXPORTS-E
|
||||||
S-;Version 1.5.0beta58-E
|
S-;Version 1.5.0beta58-E
|
||||||
|
|
||||||
/* NOTE: @@@ is interpreted by the calling script as a signal to
|
/* NOTE: PNG_JOIN is interpreted by the calling script as a signal to
|
||||||
* join the two things on either side, so we can do symbol
|
* join the two things on either side, so we can do symbol
|
||||||
* substitution within the name, regular C ## joins the pp-tokens,
|
* substitution within the name, regular C ## joins the pp-tokens,
|
||||||
* not their final values.
|
* not their final values.
|
||||||
*/
|
*/
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC- SYMBOL_PREFIX @@@ name-PNG_DEFN_END
|
PNG_DEFN_MAGIC- SYMBOL_PREFIX PNG_JOIN name-PNG_DEFN_END
|
||||||
|
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
# Modeled after libxml-config.
|
# Modeled after libxml-config.
|
||||||
|
|
||||||
version=1.5.6
|
version=1.5.7
|
||||||
prefix=""
|
prefix=""
|
||||||
libdir=""
|
libdir=""
|
||||||
libs=""
|
libs=""
|
||||||
|
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng15
|
|||||||
|
|
||||||
Name: libpng
|
Name: libpng
|
||||||
Description: Loads and saves PNG files
|
Description: Loads and saves PNG files
|
||||||
Version: 1.5.6
|
Version: 1.5.7
|
||||||
Libs: -L${libdir} -lpng15
|
Libs: -L${libdir} -lpng15
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
VERMAJ = 1
|
VERMAJ = 1
|
||||||
VERMIN = 5
|
VERMIN = 5
|
||||||
VERMIC = 6
|
VERMIC = 7
|
||||||
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 = libpng15
|
LIBNAME = libpng15
|
||||||
PNGMAJ = 15
|
PNGMAJ = 15
|
||||||
RELEASE = 6
|
RELEASE = 7
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).so
|
LIBSO=$(LIBNAME).so
|
||||||
|
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng15
|
|||||||
|
|
||||||
LIB= png15
|
LIB= png15
|
||||||
SHLIB_MAJOR= 0
|
SHLIB_MAJOR= 0
|
||||||
SHLIB_MINOR= 1.5.6
|
SHLIB_MINOR= 1.5.7
|
||||||
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= 15
|
SHLIB_MAJOR= 15
|
||||||
SHLIB_MINOR= 1.5.6
|
SHLIB_MINOR= 1.5.7
|
||||||
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= 15
|
SHLIB_MAJOR= 15
|
||||||
SHLIB_MINOR= 1.5.6
|
SHLIB_MINOR= 1.5.7
|
||||||
|
|
||||||
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 \
|
||||||
|
@@ -50,9 +50,9 @@ all: libpng.a pngtest
|
|||||||
|
|
||||||
# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt,
|
# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt,
|
||||||
# copy this if the following doesn't work.
|
# copy this if the following doesn't work.
|
||||||
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk
|
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
||||||
$(RM_F) $@ dfn?.out
|
$(RM_F) $@ dfn?.out
|
||||||
$(AWK) -f scripts/options.awk out=dfn1.out\
|
$(AWK) -f scripts/options.awk out=dfn1.out version=search pngconf.h\
|
||||||
scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2
|
scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2
|
||||||
$(AWK) -f scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
$(AWK) -f scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
||||||
cp dfn2.out $@
|
cp dfn2.out $@
|
||||||
@@ -62,9 +62,9 @@ pnglibconf.h: pnglibconf.dfn
|
|||||||
$(RM_F) $@ dfn.c dfn?.out
|
$(RM_F) $@ dfn.c dfn?.out
|
||||||
$(ECHO) '#include "pnglibconf.dfn"' >dfn.c
|
$(ECHO) '#include "pnglibconf.dfn"' >dfn.c
|
||||||
$(CPP) $(DFNFLAGS) dfn.c >dfn1.out
|
$(CPP) $(DFNFLAGS) dfn.c >dfn1.out
|
||||||
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\
|
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
|
||||||
dfn1.out >dfn2.out
|
dfn1.out >dfn2.out
|
||||||
$(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
||||||
cp dfn3.out $@
|
cp dfn3.out $@
|
||||||
$(RM_F) dfn.c dfn?.out
|
$(RM_F) dfn.c dfn?.out
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/awk -f
|
#!/bin/awk -f
|
||||||
# scripts/options.awk - library build configuration control
|
# scripts/options.awk - library build configuration control
|
||||||
#
|
#
|
||||||
# last changed in libpng version 1.5.0 - January 6, 2011
|
# last changed in libpng version 1.5.7 - December 15, 2011
|
||||||
#
|
#
|
||||||
# Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
# Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
@@ -32,16 +32,19 @@
|
|||||||
BEGIN{
|
BEGIN{
|
||||||
out="/dev/null" # intermediate, preprocessed, file
|
out="/dev/null" # intermediate, preprocessed, file
|
||||||
pre=-1 # preprocess (first line)
|
pre=-1 # preprocess (first line)
|
||||||
|
version="libpng version unknown" # version information
|
||||||
|
version_file="" # where to find the version
|
||||||
err=0 # in-line exit sets this
|
err=0 # in-line exit sets this
|
||||||
start="PNG_DEFN_MAGIC-" # Arbitrary start
|
start="PNG_DEFN_MAGIC-" # Arbitrary start
|
||||||
end="-PNG_DEFN_END" # Arbitrary end
|
end="-PNG_DEFN_END" # Arbitrary end
|
||||||
cx= "/@@@*" # Open C comment for output file
|
ct="PNG_JOIN" # Join two tokens
|
||||||
|
cx= "/" ct "*" # Open C comment for output file
|
||||||
comment=start cx # Comment start
|
comment=start cx # Comment start
|
||||||
cend="*/" end # Comment end
|
cend="*/" end # Comment end
|
||||||
def=start "#define PNG_@@@" # Arbitrary define
|
def=start "#define PNG_" ct # Arbitrary define
|
||||||
sup="@@@_SUPPORTED" end # end supported option
|
sup=ct "_SUPPORTED" end # end supported option
|
||||||
und=comment "#undef PNG_@@@" # Unsupported option
|
und=comment "#undef PNG_" ct # Unsupported option
|
||||||
une="@@@_SUPPORTED" cend # end unsupported option
|
une=ct "_SUPPORTED" cend # end unsupported option
|
||||||
error=start "ERROR:" # error message
|
error=start "ERROR:" # error message
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
@@ -85,6 +88,28 @@ pre == -1{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# While pre-processing if version is set to "search" look for a version string
|
||||||
|
# in the following file.
|
||||||
|
pre && version == "search" && version_file == ""{
|
||||||
|
version_file = FILENAME
|
||||||
|
}
|
||||||
|
|
||||||
|
pre && version == "search" && version_file != FILENAME{
|
||||||
|
print "version string not found in", version_file
|
||||||
|
err = 1
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
pre && version == "search" && $0 ~ /^ \* libpng version/{
|
||||||
|
version = substr($0, 4)
|
||||||
|
print "version =", version >out
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
|
pre && FILENAME == version_file{
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
# variable=value
|
# variable=value
|
||||||
# Sets the given variable to the given value (the syntax is fairly
|
# Sets the given variable to the given value (the syntax is fairly
|
||||||
# free form, except for deb (you are expected to understand how to
|
# free form, except for deb (you are expected to understand how to
|
||||||
@@ -94,6 +119,11 @@ pre == -1{
|
|||||||
# rest of the actions, so the variable settings happen during
|
# rest of the actions, so the variable settings happen during
|
||||||
# preprocessing but are recorded in the END action too. This
|
# preprocessing but are recorded in the END action too. This
|
||||||
# allows them to be set on the command line too.
|
# allows them to be set on the command line too.
|
||||||
|
$0 ~ /^[ ]*version[ ]*=/{
|
||||||
|
sub(/^[ ]*version[ ]*=[ ]*/, "")
|
||||||
|
version = $0
|
||||||
|
next
|
||||||
|
}
|
||||||
$0 ~ /^[ ]*everything[ =]*off[ ]*$/{
|
$0 ~ /^[ ]*everything[ =]*off[ ]*$/{
|
||||||
everything = "off"
|
everything = "off"
|
||||||
next
|
next
|
||||||
@@ -165,6 +195,19 @@ $1 == "com"{
|
|||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# version
|
||||||
|
# Inserts a version comment
|
||||||
|
$1 == "version" && NF == 1{
|
||||||
|
if (version == "") {
|
||||||
|
print "ERROR: no version string set"
|
||||||
|
err = 1 # prevent END{} running
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
print comment, version, cend >out
|
||||||
|
next
|
||||||
|
}
|
||||||
|
|
||||||
# file output input protect
|
# file output input protect
|
||||||
# Informational: the official name of the input file (without
|
# Informational: the official name of the input file (without
|
||||||
# make generated local directories), the official name of the
|
# make generated local directories), the official name of the
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
com pnglibconf.h - library build configuration
|
com pnglibconf.h - library build configuration
|
||||||
com
|
com
|
||||||
com libpng version 1.5.3 - July 7, 2011
|
version
|
||||||
com
|
com
|
||||||
com Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
com Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
com
|
com
|
||||||
@@ -296,7 +296,7 @@ option READ enables READ_INTERLACING
|
|||||||
# processing after that has happened. You need to be sure to enable
|
# processing after that has happened. You need to be sure to enable
|
||||||
# READ_SCALE_16_TO_8 or READ_STRIP_16_TO_8 when you disable READ_16BIT for
|
# READ_SCALE_16_TO_8 or READ_STRIP_16_TO_8 when you disable READ_16BIT for
|
||||||
# this to work properly. You should disable the other option if you need to
|
# this to work properly. You should disable the other option if you need to
|
||||||
# ensure a particular convertion (otherwise the app can chose.)
|
# ensure a particular conversion (otherwise the app can chose.)
|
||||||
|
|
||||||
option READ_16BIT requires READ enables 16BIT
|
option READ_16BIT requires READ enables 16BIT
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
/* pnglibconf.h - library build configuration */
|
/* pnglibconf.h - library build configuration */
|
||||||
|
|
||||||
/* libpng version 1.5.4 - last changed on June 22, 2011 */
|
/* Libpng 1.5.7 - December 15, 2011 */
|
||||||
|
|
||||||
/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
|
/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
|
||||||
|
|
||||||
@@ -54,6 +54,8 @@
|
|||||||
#define PNG_FIXED_POINT_SUPPORTED
|
#define PNG_FIXED_POINT_SUPPORTED
|
||||||
#define PNG_FLOATING_ARITHMETIC_SUPPORTED
|
#define PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||||
#define PNG_FLOATING_POINT_SUPPORTED
|
#define PNG_FLOATING_POINT_SUPPORTED
|
||||||
|
#define PNG_FORMAT_AFIRST_SUPPORTED
|
||||||
|
#define PNG_FORMAT_BGR_SUPPORTED
|
||||||
#define PNG_gAMA_SUPPORTED
|
#define PNG_gAMA_SUPPORTED
|
||||||
#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||||
#define PNG_hIST_SUPPORTED
|
#define PNG_hIST_SUPPORTED
|
||||||
|
@@ -35,18 +35,19 @@ pnglibconf.h: pnglibconf.dfn
|
|||||||
$(ECHO) '#include "pnglibconf.dfn"' >dfn.c
|
$(ECHO) '#include "pnglibconf.dfn"' >dfn.c
|
||||||
$(CPP) $(DFNFLAGS) dfn.c >dfn1.out
|
$(CPP) $(DFNFLAGS) dfn.c >dfn1.out
|
||||||
$(ECHO) "If 'cpp -e' crashes try /lib/cpp (e.g. CPP='/lib/cpp')" >&2
|
$(ECHO) "If 'cpp -e' crashes try /lib/cpp (e.g. CPP='/lib/cpp')" >&2
|
||||||
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\
|
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
|
||||||
dfn1.out >dfn2.out
|
dfn1.out >dfn2.out
|
||||||
$(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
||||||
$(COPY) dfn3.out $@
|
$(COPY) dfn3.out $@
|
||||||
$(DELETE) dfn.c dfn1.out dfn2.out dfn3.out
|
$(DELETE) dfn.c dfn1.out dfn2.out dfn3.out
|
||||||
|
|
||||||
pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk
|
pnglibconf.dfn: $(srcdir)/scripts/pnglibconf.dfa $(srcdir)/scripts/options.awk $(srcdir)/pngconf.h
|
||||||
$(DELETE) $@ dfn1.out dfn2.out
|
$(DELETE) $@ dfn1.out dfn2.out
|
||||||
$(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2
|
$(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2
|
||||||
$(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2
|
$(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2
|
||||||
$(AWK) -f $(srcdir)/scripts/options.awk out=dfn1.out\
|
$(AWK) -f $(srcdir)/scripts/options.awk out=dfn1.out version=search\
|
||||||
$(srcdir)/scripts/pnglibconf.dfa $(DFA_XTRA) 1>&2
|
$(srcdir)/pngconf.h $(srcdir)/scripts/pnglibconf.dfa\
|
||||||
|
$(DFA_XTRA) 1>&2
|
||||||
$(AWK) -f $(srcdir)/scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
$(AWK) -f $(srcdir)/scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
||||||
$(COPY) dfn2.out $@
|
$(COPY) dfn2.out $@
|
||||||
$(DELETE) dfn1.out dfn2.out
|
$(DELETE) dfn1.out dfn2.out
|
||||||
|
@@ -10,6 +10,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC-SYMBOL_PREFIX @@@ name-PNG_DEFN_END
|
PNG_DEFN_MAGIC-SYMBOL_PREFIX PNG_JOIN name-PNG_DEFN_END
|
||||||
|
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
LIBRARY
|
LIBRARY
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
;Version 1.5.6
|
;Version 1.5.7
|
||||||
png_access_version_number @1
|
png_access_version_number @1
|
||||||
png_set_sig_bytes @2
|
png_set_sig_bytes @2
|
||||||
png_sig_cmp @3
|
png_sig_cmp @3
|
||||||
|
@@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
#define HEADER PNG_DEFN_MAGIC-PNGLIB_LIBNAME {global:-PNG_DEFN_END
|
#define HEADER PNG_DEFN_MAGIC-PNGLIB_LIBNAME {global:-PNG_DEFN_END
|
||||||
|
|
||||||
/* NOTE: @@@ is interpreted by the calling script as a signal to
|
/* NOTE: PNG_JOIN is interpreted by the calling script as a signal to
|
||||||
* join the two things on either side, so we can do symbol
|
* join the two things on either side, so we can do symbol
|
||||||
* substitution within the name, regular C ## joins the pp-tokens,
|
* substitution within the name, regular C ## joins the pp-tokens,
|
||||||
* not their final values.
|
* not their final values.
|
||||||
*/
|
*/
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC- SYMBOL_PREFIX @@@ name;-PNG_DEFN_END
|
PNG_DEFN_MAGIC- SYMBOL_PREFIX PNG_JOIN name;-PNG_DEFN_END
|
||||||
|
|
||||||
#define TRAILER PNG_DEFN_MAGIC-local: *; };-PNG_DEFN_END
|
#define TRAILER PNG_DEFN_MAGIC-local: *; };-PNG_DEFN_END
|
||||||
|
|
||||||
|
16
src/png/test-pngtest.sh
Executable file
16
src/png/test-pngtest.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Running tests. For details see pngtest-log.txt"
|
||||||
|
|
||||||
|
echo "============ pngtest pngtest.png ==============" > pngtest-log.txt
|
||||||
|
|
||||||
|
echo "Running test-pngtest.sh"
|
||||||
|
if ./pngtest --strict ${srcdir}/pngtest.png >> pngtest-log.txt 2>&1
|
||||||
|
then
|
||||||
|
echo " PASS: pngtest --strict pngtest.png"
|
||||||
|
err=0
|
||||||
|
else
|
||||||
|
echo " FAIL: pngtest --strict pngtest.png"
|
||||||
|
err=1
|
||||||
|
fi
|
||||||
|
exit $err
|
21
src/png/test-pngvalid-full.sh
Executable file
21
src/png/test-pngvalid-full.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Run a sequence of gamma tests quietly
|
||||||
|
err=0
|
||||||
|
|
||||||
|
echo >> pngtest-log.txt
|
||||||
|
echo "============ pngvalid-full.sh ==============" >> pngtest-log.txt
|
||||||
|
|
||||||
|
echo "Running test-pngvalid-full.sh"
|
||||||
|
for gamma in threshold transform sbit 16-to-8 background alpha-mode "transform --expand16" "background --expand16" "alpha-mode --expand16"
|
||||||
|
do
|
||||||
|
if ./pngvalid "$@" --gamma-$gamma >> pngtest-log.txt 2>&1
|
||||||
|
then
|
||||||
|
echo " PASS: pngvalid" "$@" "--gamma-$gamma"
|
||||||
|
else
|
||||||
|
echo " FAIL: pngvalid" "$@" "--gamma-$gamma"
|
||||||
|
err=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $err
|
30
src/png/test-pngvalid-simple.sh
Executable file
30
src/png/test-pngvalid-simple.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Run a sequence of tests quietly, without the slow
|
||||||
|
# gamma tests
|
||||||
|
err=0
|
||||||
|
|
||||||
|
echo >> pngtest-log.txt
|
||||||
|
echo "============ pngvalid-simple.sh ==============" >> pngtest-log.txt
|
||||||
|
echo "Running test-pngvalid-simple.sh"
|
||||||
|
# The options to test are:
|
||||||
|
#
|
||||||
|
# standard tests with and without progressive reading and interlace
|
||||||
|
# size images with and without progressive reading
|
||||||
|
# transform tests (standard, non-interlaced only)
|
||||||
|
#
|
||||||
|
for opts in "--standard" "--standard --progressive-read" \
|
||||||
|
"--standard --interlace" "--standard --progressive-read --interlace" \
|
||||||
|
"--size" "--size --progressive-read" \
|
||||||
|
"--transform"
|
||||||
|
do
|
||||||
|
if ./pngvalid "$@" $opts >> pngtest-log.txt 2>&1
|
||||||
|
then
|
||||||
|
echo " PASS: pngvalid" "$@" $opts
|
||||||
|
else
|
||||||
|
echo " FAIL: pngvalid" "$@" $opts
|
||||||
|
err=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $err
|
Reference in New Issue
Block a user