mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Imported from libpng-1.5.16beta06.tar
This commit is contained in:
parent
ae8174d9a3
commit
bc92887b2d
79
ANNOUNCE
79
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.5.15beta06 - February 22, 2013
|
Libpng 1.5.16beta06 - May 12, 2013
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -9,58 +9,59 @@ Files available for download:
|
|||||||
Source files with LF line endings (for Unix/Linux) and with a
|
Source files with LF line endings (for Unix/Linux) and with a
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
1.5.15beta06.tar.xz (LZMA-compressed, recommended)
|
1.5.16beta06.tar.xz (LZMA-compressed, recommended)
|
||||||
1.5.15beta06.tar.gz
|
1.5.16beta06.tar.gz
|
||||||
1.5.15beta06.tar.bz2
|
1.5.16beta06.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
|
||||||
|
|
||||||
lp1515b06.7z (LZMA-compressed, recommended)
|
lp1516b06.7z (LZMA-compressed, recommended)
|
||||||
lp1515b06.zip
|
lp1516b06.zip
|
||||||
|
|
||||||
Other information:
|
Other information:
|
||||||
|
|
||||||
1.5.15beta06-README.txt
|
1.5.16beta06-README.txt
|
||||||
1.5.15beta06-LICENSE.txt
|
1.5.16beta06-LICENSE.txt
|
||||||
|
|
||||||
Changes since the last public release (1.5.14):
|
Changes since the last public release (1.5.15):
|
||||||
|
|
||||||
Version 1.5.15beta01 [February 4, 2013]
|
Version 1.5.16beta01 [April 25, 2013]
|
||||||
Enabled renaming of the extern (but not DLL exported) ARM filter functions.
|
Corrected a misplaced closing bracket in contrib/libtests/pngvalid.c
|
||||||
Also enabled inclusion of pngpriv.h in non-C files by preventing C/C++
|
(Flavio Medeiros).
|
||||||
specific definitions if PNG_VERSION_INFO_ONLY is defined.
|
Revised stack marking in arm/filter_neon.S and configure.ac
|
||||||
Added png_get_palette_max() function.
|
Ensure that NEON filter stuff is completely disabled when switched 'off'.
|
||||||
|
Previously the ARM NEON specific files were still built if the option
|
||||||
|
was switched 'off' as opposed to being explicitly disabled.
|
||||||
|
Avoid a compiler warning about unused png_ptr in translate_gamma_flags()
|
||||||
|
|
||||||
Version 1.5.15beta02 [February 5, 2013]
|
Version 1.5.16beta02 [April 26, 2013]
|
||||||
Made a probably general fix for the preprocessing used to generate source
|
Revise pngtest.c to skip tests of unsupported features.
|
||||||
files. This change might make the check for a special C preprocessor
|
Regenerated configure files.
|
||||||
unnecessary, and it also eliminates the requirement for sed in the
|
|
||||||
configure build process.
|
|
||||||
Fix typo in Makefile.am, fix scripts/pnglibconf.mak and makefile.std
|
|
||||||
Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.13
|
|
||||||
Fix 'setting' handling in options.awk and fixed palette_max API
|
|
||||||
|
|
||||||
Version 1.5.15beta03 [February 7, 2013]
|
Version 1.5.16beta03 [April 26, 2013]
|
||||||
Remove SUN OS cc -E workround - no longer required
|
Test for 'arm*' not just 'arm' in the host_cpu configure variable.
|
||||||
Turn serial tests back on (recently turned off by autotools upgrade).
|
|
||||||
|
|
||||||
Version 1.5.15beta04 [February 15, 2013]
|
Version 1.5.16beta04 [May 1, 2013]
|
||||||
Enclosed the new png_get_palette_max in #ifdef PNG_GET_PALETTE_MAX_SUPPORTED
|
Expanded manual paragraph about writing private chunks, particularly
|
||||||
block, and revised pnglibconf.h and pnglibconf.h.prebuilt accordingly.
|
the need to call png_set_keep_unknown_chunks() when writing them.
|
||||||
|
|
||||||
Version 1.5.15beta05 [February 17, 2013]
|
Version 1.5.16beta05 [May 9, 2013]
|
||||||
Use approved/supported Android method to check for NEON, use Linux/POSIX
|
Updated contrib/pngminus/pnm2png.c (Paul Stewart):
|
||||||
1003.1 API to check /proc/self/auxv avoiding buffer allocation and other
|
Check for EOF
|
||||||
library calls.
|
Ignore "#" delimited comments in input file to pnm2png.c.
|
||||||
Fixed a race condition in the creation of the build 'scripts' directory
|
Fixed whitespace handling
|
||||||
while building with a parallel make.
|
Added a call to png_set_packing()
|
||||||
Use parentheses more consistently in "#if defined(MACRO)" tests.
|
Initialize dimension values so if sscanf fails at least we have known
|
||||||
|
invalid values.
|
||||||
|
|
||||||
Version 1.5.15beta06 [February 22, 2013]
|
Version 1.5.16beta06 [May 12, 2013]
|
||||||
Fixed PNG_ALIGN(ED)_MEMORY and add ability to turn off ARM_NEON
|
Allow contrib/pnminus/pnm2png.c to compile without WRITE_INVERT and WRITE_PACK
|
||||||
runtime checks
|
supported (writes error message that it can't read P1 or P4 PBM files).
|
||||||
Updated INSTALL.
|
Revised contrib/pngminim/*/makefile to separate CPPFLAGS and CPFLAGS, and
|
||||||
|
to generate pnglibconf.h with the right zlib header files.
|
||||||
|
Ported contrib/pngminus/pnm2png.c changes back from libpng-1.6.3beta06,
|
||||||
|
to use unsigned long, not png_uint_32 arguments to sscanf().
|
||||||
|
|
||||||
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
|
||||||
|
93
CHANGES
93
CHANGES
@ -4018,13 +4018,94 @@ Version 1.5.15beta05 [February 17, 2013]
|
|||||||
Version 1.5.15beta06 [February 22, 2013]
|
Version 1.5.15beta06 [February 22, 2013]
|
||||||
Fixed PNG_ALIGN(ED)_MEMORY and add ability to turn off ARM_NEON
|
Fixed PNG_ALIGN(ED)_MEMORY and add ability to turn off ARM_NEON
|
||||||
runtime checks
|
runtime checks
|
||||||
Updated INSTALL.
|
Updated the INSTALL document.
|
||||||
|
|
||||||
===========================================================================
|
Version 1.5.15beta07 [February 27, 2013]
|
||||||
NOTICE November 17, 2012:
|
Revised INSTALL to recommend using CPPFLAGS instead of INCLUDES.
|
||||||
The location of the git repository at SourceForge has changed.
|
Revised scripts/makefile.freebsd to respect ZLIBLIB and ZLIBINC.
|
||||||
Visit http://libpng.sf.net/ for details.
|
Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble
|
||||||
===========================================================================
|
with CRLF line endings.
|
||||||
|
|
||||||
|
Version 1.5.15beta08 [March 5, 2013]
|
||||||
|
Avoid a possible memory leak in contrib/gregbook/readpng.c
|
||||||
|
Made the _SUPPORTED macro definitions consistent. The change made in
|
||||||
|
libpng15 to #define *_SUPPORTED 1, to match the use of -D*_SUPPORTED
|
||||||
|
(which means -D*_SUPPORTED=1) and avoid compiler warnings from GCC was made
|
||||||
|
inconsistently and causes problems as a result, also some additions in
|
||||||
|
pnglibconf.h.prebuilt were inconsistent (omitting the 1). This changes 1.5
|
||||||
|
back to the scheme used both before (1.4) and after (1.6). This might cause
|
||||||
|
some build scripts to issue warnings, and might, in the extreme, cause some
|
||||||
|
applications to fail (but they would fail anyway against 1.6). It seems
|
||||||
|
safer to go for consistency, given the change in 1.6, not correctness here,
|
||||||
|
particularly as 'make check' currently warns anyway on the symbols.dfn check
|
||||||
|
because of the inconsistencies.
|
||||||
|
Corrected Android builds and corrected libpng.vers with symbol
|
||||||
|
prefixing This adds an API to set optimization options externally,
|
||||||
|
providing an alternative and general solution for the non-portable
|
||||||
|
run-time tests used by the ARM Neon code. It also makes those tests
|
||||||
|
compile and link on Android.
|
||||||
|
The order of settings vs options in pnglibconf.h is reversed to allow
|
||||||
|
settings to depend on options and options can now set (or override) the
|
||||||
|
defaults for settings.
|
||||||
|
|
||||||
|
Version 1.5.15beta09 [March 13, 2013]
|
||||||
|
Fixed CMakelists.txt to allow building a single variant of the library
|
||||||
|
(Claudio Bley):
|
||||||
|
Introduced a PNG_LIB_TARGETS variable that lists all activated library
|
||||||
|
targets. It is an error if this variable ends up empty, ie. you have
|
||||||
|
to build at least one library variant.
|
||||||
|
Made the *_COPY targets only depend on library targets actually being build.
|
||||||
|
Use PNG_LIB_TARGETS to unify a code path.
|
||||||
|
Changed the CREATE_SYMLINK macro to expect the full path to a file as the
|
||||||
|
first argument. When symlinking the filename component of that path is
|
||||||
|
determined and used as the link target.
|
||||||
|
Use copy_if_different in the CREATE_SYMLINK macro.
|
||||||
|
Eliminated two warnings from the Intel C compiler. The warnings are
|
||||||
|
technically valid, although a reasonable treatment of division would
|
||||||
|
show it to be incorrect.
|
||||||
|
|
||||||
|
Version 1.5.15rc01 [March 21, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.15 [March 28, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.16beta01 [April 25, 2013]
|
||||||
|
Corrected a misplaced closing bracket in contrib/libtests/pngvalid.c
|
||||||
|
(Flavio Medeiros).
|
||||||
|
Revised stack marking in arm/filter_neon.S and configure.ac.
|
||||||
|
Ensure that NEON filter stuff is completely disabled when switched 'off'.
|
||||||
|
Previously the ARM NEON specific files were still built if the option
|
||||||
|
was switched 'off' as opposed to being explicitly disabled.
|
||||||
|
Avoid a compiler warning about unused png_ptr in translate_gamma_flags()
|
||||||
|
|
||||||
|
Version 1.5.16beta02 [April 26, 2013]
|
||||||
|
Revise pngtest.c to skip tests of unsupported features.
|
||||||
|
Regenerated configure files.
|
||||||
|
|
||||||
|
Version 1.5.16beta03 [April 26, 2013]
|
||||||
|
Test for 'arm*' not just 'arm' in the host_cpu configure variable.
|
||||||
|
|
||||||
|
Version 1.5.16beta04 [May 1, 2013]
|
||||||
|
Expanded manual paragraph about writing private chunks, particularly
|
||||||
|
the need to call png_set_keep_unknown_chunks() when writing them.
|
||||||
|
|
||||||
|
Version 1.5.16beta05 [May 9, 2013]
|
||||||
|
Updated contrib/pngminus/pnm2png.c (Paul Stewart):
|
||||||
|
Check for EOF
|
||||||
|
Ignore "#" delimited comments in input file to pnm2png.c.
|
||||||
|
Fixed whitespace handling
|
||||||
|
Added a call to png_set_packing()
|
||||||
|
Initialize dimension values so if sscanf fails at least we have known
|
||||||
|
invalid values.
|
||||||
|
|
||||||
|
Version 1.5.16beta06 [May 12, 2013]
|
||||||
|
Allow contrib/pnminus/pnm2png.c to compile without WRITE_INVERT and WRITE_PACK
|
||||||
|
supported (writes error message that it can't read P1 or P4 PBM files).
|
||||||
|
Revised contrib/pngminim/*/makefile to separate CPPFLAGS and CPFLAGS, and
|
||||||
|
to generate pnglibconf.h with the right zlib header files.
|
||||||
|
Ported contrib/pngminus/pnm2png.c changes back from libpng-1.6.3beta06,
|
||||||
|
to use unsigned long, not png_uint_32 arguments to sscanf().
|
||||||
|
|
||||||
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
|
||||||
|
@ -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 15)
|
set(PNGLIB_RELEASE 16)
|
||||||
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})
|
||||||
|
|
||||||
@ -138,8 +138,11 @@ endif()
|
|||||||
# NOW BUILD OUR TARGET
|
# NOW BUILD OUR TARGET
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
|
unset(PNG_LIB_TARGETS)
|
||||||
|
|
||||||
if(PNG_SHARED)
|
if(PNG_SHARED)
|
||||||
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
|
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
|
||||||
|
set(PNG_LIB_TARGETS ${PNG_LIB_NAME})
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# msvc does not append 'lib' - do it here to have consistent name
|
# msvc does not append 'lib' - do it here to have consistent name
|
||||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
|
set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
|
||||||
@ -152,6 +155,7 @@ if(PNG_STATIC)
|
|||||||
# does not work without changing name
|
# does not work without changing name
|
||||||
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
|
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
|
||||||
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
|
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
|
||||||
|
list(APPEND PNG_LIB_TARGETS ${PNG_LIB_NAME_STATIC})
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# msvc does not append 'lib' - do it here to have consistent name
|
# msvc does not append 'lib' - do it here to have consistent name
|
||||||
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
|
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
|
||||||
@ -159,6 +163,12 @@ if(PNG_STATIC)
|
|||||||
target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY})
|
target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT PNG_LIB_TARGETS)
|
||||||
|
message(SEND_ERROR
|
||||||
|
"No library variant selected to build. "
|
||||||
|
"Please enable at least one of the following options: PNG_STATIC, PNG_SHARED")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(PNG_SHARED AND WIN32)
|
if(PNG_SHARED AND WIN32)
|
||||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
|
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
|
||||||
endif()
|
endif()
|
||||||
@ -187,14 +197,15 @@ macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
|
|||||||
if(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
if(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||||
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_if_different "${SRC_FILE}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
|
||||||
DEPENDS ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC}
|
DEPENDS ${PNG_LIB_TARGETS}
|
||||||
)
|
)
|
||||||
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 AND NOT MSYS)
|
else(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
get_filename_component(LINK_TARGET "${SRC_FILE}" NAME)
|
||||||
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 "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@ -225,7 +236,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
|
|||||||
# SET UP LINKS
|
# SET UP LINKS
|
||||||
if(PNG_SHARED)
|
if(PNG_SHARED)
|
||||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||||
# VERSION 15.${PNGLIB_RELEASE}.1.5.15beta06
|
# VERSION 15.${PNGLIB_RELEASE}.1.5.16beta06
|
||||||
VERSION 15.${PNGLIB_RELEASE}.0
|
VERSION 15.${PNGLIB_RELEASE}.0
|
||||||
SOVERSION 15
|
SOVERSION 15
|
||||||
CLEAN_DIRECT_OUTPUT 1)
|
CLEAN_DIRECT_OUTPUT 1)
|
||||||
@ -252,40 +263,33 @@ endif()
|
|||||||
|
|
||||||
# INSTALL
|
# INSTALL
|
||||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
||||||
if(PNG_SHARED)
|
install(TARGETS ${PNG_LIB_TARGETS}
|
||||||
install(TARGETS ${PNG_LIB_NAME}
|
${PNG_EXPORT_RULE}
|
||||||
${PNG_EXPORT_RULE}
|
RUNTIME DESTINATION bin
|
||||||
RUNTIME DESTINATION bin
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
|
|
||||||
|
if(PNG_SHARED)
|
||||||
# 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 OR MINGW)
|
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)
|
CREATE_SYMLINK(${BUILD_TARGET_LOCATION} 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 OR MINGW)
|
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})
|
||||||
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
|
CREATE_SYMLINK(${BUILD_TARGET_LOCATION} libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||||
CREATE_SYMLINK(${BUILD_TARGET_FILE} libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
endif(PNG_SHARED)
|
endif(PNG_SHARED)
|
||||||
|
|
||||||
if(PNG_STATIC)
|
if(PNG_STATIC)
|
||||||
install(TARGETS ${PNG_LIB_NAME_STATIC}
|
|
||||||
${PNG_EXPORT_RULE}
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
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)
|
CREATE_SYMLINK(${BUILD_TARGET_LOCATION} 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 OR MINGW)
|
endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||||
|
11
INSTALL
11
INSTALL
@ -46,15 +46,14 @@ to have access to the zlib.h and zconf.h include files that
|
|||||||
correspond to the version of zlib that's installed.
|
correspond to the version of zlib that's installed.
|
||||||
|
|
||||||
If you wish to test with a particular zlib that is not first in the
|
If you wish to test with a particular zlib that is not first in the
|
||||||
standard library search path, put ZLIBLIB, ZLIBINC, INCLUDES, LDFLAGS,
|
standard library search path, put ZLIBLIB, ZLIBINC, CPPFLAGS, LDFLAGS,
|
||||||
LIBS, and LD_LIBRARY_PATH in your environment before running "make test"
|
and LD_LIBRARY_PATH in your environment before running "make test"
|
||||||
or "make distcheck":
|
or "make distcheck":
|
||||||
|
|
||||||
ZLIBLIB=/path/to/lib export ZLIBLIB
|
ZLIBLIB=/path/to/lib export ZLIBLIB
|
||||||
ZLIBINC=/path/to/include export ZLIBINC
|
ZLIBINC=/path/to/include export ZLIBINC
|
||||||
INCLUDES="-I$ZLIBINC" export INCLUDES
|
CPPFLAGS="-I$ZLIBINC" export CPPFLAGS
|
||||||
LDFLAGS="-L$ZLIBLIB" export LDFLAGS
|
LDFLAGS="-L$ZLIBLIB" export LDFLAGS
|
||||||
LIBS=$ZLIBLIB/libz.a export LIBS
|
|
||||||
LD_LIBRARY_PATH="$ZLIBLIB:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH
|
LD_LIBRARY_PATH="$ZLIBLIB:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH
|
||||||
|
|
||||||
If you are using one of the makefile scripts, put ZLIBLIB and ZLIBINC
|
If you are using one of the makefile scripts, put ZLIBLIB and ZLIBINC
|
||||||
@ -67,8 +66,8 @@ If you want to use "cmake" (see www.cmake.org), type
|
|||||||
make install
|
make install
|
||||||
|
|
||||||
You can rename the directories that you downloaded (they
|
You can rename the directories that you downloaded (they
|
||||||
might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.5"
|
might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.7"
|
||||||
or "zlib125") so that you have directories called "zlib" and "libpng".
|
or "zlib127") so that you have directories called "zlib" and "libpng".
|
||||||
|
|
||||||
Your directory structure should look like this:
|
Your directory structure should look like this:
|
||||||
|
|
||||||
|
4
LICENSE
4
LICENSE
@ -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.15beta06, February 22, 2013, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.16beta06, May 12, 2013, are
|
||||||
Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004, 2006-2012 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
|
||||||
February 22, 2013
|
May 12, 2013
|
||||||
|
@ -174,7 +174,7 @@ scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
|||||||
rm -f $@ dfn?.out
|
rm -f $@ dfn?.out
|
||||||
test -z "$(CPPFLAGS)"
|
test -z "$(CPPFLAGS)"
|
||||||
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
||||||
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out logunsupported=1
|
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out logunsupported=1\
|
||||||
version=search ${srcdir}/pngconf.h -\
|
version=search ${srcdir}/pngconf.h -\
|
||||||
${srcdir}/scripts/pnglibconf.dfa 1>&2
|
${srcdir}/scripts/pnglibconf.dfa 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
|
||||||
|
@ -288,7 +288,6 @@ distcleancheck_listfiles = find . -type f -print
|
|||||||
pkgincludedir = $(includedir)/$(PNGLIB_BASENAME)
|
pkgincludedir = $(includedir)/$(PNGLIB_BASENAME)
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AM_CCASFLAGS = @AM_CCASFLAGS@
|
|
||||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
AS = @AS@
|
AS = @AS@
|
||||||
@ -1526,7 +1525,7 @@ scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
|||||||
rm -f $@ dfn?.out
|
rm -f $@ dfn?.out
|
||||||
test -z "$(CPPFLAGS)"
|
test -z "$(CPPFLAGS)"
|
||||||
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
||||||
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out logunsupported=1
|
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out logunsupported=1\
|
||||||
version=search ${srcdir}/pngconf.h -\
|
version=search ${srcdir}/pngconf.h -\
|
||||||
${srcdir}/scripts/pnglibconf.dfa 1>&2
|
${srcdir}/scripts/pnglibconf.dfa 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
|
||||||
|
2
README
2
README
@ -1,4 +1,4 @@
|
|||||||
README for libpng version 1.5.15beta06 - February 22, 2013 (shared library 15.0)
|
README for libpng version 1.5.16beta06 - May 12, 2013 (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.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
* Last changed in libpng 1.5.15 [%RDATE%]
|
* Last changed in libpng 1.5.16 [(PENDING RELEASE)]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@ -16,16 +16,7 @@
|
|||||||
|
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
#if defined(PNG_FILTER_OPTIMIZATIONS) && defined(__arm__) && \
|
#ifdef PNG_ARM_NEON_SUPPORTED
|
||||||
defined(__ARM_NEON__)
|
|
||||||
/* __arm__ is defined by GCC, MSVC defines _M_ARM to the ARM version number,
|
|
||||||
* Andoid intends to define __ANDROID__, however there are bugs in their
|
|
||||||
* toolchain; use -D__ANDROID__ to work round this.
|
|
||||||
*
|
|
||||||
* __ARM_NEON__ is used to ensure that the compiler has the appropriate ARM
|
|
||||||
* NEON support
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
|
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
|
||||||
#include <signal.h> /* for sig_atomic_t */
|
#include <signal.h> /* for sig_atomic_t */
|
||||||
|
|
||||||
@ -45,7 +36,8 @@ png_have_neon(png_structp png_ptr)
|
|||||||
* implemented as below, therefore it is better to cache the result (these
|
* implemented as below, therefore it is better to cache the result (these
|
||||||
* function calls may be slow!)
|
* function calls may be slow!)
|
||||||
*/
|
*/
|
||||||
return andoid_getCpuFamily() == ANDROID_CPU_FAMILY_ARM &&
|
PNG_UNUSED(png_ptr)
|
||||||
|
return android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM &&
|
||||||
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
|
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
|
||||||
}
|
}
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
@ -161,15 +153,39 @@ png_have_neon(png_structp png_ptr)
|
|||||||
void
|
void
|
||||||
png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
||||||
{
|
{
|
||||||
|
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
||||||
|
switch ((pp->options >> PNG_ARM_NEON) & 3)
|
||||||
|
{
|
||||||
|
case PNG_OPTION_UNSET:
|
||||||
|
/* Allow the run-time check to execute if it has been enabled -
|
||||||
|
* thus both API and CHECK can be turned on. If it isn't supported
|
||||||
|
* this case will fall through to the 'default' below, which just
|
||||||
|
* returns.
|
||||||
|
*/
|
||||||
|
#endif /* PNG_ARM_NEON_API_SUPPORTED */
|
||||||
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED
|
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED
|
||||||
static volatile sig_atomic_t no_neon = -1; /* not checked */
|
{
|
||||||
|
static volatile sig_atomic_t no_neon = -1; /* not checked */
|
||||||
|
|
||||||
if (no_neon < 0)
|
if (no_neon < 0)
|
||||||
no_neon = !png_have_neon(pp);
|
no_neon = !png_have_neon(pp);
|
||||||
|
|
||||||
if (no_neon)
|
if (no_neon)
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
||||||
|
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
||||||
|
case PNG_OPTION_ON:
|
||||||
|
/* Option turned on */
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: /* OFF or INVALID */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* IMPORTANT: any new external functions used here must be declared using
|
/* IMPORTANT: any new external functions used here must be declared using
|
||||||
* PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the
|
* PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the
|
||||||
@ -200,4 +216,4 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
|||||||
png_read_filter_row_paeth4_neon;
|
png_read_filter_row_paeth4_neon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* FILTER_OPTIMIZATIONS && __arm__ && __ARM_NEON__ */
|
#endif /* PNG_ARM_NEON_SUPPORTED */
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/* filter_neon.S - NEON optimised filter functions
|
/* filter_neon.S - NEON optimised filter functions
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 Glenn Randers-Pehrson
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
* Last changed in libpng 1.5.7 [December 15, 2011]
|
* Last changed in libpng 1.5.16 [(PENDING RELEASE)]
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -11,17 +11,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* This is required to get the symbol renames, which are #defines, and also
|
/* This is required to get the symbol renames, which are #defines, and also
|
||||||
* includes the value of PNG_FILTER_OPTIMIZATIONS.
|
* includes the definition (or not) of PNG_ARM_NEON_SUPPORTED.
|
||||||
*/
|
*/
|
||||||
#define PNG_VERSION_INFO_ONLY
|
#define PNG_VERSION_INFO_ONLY
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
#if defined(PNG_FILTER_OPTIMIZATIONS) && defined(__arm__) && \
|
|
||||||
defined(__ARM_NEON__)
|
|
||||||
#if defined(__linux__) && defined(__ELF__)
|
#if defined(__linux__) && defined(__ELF__)
|
||||||
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_ARM_NEON_SUPPORTED
|
||||||
|
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
# define ELF
|
# define ELF
|
||||||
#else
|
#else
|
||||||
@ -232,4 +232,4 @@ func png_read_filter_row_paeth3_neon, export=1
|
|||||||
|
|
||||||
pop {r4,pc}
|
pop {r4,pc}
|
||||||
endfunc
|
endfunc
|
||||||
#endif /* FILTER_OPTIMIZATIONS && __arm__ && __ARM_NEON__ */
|
#endif /* PNG_ARM_NEON_SUPPORTED */
|
||||||
|
15
config.h.in
15
config.h.in
@ -73,14 +73,17 @@
|
|||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#undef PACKAGE_VERSION
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
/* Align row buffers */
|
/* Turn on ARM Neon optimizations at run-time */
|
||||||
#undef PNG_ALIGNED_MEMORY_SUPPORTED
|
#undef PNG_ARM_NEON_API_SUPPORTED
|
||||||
|
|
||||||
/* ARM NEON filter initialization function */
|
/* Check for ARM Neon support at run-time */
|
||||||
#undef PNG_FILTER_OPTIMIZATIONS
|
#undef PNG_ARM_NEON_CHECK_SUPPORTED
|
||||||
|
|
||||||
/* Turn off run-time checking for ARM NEON support */
|
/* Enable ARM Neon optimizations */
|
||||||
#undef PNG_NO_ARM_NEON_CHECK
|
#undef PNG_ARM_NEON_SUPPORTED
|
||||||
|
|
||||||
|
/* Disable ARM Neon optimizations */
|
||||||
|
#undef PNG_NO_ARM_NEON
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
84
configure
vendored
84
configure
vendored
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for libpng 1.5.15beta06.
|
# Generated by GNU Autoconf 2.69 for libpng 1.5.16beta06.
|
||||||
#
|
#
|
||||||
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
|
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
|
||||||
#
|
#
|
||||||
@ -590,8 +590,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='libpng'
|
PACKAGE_NAME='libpng'
|
||||||
PACKAGE_TARNAME='libpng'
|
PACKAGE_TARNAME='libpng'
|
||||||
PACKAGE_VERSION='1.5.15beta06'
|
PACKAGE_VERSION='1.5.16beta06'
|
||||||
PACKAGE_STRING='libpng 1.5.15beta06'
|
PACKAGE_STRING='libpng 1.5.16beta06'
|
||||||
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
|
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
@ -637,7 +637,6 @@ am__EXEEXT_TRUE
|
|||||||
LTLIBOBJS
|
LTLIBOBJS
|
||||||
PNG_ARM_NEON_FALSE
|
PNG_ARM_NEON_FALSE
|
||||||
PNG_ARM_NEON_TRUE
|
PNG_ARM_NEON_TRUE
|
||||||
AM_CCASFLAGS
|
|
||||||
binconfigs
|
binconfigs
|
||||||
pkgconfigdir
|
pkgconfigdir
|
||||||
PNGLIB_RELEASE
|
PNGLIB_RELEASE
|
||||||
@ -1343,7 +1342,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures libpng 1.5.15beta06 to adapt to many kinds of systems.
|
\`configure' configures libpng 1.5.16beta06 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@ -1413,7 +1412,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of libpng 1.5.15beta06:";;
|
short | recursive ) echo "Configuration of libpng 1.5.16beta06:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@ -1435,8 +1434,12 @@ Optional Features:
|
|||||||
--enable-fast-install[=PKGS]
|
--enable-fast-install[=PKGS]
|
||||||
optimize for fast installation [default=yes]
|
optimize for fast installation [default=yes]
|
||||||
--disable-libtool-lock avoid locking (might break parallel builds)
|
--disable-libtool-lock avoid locking (might break parallel builds)
|
||||||
--enable-arm-neon Enable ARM NEON optimizations: use 'always' to turn
|
--enable-arm-neon Enable ARM NEON optimizations: =no/off, check, api,
|
||||||
off run-time checks
|
yes/on: no/off: disable the optimizations; check:
|
||||||
|
use internal checking code (deprecated and poorly
|
||||||
|
supported); api: disable by default, enable by a
|
||||||
|
call to png_set_option; yes/on: turn on
|
||||||
|
unconditionally.
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
@ -1530,7 +1533,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
libpng configure 1.5.15beta06
|
libpng configure 1.5.16beta06
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
@ -1953,7 +1956,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by libpng $as_me 1.5.15beta06, which was
|
It was created by libpng $as_me 1.5.16beta06, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@ -2816,7 +2819,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='libpng'
|
PACKAGE='libpng'
|
||||||
VERSION='1.5.15beta06'
|
VERSION='1.5.16beta06'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@ -2886,10 +2889,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
PNGLIB_VERSION=1.5.15beta06
|
PNGLIB_VERSION=1.5.16beta06
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=5
|
PNGLIB_MINOR=5
|
||||||
PNGLIB_RELEASE=15
|
PNGLIB_RELEASE=16
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -12804,30 +12807,51 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Because GCC by default assembles code with an executable stack, even though it
|
# HOST SPECIFIC OPTIONS
|
||||||
# compiles C code with a non-executable stack, it is necessary to do a fixup
|
# =====================
|
||||||
# here (this may by GCC specific)
|
#
|
||||||
AM_CCASFLAGS=-Wa,--noexecstack
|
# ARM
|
||||||
|
# ===
|
||||||
|
#
|
||||||
|
# ARM NEON (SIMD) support.
|
||||||
|
|
||||||
# Check whether --enable-arm-neon was given.
|
# Check whether --enable-arm-neon was given.
|
||||||
if test "${enable_arm_neon+set}" = set; then :
|
if test "${enable_arm_neon+set}" = set; then :
|
||||||
enableval=$enable_arm_neon; if test "${enableval}" = "yes" -o "${enableval}" = "always"; then
|
enableval=$enable_arm_neon; case "$enableval" in
|
||||||
|
no|off)
|
||||||
|
# disable the default enabling on __ARM_NEON__ systems:
|
||||||
|
|
||||||
$as_echo "#define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_neon" >>confdefs.h
|
$as_echo "#define PNG_NO_ARM_NEON /**/" >>confdefs.h
|
||||||
|
|
||||||
|
# Prevent inclusion of the assembler files below:
|
||||||
|
enable_arm_neon=no;;
|
||||||
|
check)
|
||||||
|
|
||||||
$as_echo "#define PNG_ALIGNED_MEMORY_SUPPORTED 1" >>confdefs.h
|
$as_echo "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h
|
||||||
|
;;
|
||||||
|
api)
|
||||||
|
|
||||||
if test "${enableval}" = "always"; then
|
$as_echo "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h
|
||||||
|
;;
|
||||||
|
yes|on)
|
||||||
|
|
||||||
$as_echo "#define PNG_NO_ARM_NEON_CHECK /**/" >>confdefs.h
|
$as_echo "#define PNG_ARM_NEON_SUPPORTED /**/" >>confdefs.h
|
||||||
|
;;
|
||||||
fi
|
*)
|
||||||
fi
|
as_fn_error $? "--enable-arm-neon=${enable_arm_neon}: invalid value" "$LINENO" 5
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "${enable_arm_neon:-no}" != "no"; then
|
|
||||||
|
# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or
|
||||||
|
# where ARM optimizations were explicitly requested (this allows a fallback if a
|
||||||
|
# future host CPU does not match 'arm*')
|
||||||
|
|
||||||
|
if test "$enable_arm_neon" != 'no' &&
|
||||||
|
case "$host_cpu" in
|
||||||
|
arm*) :;;
|
||||||
|
*) test "$enable_arm_neon" != '';;
|
||||||
|
esac; then
|
||||||
PNG_ARM_NEON_TRUE=
|
PNG_ARM_NEON_TRUE=
|
||||||
PNG_ARM_NEON_FALSE='#'
|
PNG_ARM_NEON_FALSE='#'
|
||||||
else
|
else
|
||||||
@ -12836,7 +12860,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5
|
||||||
$as_echo "$as_me: Extra options for compiler: $PNG_COPTS" >&6;}
|
$as_echo "$as_me: Extra options for compiler: $PNG_COPTS" >&6;}
|
||||||
|
|
||||||
# Config files, substituting as above
|
# Config files, substituting as above
|
||||||
@ -13395,7 +13419,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by libpng $as_me 1.5.15beta06, which was
|
This file was extended by libpng $as_me 1.5.16beta06, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@ -13461,7 +13485,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
libpng config.status 1.5.15beta06
|
libpng config.status 1.5.16beta06
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
66
configure.ac
66
configure.ac
@ -18,15 +18,15 @@ AC_PREREQ(2.59)
|
|||||||
|
|
||||||
dnl Version number stuff here:
|
dnl Version number stuff here:
|
||||||
|
|
||||||
AC_INIT([libpng], [1.5.15beta06], [png-mng-implement@lists.sourceforge.net])
|
AC_INIT([libpng], [1.5.16beta06], [png-mng-implement@lists.sourceforge.net])
|
||||||
AM_INIT_AUTOMAKE([serial-tests])
|
AM_INIT_AUTOMAKE([serial-tests])
|
||||||
dnl stop configure from automagically running automake
|
dnl stop configure from automagically running automake
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
PNGLIB_VERSION=1.5.15beta06
|
PNGLIB_VERSION=1.5.16beta06
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=5
|
PNGLIB_MINOR=5
|
||||||
PNGLIB_RELEASE=15
|
PNGLIB_RELEASE=16
|
||||||
|
|
||||||
dnl End of version number stuff
|
dnl End of version number stuff
|
||||||
|
|
||||||
@ -166,28 +166,52 @@ AC_ARG_WITH(binconfigs,
|
|||||||
[binconfigs='${binconfigs}'])
|
[binconfigs='${binconfigs}'])
|
||||||
AC_SUBST([binconfigs])
|
AC_SUBST([binconfigs])
|
||||||
|
|
||||||
# Because GCC by default assembles code with an executable stack, even though it
|
# HOST SPECIFIC OPTIONS
|
||||||
# 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])
|
# ARM
|
||||||
|
# ===
|
||||||
|
#
|
||||||
|
# ARM NEON (SIMD) support.
|
||||||
|
|
||||||
AC_ARG_ENABLE([arm-neon],
|
AC_ARG_ENABLE([arm-neon],
|
||||||
AS_HELP_STRING([[[--enable-arm-neon]]],
|
AS_HELP_STRING([[[--enable-arm-neon]]],
|
||||||
[Enable ARM NEON optimizations: use 'always' to turn off run-time checks]),
|
[Enable ARM NEON optimizations: =no/off, check, api, yes/on:]
|
||||||
[if test "${enableval}" = "yes" -o "${enableval}" = "always"; then
|
[no/off: disable the optimizations; check: use internal checking code]
|
||||||
AC_DEFINE([PNG_FILTER_OPTIMIZATIONS],
|
[(deprecated and poorly supported); api: disable by default, enable by]
|
||||||
[png_init_filter_functions_neon],
|
[a call to png_set_option; yes/on: turn on unconditionally.]),
|
||||||
[ARM NEON filter initialization function])
|
[case "$enableval" in
|
||||||
AC_DEFINE([PNG_ALIGNED_MEMORY_SUPPORTED], [1],
|
no|off)
|
||||||
[Align row buffers])
|
# disable the default enabling on __ARM_NEON__ systems:
|
||||||
if test "${enableval}" = "always"; then
|
AC_DEFINE([PNG_NO_ARM_NEON], [],
|
||||||
AC_DEFINE([PNG_NO_ARM_NEON_CHECK], [],
|
[Disable ARM Neon optimizations])
|
||||||
[Turn off run-time checking for ARM NEON support])
|
# Prevent inclusion of the assembler files below:
|
||||||
fi
|
enable_arm_neon=no;;
|
||||||
fi])
|
check)
|
||||||
AM_CONDITIONAL([PNG_ARM_NEON], [test "${enable_arm_neon:-no}" != "no"])
|
AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
|
||||||
|
[Check for ARM Neon support at run-time]);;
|
||||||
|
api)
|
||||||
|
AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [],
|
||||||
|
[Turn on ARM Neon optimizations at run-time]);;
|
||||||
|
yes|on)
|
||||||
|
AC_DEFINE([PNG_ARM_NEON_SUPPORTED], [],
|
||||||
|
[Enable ARM Neon optimizations]);;
|
||||||
|
*)
|
||||||
|
AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value])
|
||||||
|
esac])
|
||||||
|
|
||||||
|
# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or
|
||||||
|
# where ARM optimizations were explicitly requested (this allows a fallback if a
|
||||||
|
# future host CPU does not match 'arm*')
|
||||||
|
|
||||||
|
AM_CONDITIONAL([PNG_ARM_NEON],
|
||||||
|
[test "$enable_arm_neon" != 'no' &&
|
||||||
|
case "$host_cpu" in
|
||||||
|
arm*) :;;
|
||||||
|
*) test "$enable_arm_neon" != '';;
|
||||||
|
esac])
|
||||||
|
|
||||||
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
|
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
|
||||||
|
|
||||||
# Config files, substituting as above
|
# Config files, substituting as above
|
||||||
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
|
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
|
||||||
|
@ -215,6 +215,10 @@ uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
|
|||||||
* libpng function */
|
* libpng function */
|
||||||
|
|
||||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||||
|
free(image_data);
|
||||||
|
image_data = NULL;
|
||||||
|
free(row_pointers);
|
||||||
|
row_pointers = NULL;
|
||||||
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngvalid.c - validate libpng by constructing then reading png files.
|
/* pngvalid.c - validate libpng by constructing then reading png files.
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.14 [%RDATE%]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
* Written by John Cunningham Bowler
|
* Written by John Cunningham Bowler
|
||||||
*
|
*
|
||||||
@ -4599,9 +4599,13 @@ progressive_row(png_structp ppIn, png_bytep new_row, png_uint_32 y, int pass)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
png_progressive_combine_row(pp, row, new_row);
|
png_progressive_combine_row(pp, row, new_row);
|
||||||
} else if (dp->interlace_type == PNG_INTERLACE_ADAM7 &&
|
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||||
PNG_ROW_IN_INTERLACE_PASS(y, pass) &&
|
}
|
||||||
PNG_PASS_COLS(dp->w, pass) > 0)
|
|
||||||
|
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||||
|
else if (dp->interlace_type == PNG_INTERLACE_ADAM7 &&
|
||||||
|
PNG_ROW_IN_INTERLACE_PASS(y, pass) &&
|
||||||
|
PNG_PASS_COLS(dp->w, pass) > 0)
|
||||||
png_error(pp, "missing row in progressive de-interlacing");
|
png_error(pp, "missing row in progressive de-interlacing");
|
||||||
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,8 @@ LD=$(CC)
|
|||||||
RM=rm -f
|
RM=rm -f
|
||||||
COPY=cp
|
COPY=cp
|
||||||
|
|
||||||
CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP -I. -O1
|
CPPFLAGS=-I. -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
||||||
|
CFLAGS=-O1
|
||||||
|
|
||||||
C=.c
|
C=.c
|
||||||
O=.o
|
O=.o
|
||||||
@ -81,7 +82,7 @@ OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
|
|||||||
|
|
||||||
# note: dependencies do not work on implicit rule lines
|
# note: dependencies do not work on implicit rule lines
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
@ -95,12 +96,12 @@ pngm2pnm$(E): $(OBJS)
|
|||||||
# The CPP_FLAGS setting causes pngusr.h to be included in
|
# The CPP_FLAGS setting causes pngusr.h to be included in
|
||||||
# both the build of pnglibconf.h and, subsequently, when
|
# both the build of pnglibconf.h and, subsequently, when
|
||||||
# building libpng itself.
|
# building libpng itself.
|
||||||
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak\
|
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak $(ZH)\
|
||||||
$(PNGSRC)/scripts/pnglibconf.dfa \
|
$(PNGSRC)/scripts/pnglibconf.dfa \
|
||||||
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
|
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
|
||||||
$(RM) pnglibconf.h pnglibconf.dfn
|
$(RM) pnglibconf.h pnglibconf.dfn
|
||||||
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
|
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
|
||||||
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG"\
|
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG -I."\
|
||||||
DFA_XTRA="pngusr.dfa" $@
|
DFA_XTRA="pngusr.dfa" $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -14,7 +14,8 @@ LD=$(CC)
|
|||||||
RM=rm -f
|
RM=rm -f
|
||||||
COPY=cp
|
COPY=cp
|
||||||
|
|
||||||
CFLAGS=-DPNG_USER_CONFIG -DZ_SOLO -DNO_GZIP -I. -O1
|
CPPFLAGS=-I. -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
||||||
|
CFLAGS=-O1
|
||||||
|
|
||||||
C=.c
|
C=.c
|
||||||
O=.o
|
O=.o
|
||||||
@ -80,7 +81,7 @@ OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
@ -94,12 +95,12 @@ pnm2pngm$(E): $(OBJS)
|
|||||||
# The CPP_FLAGS setting causes pngusr.h to be included in
|
# The CPP_FLAGS setting causes pngusr.h to be included in
|
||||||
# both the build of pnglibconf.h and, subsequently, when
|
# both the build of pnglibconf.h and, subsequently, when
|
||||||
# building libpng itself.
|
# building libpng itself.
|
||||||
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak\
|
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak $(ZH)\
|
||||||
$(PNGSRC)/scripts/pnglibconf.dfa \
|
$(PNGSRC)/scripts/pnglibconf.dfa \
|
||||||
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
|
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
|
||||||
$(RM) pnglibconf.h pnglibconf.dfn
|
$(RM) pnglibconf.h pnglibconf.dfn
|
||||||
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
|
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
|
||||||
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG"\
|
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG -I."\
|
||||||
DFA_XTRA="pngusr.dfa" $@
|
DFA_XTRA="pngusr.dfa" $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# pngminim/encoder/pngusr.dfa
|
# pngminim/encoder/pngusr.dfa
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010-2011 Glenn Randers-Pehrson
|
# Copyright (c) 2010-2013 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@ -13,6 +13,9 @@ everything = off
|
|||||||
# Switch on the write code - this makes a minimalist encoder
|
# Switch on the write code - this makes a minimalist encoder
|
||||||
|
|
||||||
option WRITE on
|
option WRITE on
|
||||||
|
# These 2 options are required if you need to read PGM (P1 or P4) PGM files.
|
||||||
|
# option WRITE_INVERT on
|
||||||
|
# option WRITE_PACK on
|
||||||
|
|
||||||
# You must choose fixed or floating point arithmetic:
|
# You must choose fixed or floating point arithmetic:
|
||||||
# option FLOATING_POINT on
|
# option FLOATING_POINT on
|
||||||
|
@ -30,7 +30,8 @@ XLIB = -L/usr/X11R6/lib -lX11
|
|||||||
#LIBS = $(XLIB)
|
#LIBS = $(XLIB)
|
||||||
LIBS = $(XLIB) -lm #platforms that need libm
|
LIBS = $(XLIB) -lm #platforms that need libm
|
||||||
|
|
||||||
CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP -I. $(XINC) -O1
|
CPPFLAGS=-I. $(XINC) -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
||||||
|
CFLAGS=-O1
|
||||||
|
|
||||||
C=.c
|
C=.c
|
||||||
O=.o
|
O=.o
|
||||||
@ -96,7 +97,7 @@ OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
@ -110,12 +111,12 @@ rpng2-x$(E): $(OBJS)
|
|||||||
# The CPP_FLAGS setting causes pngusr.h to be included in
|
# The CPP_FLAGS setting causes pngusr.h to be included in
|
||||||
# both the build of pnglibconf.h and, subsequently, when
|
# both the build of pnglibconf.h and, subsequently, when
|
||||||
# building libpng itself.
|
# building libpng itself.
|
||||||
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak\
|
$(PNGCONF): $(PNGSRC)/scripts/pnglibconf.mak $(ZH)\
|
||||||
$(PNGSRC)/scripts/pnglibconf.dfa \
|
$(PNGSRC)/scripts/pnglibconf.dfa \
|
||||||
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
|
$(PNGSRC)/scripts/options.awk pngusr.h pngusr.dfa
|
||||||
$(RM) pnglibconf.h pnglibconf.dfn
|
$(RM) pnglibconf.h pnglibconf.dfn
|
||||||
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
|
$(MAKE) $(MAKEFLAGS) -f $(PNGSRC)/scripts/pnglibconf.mak\
|
||||||
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG"\
|
srcdir=$(PNGSRC) CPPFLAGS="-DPNG_USER_CONFIG -I."\
|
||||||
DFA_XTRA="pngusr.dfa" $@
|
DFA_XTRA="pngusr.dfa" $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <mem.h>
|
#include <mem.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <zlib.h>
|
||||||
|
|
||||||
#ifndef BOOL
|
#ifndef BOOL
|
||||||
#define BOOL unsigned char
|
#define BOOL unsigned char
|
||||||
@ -197,6 +198,9 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
char height_token[16];
|
char height_token[16];
|
||||||
char maxval_token[16];
|
char maxval_token[16];
|
||||||
int color_type;
|
int color_type;
|
||||||
|
unsigned long ul_width=0, ul_alpha_width=0;
|
||||||
|
unsigned long ul_height=0, ul_alpha_height=0;
|
||||||
|
unsigned long ul_maxval=0;
|
||||||
png_uint_32 width, alpha_width;
|
png_uint_32 width, alpha_width;
|
||||||
png_uint_32 height, alpha_height;
|
png_uint_32 height, alpha_height;
|
||||||
png_uint_32 maxval;
|
png_uint_32 maxval;
|
||||||
@ -206,6 +210,9 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
int alpha_present;
|
int alpha_present;
|
||||||
int row, col;
|
int row, col;
|
||||||
BOOL raw, alpha_raw = FALSE;
|
BOOL raw, alpha_raw = FALSE;
|
||||||
|
#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
|
||||||
|
BOOL packed_bitmap = FALSE;
|
||||||
|
#endif
|
||||||
png_uint_32 tmp16;
|
png_uint_32 tmp16;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -218,20 +225,36 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
}
|
}
|
||||||
else if ((type_token[1] == '1') || (type_token[1] == '4'))
|
else if ((type_token[1] == '1') || (type_token[1] == '4'))
|
||||||
{
|
{
|
||||||
|
#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
|
||||||
raw = (type_token[1] == '4');
|
raw = (type_token[1] == '4');
|
||||||
color_type = PNG_COLOR_TYPE_GRAY;
|
color_type = PNG_COLOR_TYPE_GRAY;
|
||||||
|
get_token(pnm_file, width_token);
|
||||||
|
sscanf (width_token, "%lu", &ul_width);
|
||||||
|
width = (png_uint_32) ul_width;
|
||||||
|
get_token(pnm_file, height_token);
|
||||||
|
sscanf (height_token, "%lu", &ul_height);
|
||||||
|
height = (png_uint_32) ul_height;
|
||||||
bit_depth = 1;
|
bit_depth = 1;
|
||||||
|
packed_bitmap = TRUE;
|
||||||
|
#else
|
||||||
|
fprintf (stderr, "PNM2PNG built without PNG_WRITE_INVERT_SUPPORTED and \n");
|
||||||
|
fprintf (stderr, "PNG_WRITE_PACK_SUPPORTED can't read PBM (P1,P4) files\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if ((type_token[1] == '2') || (type_token[1] == '5'))
|
else if ((type_token[1] == '2') || (type_token[1] == '5'))
|
||||||
{
|
{
|
||||||
raw = (type_token[1] == '5');
|
raw = (type_token[1] == '5');
|
||||||
color_type = PNG_COLOR_TYPE_GRAY;
|
color_type = PNG_COLOR_TYPE_GRAY;
|
||||||
get_token(pnm_file, width_token);
|
get_token(pnm_file, width_token);
|
||||||
sscanf (width_token, "%lu", &width);
|
sscanf (width_token, "%lu", &ul_width);
|
||||||
|
width = (png_uint_32) ul_width;
|
||||||
get_token(pnm_file, height_token);
|
get_token(pnm_file, height_token);
|
||||||
sscanf (height_token, "%lu", &height);
|
sscanf (height_token, "%lu", &ul_height);
|
||||||
|
height = (png_uint_32) ul_height;
|
||||||
get_token(pnm_file, maxval_token);
|
get_token(pnm_file, maxval_token);
|
||||||
sscanf (maxval_token, "%lu", &maxval);
|
sscanf (maxval_token, "%lu", &ul_maxval);
|
||||||
|
maxval = (png_uint_32) ul_maxval;
|
||||||
|
|
||||||
if (maxval <= 1)
|
if (maxval <= 1)
|
||||||
bit_depth = 1;
|
bit_depth = 1;
|
||||||
else if (maxval <= 3)
|
else if (maxval <= 3)
|
||||||
@ -248,11 +271,14 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
raw = (type_token[1] == '6');
|
raw = (type_token[1] == '6');
|
||||||
color_type = PNG_COLOR_TYPE_RGB;
|
color_type = PNG_COLOR_TYPE_RGB;
|
||||||
get_token(pnm_file, width_token);
|
get_token(pnm_file, width_token);
|
||||||
sscanf (width_token, "%lu", &width);
|
sscanf (width_token, "%lu", &ul_width);
|
||||||
|
width = (png_uint_32) ul_width;
|
||||||
get_token(pnm_file, height_token);
|
get_token(pnm_file, height_token);
|
||||||
sscanf (height_token, "%lu", &height);
|
sscanf (height_token, "%lu", &ul_height);
|
||||||
|
height = (png_uint_32) ul_height;
|
||||||
get_token(pnm_file, maxval_token);
|
get_token(pnm_file, maxval_token);
|
||||||
sscanf (maxval_token, "%lu", &maxval);
|
sscanf (maxval_token, "%lu", &ul_maxval);
|
||||||
|
maxval = (png_uint_32) ul_maxval;
|
||||||
if (maxval <= 1)
|
if (maxval <= 1)
|
||||||
bit_depth = 1;
|
bit_depth = 1;
|
||||||
else if (maxval <= 3)
|
else if (maxval <= 3)
|
||||||
@ -287,15 +313,18 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
{
|
{
|
||||||
alpha_raw = (type_token[1] == '5');
|
alpha_raw = (type_token[1] == '5');
|
||||||
get_token(alpha_file, width_token);
|
get_token(alpha_file, width_token);
|
||||||
sscanf (width_token, "%lu", &alpha_width);
|
sscanf (width_token, "%lu", &ul_alpha_width);
|
||||||
|
alpha_width=(png_uint_32) ul_alpha_width;
|
||||||
if (alpha_width != width)
|
if (alpha_width != width)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
get_token(alpha_file, height_token);
|
get_token(alpha_file, height_token);
|
||||||
sscanf (height_token, "%lu", &alpha_height);
|
sscanf (height_token, "%lu", &ul_alpha_height);
|
||||||
|
alpha_height = (png_uint_32) ul_alpha_height;
|
||||||
if (alpha_height != height)
|
if (alpha_height != height)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
get_token(alpha_file, maxval_token);
|
get_token(alpha_file, maxval_token);
|
||||||
sscanf (maxval_token, "%lu", &maxval);
|
sscanf (maxval_token, "%lu", &ul_maxval);
|
||||||
|
maxval = (png_uint_32) ul_maxval;
|
||||||
if (maxval <= 1)
|
if (maxval <= 1)
|
||||||
alpha_depth = 1;
|
alpha_depth = 1;
|
||||||
else if (maxval <= 3)
|
else if (maxval <= 3)
|
||||||
@ -329,8 +358,14 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
|
|
||||||
alpha_present = (channels - 1) % 2;
|
alpha_present = (channels - 1) % 2;
|
||||||
|
|
||||||
/* row_bytes is the width x number of channels x (bit-depth / 8) */
|
#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
|
||||||
row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2);
|
if (packed_bitmap)
|
||||||
|
/* row data is as many bytes as can fit width x channels x bit_depth */
|
||||||
|
row_bytes = (width * channels * bit_depth + 7) / 8;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
/* row_bytes is the width x number of channels x (bit-depth / 8) */
|
||||||
|
row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2);
|
||||||
|
|
||||||
if ((png_pixels = (png_byte *) malloc (row_bytes * height * sizeof (png_byte))) == NULL)
|
if ((png_pixels = (png_byte *) malloc (row_bytes * height * sizeof (png_byte))) == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -340,40 +375,48 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
|
|
||||||
for (row = 0; row < height; row++)
|
for (row = 0; row < height; row++)
|
||||||
{
|
{
|
||||||
for (col = 0; col < width; col++)
|
#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
|
||||||
|
if (packed_bitmap) {
|
||||||
|
for (i = 0; i < row_bytes; i++)
|
||||||
|
/* png supports this format natively so no conversion is needed */
|
||||||
|
*pix_ptr++ = get_data (pnm_file, 8);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
for (i = 0; i < (channels - alpha_present); i++)
|
for (col = 0; col < width; col++)
|
||||||
{
|
{
|
||||||
if (raw)
|
for (i = 0; i < (channels - alpha_present); i++)
|
||||||
*pix_ptr++ = get_data (pnm_file, bit_depth);
|
{
|
||||||
else
|
if (raw)
|
||||||
if (bit_depth <= 8)
|
*pix_ptr++ = get_data (pnm_file, bit_depth);
|
||||||
*pix_ptr++ = get_value (pnm_file, bit_depth);
|
|
||||||
else
|
else
|
||||||
{
|
if (bit_depth <= 8)
|
||||||
tmp16 = get_value (pnm_file, bit_depth);
|
*pix_ptr++ = get_value (pnm_file, bit_depth);
|
||||||
*pix_ptr = (png_byte) ((tmp16 >> 8) & 0xFF);
|
else
|
||||||
pix_ptr++;
|
{
|
||||||
*pix_ptr = (png_byte) (tmp16 & 0xFF);
|
tmp16 = get_value (pnm_file, bit_depth);
|
||||||
pix_ptr++;
|
*pix_ptr = (png_byte) ((tmp16 >> 8) & 0xFF);
|
||||||
}
|
pix_ptr++;
|
||||||
}
|
*pix_ptr = (png_byte) (tmp16 & 0xFF);
|
||||||
|
pix_ptr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (alpha) /* read alpha-channel from pgm file */
|
if (alpha) /* read alpha-channel from pgm file */
|
||||||
{
|
{
|
||||||
if (alpha_raw)
|
if (alpha_raw)
|
||||||
*pix_ptr++ = get_data (alpha_file, alpha_depth);
|
*pix_ptr++ = get_data (alpha_file, alpha_depth);
|
||||||
else
|
|
||||||
if (alpha_depth <= 8)
|
|
||||||
*pix_ptr++ = get_value (alpha_file, bit_depth);
|
|
||||||
else
|
else
|
||||||
{
|
if (alpha_depth <= 8)
|
||||||
tmp16 = get_value (alpha_file, bit_depth);
|
*pix_ptr++ = get_value (alpha_file, bit_depth);
|
||||||
*pix_ptr++ = (png_byte) ((tmp16 >> 8) & 0xFF);
|
else
|
||||||
*pix_ptr++ = (png_byte) (tmp16 & 0xFF);
|
{
|
||||||
}
|
tmp16 = get_value (alpha_file, bit_depth);
|
||||||
} /* if alpha */
|
*pix_ptr++ = (png_byte) ((tmp16 >> 8) & 0xFF);
|
||||||
|
*pix_ptr++ = (png_byte) (tmp16 & 0xFF);
|
||||||
|
}
|
||||||
|
} /* if alpha */
|
||||||
|
} /* if packed_bitmap */
|
||||||
} /* end for col */
|
} /* end for col */
|
||||||
} /* end for row */
|
} /* end for row */
|
||||||
|
|
||||||
@ -390,6 +433,14 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
|
||||||
|
if (packed_bitmap == TRUE)
|
||||||
|
{
|
||||||
|
png_set_packing (png_ptr);
|
||||||
|
png_set_invert_mono (png_ptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* setjmp() must be called in every function that calls a PNG-reading libpng function */
|
/* setjmp() must be called in every function that calls a PNG-reading libpng function */
|
||||||
if (setjmp (png_jmpbuf(png_ptr)))
|
if (setjmp (png_jmpbuf(png_ptr)))
|
||||||
{
|
{
|
||||||
@ -446,19 +497,32 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
|||||||
void get_token(FILE *pnm_file, char *token)
|
void get_token(FILE *pnm_file, char *token)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* remove white-space */
|
/* remove white-space and comment lines */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
token[i] = (unsigned char) fgetc (pnm_file);
|
ret = fgetc(pnm_file);
|
||||||
|
if (ret == '#') {
|
||||||
|
/* the rest of this line is a comment */
|
||||||
|
do
|
||||||
|
{
|
||||||
|
ret = fgetc(pnm_file);
|
||||||
|
}
|
||||||
|
while ((ret != '\n') && (ret != '\r') && (ret != EOF));
|
||||||
|
}
|
||||||
|
if (ret == EOF) break;
|
||||||
|
token[i] = (unsigned char) ret;
|
||||||
}
|
}
|
||||||
while ((token[i] == '\n') || (token[i] == '\r') || (token[i] == ' '));
|
while ((token[i] == '\n') || (token[i] == '\r') || (token[i] == ' '));
|
||||||
|
|
||||||
/* read string */
|
/* read string */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
ret = fgetc(pnm_file);
|
||||||
|
if (ret == EOF) break;
|
||||||
i++;
|
i++;
|
||||||
token[i] = (unsigned char) fgetc (pnm_file);
|
token[i] = (unsigned char) ret;
|
||||||
}
|
}
|
||||||
while ((token[i] != '\n') && (token[i] != '\r') && (token[i] != ' '));
|
while ((token[i] != '\n') && (token[i] != '\r') && (token[i] != ' '));
|
||||||
|
|
||||||
@ -510,6 +574,7 @@ png_uint_32 get_value (FILE *pnm_file, int depth)
|
|||||||
{
|
{
|
||||||
static png_uint_32 mask = 0;
|
static png_uint_32 mask = 0;
|
||||||
png_byte token[16];
|
png_byte token[16];
|
||||||
|
unsigned long ul_ret_value;
|
||||||
png_uint_32 ret_value;
|
png_uint_32 ret_value;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
@ -518,7 +583,8 @@ png_uint_32 get_value (FILE *pnm_file, int depth)
|
|||||||
mask = (mask << 1) | 0x01;
|
mask = (mask << 1) | 0x01;
|
||||||
|
|
||||||
get_token (pnm_file, (char *) token);
|
get_token (pnm_file, (char *) token);
|
||||||
sscanf ((const char *) token, "%lu", &ret_value);
|
sscanf ((const char *) token, "%lu", &ul_ret_value);
|
||||||
|
ret_value = (png_uint_32) ul_ret_value;
|
||||||
|
|
||||||
ret_value &= mask;
|
ret_value &= mask;
|
||||||
|
|
||||||
|
@ -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.15beta06 - February 22, 2013
|
libpng version 1.5.16beta06 - May 12, 2013
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
@ -11,7 +11,7 @@ Libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.15beta06 - February 22, 2013
|
libpng versions 0.97, January 1998, through 1.5.16beta06 - May 12, 2013
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@ -31,9 +31,7 @@ Libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
I. Introduction
|
I. Introduction
|
||||||
|
|
||||||
This file describes how to use and modify the PNG reference library
|
This file describes how to use and modify the PNG reference library
|
||||||
(known as libpng) for your own use. There are five sections to this
|
(known as libpng) for your own use. In addition to this
|
||||||
file: introduction, structures, reading, writing, and modification and
|
|
||||||
configuration notes for various special platforms. In addition to this
|
|
||||||
file, example.c is a good starting point for using the library, as
|
file, example.c is a good starting point for using the library, as
|
||||||
it is heavily commented and should include everything most people
|
it is heavily commented and should include everything most people
|
||||||
will need. We assume that libpng is already installed; see the
|
will need. We assume that libpng is already installed; see the
|
||||||
@ -509,8 +507,7 @@ you can retrieve with
|
|||||||
|
|
||||||
If you call the png_set_read_user_chunk_fn() function, then all unknown
|
If you call the png_set_read_user_chunk_fn() function, then all unknown
|
||||||
chunks will be saved when read, in case your callback function will need
|
chunks will be saved when read, in case your callback function will need
|
||||||
one or more of them. This behavior can be changed with the
|
one or more of them.
|
||||||
png_set_keep_unknown_chunks() function, described below.
|
|
||||||
|
|
||||||
At this point, you can set up a callback function that will be
|
At this point, you can set up a callback function that will be
|
||||||
called after each row has been read, which you can use to control
|
called after each row has been read, which you can use to control
|
||||||
@ -604,7 +601,11 @@ callback function:
|
|||||||
|
|
||||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||||
/* ignore all unknown chunks: */
|
/* ignore all unknown chunks: */
|
||||||
|
# if PNG_LIBPNG_VER < 10700
|
||||||
|
png_set_keep_unknown_chunks(read_ptr, 2, NULL, 0);
|
||||||
|
# else
|
||||||
png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0);
|
png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0);
|
||||||
|
# endif
|
||||||
|
|
||||||
/* except for vpAg: */
|
/* except for vpAg: */
|
||||||
png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1);
|
png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1);
|
||||||
@ -3034,13 +3035,45 @@ from PNG time to an RFC 1123 format string.
|
|||||||
|
|
||||||
Writing unknown chunks
|
Writing unknown chunks
|
||||||
|
|
||||||
You can use the png_set_unknown_chunks function to queue up chunks
|
You can use the png_set_unknown_chunks function to queue up private chunks
|
||||||
for writing. You give it a chunk name, raw data, and a size; that's
|
for writing. You give it a chunk name, location, raw data, and a size. You
|
||||||
all there is to it. The chunks will be written by the next following
|
also must use png_set_keep_unknown_chunks() to ensure that libpng will
|
||||||
png_write_info_before_PLTE, png_write_info, or png_write_end function.
|
handle them. That's all there is to it. The chunks will be written by the
|
||||||
Any chunks previously read into the info structure's unknown-chunk
|
next following png_write_info_before_PLTE, png_write_info, or png_write_end
|
||||||
list will also be written out in a sequence that satisfies the PNG
|
function, depending upon the specified location. Any chunks previously
|
||||||
specification's ordering rules.
|
read into the info structure's unknown-chunk list will also be written out
|
||||||
|
in a sequence that satisfies the PNG specification's ordering rules.
|
||||||
|
|
||||||
|
Here is an example of writing two private chunks, prVt and miNE:
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
|
/* Set unknown chunk data */
|
||||||
|
png_unknown_chunk unk_chunk[2];
|
||||||
|
strcpy((char *) unk_chunk[0].name, "prVt";
|
||||||
|
unk_chunk[0].data = (unsigned char *) "PRIVATE DATA";
|
||||||
|
unk_chunk[0].size = strlen(unk_chunk[0].data)+1;
|
||||||
|
unk_chunk[0].location = PNG_HAVE_IHDR;
|
||||||
|
strcpy((char *) unk_chunk[1].name, "miNE";
|
||||||
|
unk_chunk[1].data = (unsigned char *) "MY CHUNK DATA";
|
||||||
|
unk_chunk[1].size = strlen(unk_chunk[0].data)+1;
|
||||||
|
unk_chunk[1].location = PNG_AFTER_IDAT;
|
||||||
|
png_set_unknown_chunks(write_ptr, write_info_ptr,
|
||||||
|
unk_chunk, 2);
|
||||||
|
/* Needed because miNE is not safe-to-copy */
|
||||||
|
png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS,
|
||||||
|
(png_bytep) "miNE", 1);
|
||||||
|
/* Deal with unknown chunk location bug in 1.5.x and earlier */
|
||||||
|
png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR);
|
||||||
|
png_set_unknown_chunk_location(png, info, 1, PNG_AFTER_IDAT);
|
||||||
|
# if PNG_LIBPNG_VER < 10500
|
||||||
|
/* PNG_AFTER_IDAT writes two copies of the chunk prior to libpng-1.5.0,
|
||||||
|
* one before IDAT and another after IDAT, so don't use it; only use
|
||||||
|
* PNG_HAVE_IHDR location. This call resets the location previously
|
||||||
|
* set by assignment and png_set_unknown_chunk_location() for chunk 1.
|
||||||
|
*/
|
||||||
|
png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
The high-level write interface
|
The high-level write interface
|
||||||
|
|
||||||
@ -4490,11 +4523,11 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files
|
|||||||
going back to version 0.70. You can access the git repository (read only)
|
going back to version 0.70. You can access the git repository (read only)
|
||||||
at
|
at
|
||||||
|
|
||||||
git://libpng.git.sourceforge.net/gitroot/libpng
|
git://git.code.sf.net/p/libpng/code
|
||||||
|
|
||||||
or you can browse it via "gitweb" at
|
or you can browse it with a web browser by selecting the "code" button at
|
||||||
|
|
||||||
http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng
|
https://sourceforge.net/projects/libpng/
|
||||||
|
|
||||||
Patches can be sent to glennrp at users.sourceforge.net or to
|
Patches can be sent to glennrp at users.sourceforge.net or to
|
||||||
png-mng-implement at lists.sourceforge.net or you can upload them to
|
png-mng-implement at lists.sourceforge.net or you can upload them to
|
||||||
@ -4622,13 +4655,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XIV. Y2K Compliance in libpng
|
XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
February 22, 2013
|
May 12, 2013
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.5.15beta06 are Y2K compliant. It is my belief that earlier
|
upward through 1.5.16beta06 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has two year fields. One is a 2-byte unsigned integer that
|
Libpng only has two year fields. One is a 2-byte unsigned integer that
|
||||||
|
88
libpng.3
88
libpng.3
@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNG 3 "February 22, 2013"
|
.TH LIBPNG 3 "May 12, 2013"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.15beta06
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.16beta06
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB
|
\fB
|
||||||
#include <png.h>\fP
|
#include <png.h>\fP
|
||||||
@ -277,7 +277,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.15beta06
|
|||||||
|
|
||||||
\fBvoid png_set_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fIbackground\fP\fB);\fP
|
\fBvoid png_set_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fIbackground\fP\fB);\fP
|
||||||
|
|
||||||
\fBvoid png_set_check_for_invalid_index(png_structrp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP
|
\fBvoid png_set_check_for_invalid_index(png_structp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP
|
||||||
|
|
||||||
\fBvoid png_set_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP
|
\fBvoid png_set_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP
|
||||||
|
|
||||||
@ -492,7 +492,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.15beta06 - February 22, 2013
|
libpng version 1.5.16beta06 - May 12, 2013
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
@ -503,7 +503,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.15beta06 - February 22, 2013
|
libpng versions 0.97, January 1998, through 1.5.16beta06 - May 12, 2013
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@ -523,9 +523,7 @@ Libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
.SH I. Introduction
|
.SH I. Introduction
|
||||||
|
|
||||||
This file describes how to use and modify the PNG reference library
|
This file describes how to use and modify the PNG reference library
|
||||||
(known as libpng) for your own use. There are five sections to this
|
(known as libpng) for your own use. In addition to this
|
||||||
file: introduction, structures, reading, writing, and modification and
|
|
||||||
configuration notes for various special platforms. In addition to this
|
|
||||||
file, example.c is a good starting point for using the library, as
|
file, example.c is a good starting point for using the library, as
|
||||||
it is heavily commented and should include everything most people
|
it is heavily commented and should include everything most people
|
||||||
will need. We assume that libpng is already installed; see the
|
will need. We assume that libpng is already installed; see the
|
||||||
@ -1001,8 +999,7 @@ you can retrieve with
|
|||||||
|
|
||||||
If you call the png_set_read_user_chunk_fn() function, then all unknown
|
If you call the png_set_read_user_chunk_fn() function, then all unknown
|
||||||
chunks will be saved when read, in case your callback function will need
|
chunks will be saved when read, in case your callback function will need
|
||||||
one or more of them. This behavior can be changed with the
|
one or more of them.
|
||||||
png_set_keep_unknown_chunks() function, described below.
|
|
||||||
|
|
||||||
At this point, you can set up a callback function that will be
|
At this point, you can set up a callback function that will be
|
||||||
called after each row has been read, which you can use to control
|
called after each row has been read, which you can use to control
|
||||||
@ -1096,7 +1093,11 @@ callback function:
|
|||||||
|
|
||||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
|
||||||
/* ignore all unknown chunks: */
|
/* ignore all unknown chunks: */
|
||||||
|
# if PNG_LIBPNG_VER < 10700
|
||||||
|
png_set_keep_unknown_chunks(read_ptr, 2, NULL, 0);
|
||||||
|
# else
|
||||||
png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0);
|
png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0);
|
||||||
|
# endif
|
||||||
|
|
||||||
/* except for vpAg: */
|
/* except for vpAg: */
|
||||||
png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1);
|
png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1);
|
||||||
@ -3526,13 +3527,45 @@ from PNG time to an RFC 1123 format string.
|
|||||||
|
|
||||||
.SS Writing unknown chunks
|
.SS Writing unknown chunks
|
||||||
|
|
||||||
You can use the png_set_unknown_chunks function to queue up chunks
|
You can use the png_set_unknown_chunks function to queue up private chunks
|
||||||
for writing. You give it a chunk name, raw data, and a size; that's
|
for writing. You give it a chunk name, location, raw data, and a size. You
|
||||||
all there is to it. The chunks will be written by the next following
|
also must use png_set_keep_unknown_chunks() to ensure that libpng will
|
||||||
png_write_info_before_PLTE, png_write_info, or png_write_end function.
|
handle them. That's all there is to it. The chunks will be written by the
|
||||||
Any chunks previously read into the info structure's unknown-chunk
|
next following png_write_info_before_PLTE, png_write_info, or png_write_end
|
||||||
list will also be written out in a sequence that satisfies the PNG
|
function, depending upon the specified location. Any chunks previously
|
||||||
specification's ordering rules.
|
read into the info structure's unknown-chunk list will also be written out
|
||||||
|
in a sequence that satisfies the PNG specification's ordering rules.
|
||||||
|
|
||||||
|
Here is an example of writing two private chunks, prVt and miNE:
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
|
/* Set unknown chunk data */
|
||||||
|
png_unknown_chunk unk_chunk[2];
|
||||||
|
strcpy((char *) unk_chunk[0].name, "prVt";
|
||||||
|
unk_chunk[0].data = (unsigned char *) "PRIVATE DATA";
|
||||||
|
unk_chunk[0].size = strlen(unk_chunk[0].data)+1;
|
||||||
|
unk_chunk[0].location = PNG_HAVE_IHDR;
|
||||||
|
strcpy((char *) unk_chunk[1].name, "miNE";
|
||||||
|
unk_chunk[1].data = (unsigned char *) "MY CHUNK DATA";
|
||||||
|
unk_chunk[1].size = strlen(unk_chunk[0].data)+1;
|
||||||
|
unk_chunk[1].location = PNG_AFTER_IDAT;
|
||||||
|
png_set_unknown_chunks(write_ptr, write_info_ptr,
|
||||||
|
unk_chunk, 2);
|
||||||
|
/* Needed because miNE is not safe-to-copy */
|
||||||
|
png_set_keep_unknown_chunks(png, PNG_HANDLE_CHUNK_ALWAYS,
|
||||||
|
(png_bytep) "miNE", 1);
|
||||||
|
/* Deal with unknown chunk location bug in 1.5.x and earlier */
|
||||||
|
png_set_unknown_chunk_location(png, info, 0, PNG_HAVE_IHDR);
|
||||||
|
png_set_unknown_chunk_location(png, info, 1, PNG_AFTER_IDAT);
|
||||||
|
# if PNG_LIBPNG_VER < 10500
|
||||||
|
/* PNG_AFTER_IDAT writes two copies of the chunk prior to libpng-1.5.0,
|
||||||
|
* one before IDAT and another after IDAT, so don't use it; only use
|
||||||
|
* PNG_HAVE_IHDR location. This call resets the location previously
|
||||||
|
* set by assignment and png_set_unknown_chunk_location() for chunk 1.
|
||||||
|
*/
|
||||||
|
png_set_unknown_chunk_location(png, info, 1, PNG_HAVE_IHDR);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
.SS The high-level write interface
|
.SS The high-level write interface
|
||||||
|
|
||||||
@ -4983,11 +5016,11 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files
|
|||||||
going back to version 0.70. You can access the git repository (read only)
|
going back to version 0.70. You can access the git repository (read only)
|
||||||
at
|
at
|
||||||
|
|
||||||
git://libpng.git.sourceforge.net/gitroot/libpng
|
git://git.code.sf.net/p/libpng/code
|
||||||
|
|
||||||
or you can browse it via "gitweb" at
|
or you can browse it with a web browser by selecting the "code" button at
|
||||||
|
|
||||||
http://libpng.git.sourceforge.net/git/gitweb.cgi?p=libpng
|
https://sourceforge.net/projects/libpng/
|
||||||
|
|
||||||
Patches can be sent to glennrp at users.sourceforge.net or to
|
Patches can be sent to glennrp at users.sourceforge.net or to
|
||||||
png-mng-implement at lists.sourceforge.net or you can upload them to
|
png-mng-implement at lists.sourceforge.net or you can upload them to
|
||||||
@ -5115,13 +5148,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XIV. Y2K Compliance in libpng
|
.SH XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
February 22, 2013
|
May 12, 2013
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.5.15beta06 are Y2K compliant. It is my belief that earlier
|
upward through 1.5.16beta06 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has two year fields. One is a 2-byte unsigned integer that
|
Libpng only has two year fields. One is a 2-byte unsigned integer that
|
||||||
@ -5344,7 +5377,10 @@ the first widely used release:
|
|||||||
1.5.14beta01-08 15 10514 15.so.15.14[.0]
|
1.5.14beta01-08 15 10514 15.so.15.14[.0]
|
||||||
1.5.14rc01-03 15 10514 15.so.15.14[.0]
|
1.5.14rc01-03 15 10514 15.so.15.14[.0]
|
||||||
1.5.14 15 10514 15.so.15.14[.0]
|
1.5.14 15 10514 15.so.15.14[.0]
|
||||||
1.5.15beta01-06 15 10515 15.so.15.15[.0]
|
1.5.15beta01-09 15 10515 15.so.15.15[.0]
|
||||||
|
1.5.15rc01 15 10515 15.so.15.15[.0]
|
||||||
|
1.5.15 15 10515 15.so.15.15[.0]
|
||||||
|
1.5.16beta01-06 15 10516 15.so.15.16[.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
|
||||||
@ -5401,7 +5437,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.15beta06 - February 22, 2013:
|
Libpng version 1.5.16beta06 - May 12, 2013:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||||
|
|
||||||
@ -5424,7 +5460,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.15beta06, February 22, 2013, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.16beta06, May 12, 2013, are
|
||||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
@ -5523,7 +5559,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
February 22, 2013
|
May 12, 2013
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNGPF 3 "February 22, 2013"
|
.TH LIBPNGPF 3 "May 12, 2013"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.15beta06
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.16beta06
|
||||||
(private functions)
|
(private functions)
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB#include \fI"pngpriv.h"
|
\fB#include \fI"pngpriv.h"
|
||||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "February 22, 2013"
|
.TH PNG 5 "May 12, 2013"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
29
png.c
29
png.c
@ -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.15 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -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_15beta06 Your_png_h_is_not_version_1_5_15beta06;
|
typedef png_libpng_version_1_5_16beta06 Your_png_h_is_not_version_1_5_16beta06;
|
||||||
|
|
||||||
/* 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
|
||||||
@ -658,13 +658,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.15beta06 - February 22, 2013" PNG_STRING_NEWLINE \
|
"libpng version 1.5.16beta06 - May 12, 2013" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2013 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2013 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.5.15beta06 - February 22, 2013\
|
return "libpng version 1.5.16beta06 - May 12, 2013\
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||||
@ -2878,3 +2878,24 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth)
|
|||||||
}
|
}
|
||||||
#endif /* READ_GAMMA */
|
#endif /* READ_GAMMA */
|
||||||
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
|
||||||
|
|
||||||
|
/* HARDWARE OPTION SUPPORT */
|
||||||
|
#ifdef PNG_SET_OPTION_SUPPORTED
|
||||||
|
int PNGAPI
|
||||||
|
png_set_option(png_structp png_ptr, int option, int onoff)
|
||||||
|
{
|
||||||
|
if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT &&
|
||||||
|
(option & 1) == 0)
|
||||||
|
{
|
||||||
|
int mask = 3 << option;
|
||||||
|
int setting = (2 + (onoff != 0)) << option;
|
||||||
|
int current = png_ptr->options;
|
||||||
|
|
||||||
|
png_ptr->options = (png_byte)((current & ~mask) | setting);
|
||||||
|
|
||||||
|
return (current & mask) >> option;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PNG_OPTION_INVALID;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
68
png.h
68
png.h
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.5.15beta06 - February 22, 2013
|
* libpng version 1.5.16beta06 - May 12, 2013
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.5.15beta06 - February 22, 2013: Glenn
|
* libpng versions 0.97, January 1998, through 1.5.16beta06 - May 12, 2013: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@ -184,7 +184,10 @@
|
|||||||
* 1.5.14beta01-08 15 10514 15.so.15.14[.0]
|
* 1.5.14beta01-08 15 10514 15.so.15.14[.0]
|
||||||
* 1.5.14rc01-03 15 10514 15.so.15.14[.0]
|
* 1.5.14rc01-03 15 10514 15.so.15.14[.0]
|
||||||
* 1.5.14 15 10514 15.so.15.14[.0]
|
* 1.5.14 15 10514 15.so.15.14[.0]
|
||||||
* 1.5.15beta01-06 15 10515 15.so.15.15[.0]
|
* 1.5.15beta01-09 15 10515 15.so.15.15[.0]
|
||||||
|
* 1.5.15rc01 15 10515 15.so.15.15[.0]
|
||||||
|
* 1.5.15 15 10515 15.so.15.15[.0]
|
||||||
|
* 1.5.16beta01-06 15 10516 15.so.15.16[.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
|
||||||
@ -216,7 +219,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.15beta06, February 22, 2013, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.5.16beta06, May 12, 2013, are
|
||||||
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
@ -328,13 +331,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* February 22, 2013
|
* May 12, 2013
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
*
|
*
|
||||||
* This is your unofficial assurance that libpng from version 0.71 and
|
* This is your unofficial assurance that libpng from version 0.71 and
|
||||||
* upward through 1.5.15beta06 are Y2K compliant. It is my belief that
|
* upward through 1.5.16beta06 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
|
||||||
@ -393,9 +396,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.5.15beta06"
|
#define PNG_LIBPNG_VER_STRING "1.5.16beta06"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.5.15beta06 - February 22, 2013\n"
|
" libpng version 1.5.16beta06 - May 12, 2013\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
|
||||||
@ -403,7 +406,7 @@
|
|||||||
/* 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 15
|
#define PNG_LIBPNG_VER_RELEASE 16
|
||||||
|
|
||||||
/* 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:
|
||||||
@ -434,7 +437,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 10515 /* 1.5.15 */
|
#define PNG_LIBPNG_VER 10516 /* 1.5.16 */
|
||||||
|
|
||||||
/* 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.
|
||||||
@ -556,7 +559,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_15beta06;
|
typedef char* png_libpng_version_1_5_16beta06;
|
||||||
|
|
||||||
/* 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
|
||||||
@ -2660,6 +2663,47 @@ PNG_EXPORT(235, int, png_get_palette_max, (png_const_structp png_ptr,
|
|||||||
# endif
|
# endif
|
||||||
#endif /* CHECK_FOR_INVALID_INDEX */
|
#endif /* CHECK_FOR_INVALID_INDEX */
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* IMPLEMENTATION OPTIONS
|
||||||
|
*******************************************************************************
|
||||||
|
*
|
||||||
|
* Support for arbitrary implementation-specific optimizations. The API allows
|
||||||
|
* particular options to be turned on or off. 'Option' is the number of the
|
||||||
|
* option and 'onoff' is 0 (off) or non-0 (on). The value returned is given
|
||||||
|
* by the PNG_OPTION_ defines below.
|
||||||
|
*
|
||||||
|
* HARDWARE: normally hardware capabilites, such as the Intel SSE instructions,
|
||||||
|
* are detected at run time, however sometimes it may be impossible
|
||||||
|
* to do this in user mode, in which case it is necessary to discover
|
||||||
|
* the capabilities in an OS specific way. Such capabilities are
|
||||||
|
* listed here when libpng has support for them and must be turned
|
||||||
|
* ON by the application if present.
|
||||||
|
*
|
||||||
|
* SOFTWARE: sometimes software optimizations actually result in performance
|
||||||
|
* decrease on some architectures or systems, or with some sets of
|
||||||
|
* PNG images. 'Software' options allow such optimizations to be
|
||||||
|
* selected at run time.
|
||||||
|
*/
|
||||||
|
#ifdef PNG_SET_OPTION_SUPPORTED
|
||||||
|
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
||||||
|
# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */
|
||||||
|
#endif
|
||||||
|
#define PNG_OPTION_NEXT 2 /* Next option - numbers must be even */
|
||||||
|
|
||||||
|
/* Return values: NOTE: there are four values and 'off' is *not* zero */
|
||||||
|
#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
|
||||||
|
#define PNG_OPTION_INVALID 1 /* Option number out of range */
|
||||||
|
#define PNG_OPTION_OFF 2
|
||||||
|
#define PNG_OPTION_ON 3
|
||||||
|
|
||||||
|
PNG_EXPORT(236, int, png_set_option, (png_structp png_ptr, int option,
|
||||||
|
int onoff));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* END OF HARDWARE OPTIONS
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
|
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
|
||||||
* defs
|
* defs
|
||||||
*/
|
*/
|
||||||
@ -2669,7 +2713,7 @@ PNG_EXPORT(235, int, png_get_palette_max, (png_const_structp png_ptr,
|
|||||||
* scripts/symbols.def as well.
|
* scripts/symbols.def as well.
|
||||||
*/
|
*/
|
||||||
#ifdef PNG_EXPORT_LAST_ORDINAL
|
#ifdef PNG_EXPORT_LAST_ORDINAL
|
||||||
PNG_EXPORT_LAST_ORDINAL(235);
|
PNG_EXPORT_LAST_ORDINAL(236);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.5.15beta06 - February 22, 2013
|
* libpng version 1.5.16beta06 - May 12, 2013
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
2
pngget.c
2
pngget.c
@ -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.15 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.15 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
|
@ -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.15 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -194,6 +194,8 @@ translate_gamma_flags(png_structp png_ptr, png_fixed_point output_gamma,
|
|||||||
*/
|
*/
|
||||||
# ifdef PNG_READ_sRGB_SUPPORTED
|
# ifdef PNG_READ_sRGB_SUPPORTED
|
||||||
png_ptr->flags |= PNG_FLAG_ASSUME_sRGB;
|
png_ptr->flags |= PNG_FLAG_ASSUME_sRGB;
|
||||||
|
# else
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
# endif
|
# endif
|
||||||
if (is_screen)
|
if (is_screen)
|
||||||
output_gamma = PNG_GAMMA_sRGB;
|
output_gamma = PNG_GAMMA_sRGB;
|
||||||
|
@ -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.14 [January 24, 2013]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
|
|
||||||
#define png_strtod(p,a,b) strtod(a,b)
|
|
||||||
|
|
||||||
png_uint_32 PNGAPI
|
png_uint_32 PNGAPI
|
||||||
png_get_uint_31(png_structp png_ptr, png_const_bytep buf)
|
png_get_uint_31(png_structp png_ptr, png_const_bytep buf)
|
||||||
{
|
{
|
||||||
@ -3161,7 +3159,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
{
|
{
|
||||||
png_uint_32p dp32 = (png_uint_32p)dp;
|
png_uint_32p dp32 = (png_uint_32p)dp;
|
||||||
png_const_uint_32p sp32 = (png_const_uint_32p)sp;
|
png_const_uint_32p sp32 = (png_const_uint_32p)sp;
|
||||||
unsigned int skip = (bytes_to_jump-bytes_to_copy) /
|
size_t skip = (bytes_to_jump-bytes_to_copy) /
|
||||||
sizeof (png_uint_32);
|
sizeof (png_uint_32);
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -3202,7 +3200,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
{
|
{
|
||||||
png_uint_16p dp16 = (png_uint_16p)dp;
|
png_uint_16p dp16 = (png_uint_16p)dp;
|
||||||
png_const_uint_16p sp16 = (png_const_uint_16p)sp;
|
png_const_uint_16p sp16 = (png_const_uint_16p)sp;
|
||||||
unsigned int skip = (bytes_to_jump-bytes_to_copy) /
|
size_t skip = (bytes_to_jump-bytes_to_copy) /
|
||||||
sizeof (png_uint_16);
|
sizeof (png_uint_16);
|
||||||
|
|
||||||
do
|
do
|
||||||
|
2
pngset.c
2
pngset.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.15 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.14 [January 24, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
@ -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.15 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@ -355,5 +355,10 @@ struct png_struct_def
|
|||||||
/* New member added in libpng-1.5.7 */
|
/* New member added in libpng-1.5.7 */
|
||||||
void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info,
|
void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info,
|
||||||
png_bytep row, png_const_bytep prev_row);
|
png_bytep row, png_const_bytep prev_row);
|
||||||
|
|
||||||
|
/* Options */
|
||||||
|
#ifdef PNG_SET_OPTION_SUPPORTED
|
||||||
|
png_byte options; /* On/off state (up to 4 options) */
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
#endif /* PNGSTRUCT_H */
|
#endif /* PNGSTRUCT_H */
|
||||||
|
19
pngtest.c
19
pngtest.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.15 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -43,7 +43,20 @@
|
|||||||
|
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED /* else nothing can be done */
|
#if defined PNG_READ_SUPPORTED && /* else nothing can be done */\
|
||||||
|
defined PNG_READ_bKGD_SUPPORTED &&\
|
||||||
|
defined PNG_READ_cHRM_SUPPORTED &&\
|
||||||
|
defined PNG_READ_gAMA_SUPPORTED &&\
|
||||||
|
defined PNG_READ_oFFs_SUPPORTED &&\
|
||||||
|
defined PNG_READ_pCAL_SUPPORTED &&\
|
||||||
|
defined PNG_READ_pHYs_SUPPORTED &&\
|
||||||
|
defined PNG_READ_sBIT_SUPPORTED &&\
|
||||||
|
defined PNG_READ_sCAL_SUPPORTED &&\
|
||||||
|
defined PNG_READ_sRGB_SUPPORTED &&\
|
||||||
|
defined PNG_READ_tEXt_SUPPORTED &&\
|
||||||
|
defined PNG_READ_tIME_SUPPORTED &&\
|
||||||
|
defined PNG_READ_zTXt_SUPPORTED
|
||||||
|
|
||||||
#include "zlib.h"
|
#include "zlib.h"
|
||||||
/* Copied from pngpriv.h but only used in error messages below. */
|
/* Copied from pngpriv.h but only used in error messages below. */
|
||||||
#ifndef PNG_ZBUF_SIZE
|
#ifndef PNG_ZBUF_SIZE
|
||||||
@ -1949,4 +1962,4 @@ main(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_5_15beta06 Your_png_h_is_not_version_1_5_15beta06;
|
typedef png_libpng_version_1_5_16beta06 Your_png_h_is_not_version_1_5_16beta06;
|
||||||
|
@ -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.15 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
VisualStudio instructions
|
VisualStudio instructions
|
||||||
|
|
||||||
libpng version 1.5.15beta06 - February 22, 2013
|
libpng version 1.5.16beta06 - May 12, 2013
|
||||||
|
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* zlib.props - location of zlib source
|
* zlib.props - location of zlib source
|
||||||
*
|
*
|
||||||
* libpng version 1.5.15beta06 - February 22, 2013
|
* libpng version 1.5.16beta06 - May 12, 2013
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
Makefiles for libpng version 1.5.15beta06 - February 22, 2013
|
Makefiles for libpng version 1.5.16beta06 - May 12, 2013
|
||||||
|
|
||||||
pnglibconf.h.prebuilt => Stores configuration settings
|
pnglibconf.h.prebuilt => Stores configuration settings
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng15.so.15.1.5.15beta06)
|
(gcc, creates libpng15.so.15.1.5.16beta06)
|
||||||
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
|
||||||
@ -21,7 +21,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.15beta06)
|
(gcc, creates libpng15.so.15.1.5.16beta06)
|
||||||
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
|
||||||
@ -36,12 +36,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.15beta06)
|
creates libpng15.so.15.1.5.16beta06)
|
||||||
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.15beta06)
|
creates libpng15.so.15.1.5.16beta06)
|
||||||
makefile.so9 => Solaris 9 makefile (gcc,
|
makefile.so9 => Solaris 9 makefile (gcc,
|
||||||
creates libpng15.so.15.1.5.15beta06)
|
creates libpng15.so.15.1.5.16beta06)
|
||||||
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
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
# awk -f checksym.awk official-def list-to-check
|
# awk -f checksym.awk official-def list-to-check
|
||||||
#
|
#
|
||||||
# Output is a file in the current directory called 'symbols.new',
|
# Output is a file in the current directory called 'symbols.new',
|
||||||
# stdout holds error messages. Error code indicates success or
|
# the value of the awk variable "of" (which can be changed on the
|
||||||
# failure.
|
# command line if required.) stdout holds error messages. Error
|
||||||
|
# code indicates success or failure.
|
||||||
#
|
#
|
||||||
# NOTE: this is a pure, old fashioned, awk script. It will
|
# NOTE: this is a pure, old fashioned, awk script. It will
|
||||||
# work with any awk
|
# work with any awk
|
||||||
@ -21,6 +22,7 @@ BEGIN{
|
|||||||
mastero = 0 # highest ordinal in master file
|
mastero = 0 # highest ordinal in master file
|
||||||
symbolo = 0 # highest ordinal in png.h
|
symbolo = 0 # highest ordinal in png.h
|
||||||
missing = "error"# log an error on missing symbols
|
missing = "error"# log an error on missing symbols
|
||||||
|
of="symbols.new" # default to a fixed name
|
||||||
}
|
}
|
||||||
|
|
||||||
# Read existing definitions from the master file (the first
|
# Read existing definitions from the master file (the first
|
||||||
@ -111,6 +113,16 @@ END{
|
|||||||
err = 1
|
err = 1
|
||||||
}
|
}
|
||||||
unexported=0
|
unexported=0
|
||||||
|
# Add a standard header to symbols.new:
|
||||||
|
print ";Version INSERT-VERSION-HERE" >of
|
||||||
|
print ";--------------------------------------------------------------" >of
|
||||||
|
print "; LIBPNG symbol list as a Win32 DEF file" >of
|
||||||
|
print "; Contains all the symbols that can be exported from libpng" >of
|
||||||
|
print ";--------------------------------------------------------------" >of
|
||||||
|
print "LIBRARY" >of
|
||||||
|
print "" >of
|
||||||
|
print "EXPORTS" >of
|
||||||
|
|
||||||
for (o=1; o<=lasto; ++o) {
|
for (o=1; o<=lasto; ++o) {
|
||||||
if (symbol[o] == "" && removed[o] == "") {
|
if (symbol[o] == "" && removed[o] == "") {
|
||||||
if (unexported == 0) unexported = o
|
if (unexported == 0) unexported = o
|
||||||
@ -151,11 +163,11 @@ END{
|
|||||||
|
|
||||||
# Finally generate symbols.new
|
# Finally generate symbols.new
|
||||||
if (symbol[o] != "")
|
if (symbol[o] != "")
|
||||||
print " " symbol[o], "@" o > "symbols.new"
|
print " " symbol[o], "@" o > of
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
print "*** A new list is in symbols.new ***"
|
print "*** A new list is in", of, "***"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
180
scripts/dfn.awk
180
scripts/dfn.awk
@ -31,11 +31,11 @@ NR==1 && out == "/dev/null" {
|
|||||||
|
|
||||||
# Output can be sorted; two lines are recognized
|
# Output can be sorted; two lines are recognized
|
||||||
$1 == "PNG_DFN_START_SORT"{
|
$1 == "PNG_DFN_START_SORT"{
|
||||||
sort=$2
|
sort=0+$2
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
$1 == "PNG_DFN_END_SORT"{
|
$1 ~ /^PNG_DFN_END_SORT/{
|
||||||
# Do a very simple, slow, sort; notice that blank lines won't be
|
# Do a very simple, slow, sort; notice that blank lines won't be
|
||||||
# output by this
|
# output by this
|
||||||
for (entry in array) {
|
for (entry in array) {
|
||||||
@ -61,75 +61,143 @@ $1 == "PNG_DFN_END_SORT"{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/^[^"]*PNG_DFN *".*"[^"]*$/{
|
/^[^"]*PNG_DFN *".*"[^"]*$/{
|
||||||
# A definition line, apparently correctly formated, extract the
|
# A definition line, apparently correctly formated, extract the
|
||||||
# definition then replace any doubled "" that remain with a single
|
# definition then replace any doubled "" that remain with a single
|
||||||
# double quote. Notice that the original doubled double quotes
|
# double quote. Notice that the original doubled double quotes
|
||||||
# may have been split by tokenization
|
# may have been split by tokenization
|
||||||
orig=$0
|
#
|
||||||
|
# Sometimes GCC splits the PNG_DFN lines, we know this has happened
|
||||||
|
# if the quotes aren't closed and must read another line. In this
|
||||||
|
# case it is essential to reject lines that start '#' because those
|
||||||
|
# are introduced #line directives.
|
||||||
|
orig=$0
|
||||||
|
line=$0
|
||||||
|
lineno=FNR
|
||||||
|
if (lineno == "") lineno=NR
|
||||||
|
|
||||||
if (gsub(/^[^"]*PNG_DFN *"/,"") != 1 || gsub(/"[^"]*$/, "") != 1) {
|
if (sub(/^[^"]*PNG_DFN *"/,"",line) != 1) {
|
||||||
print "line", NR, "processing failed:"
|
print "line", lineno ": processing failed:"
|
||||||
print orig
|
print orig
|
||||||
print $0
|
|
||||||
err=1
|
err=1
|
||||||
} else {
|
next
|
||||||
|
} else {
|
||||||
++out_count
|
++out_count
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now examine quotes within the value:
|
# Now examine quotes within the value:
|
||||||
#
|
#
|
||||||
# @" - delete this and any following spaces
|
# @" - delete this and any following spaces
|
||||||
# "@ - delete this and any original spaces
|
# "@ - delete this and any preceding spaces
|
||||||
# @' - replace this by a double quote
|
# @' - replace this by a double quote
|
||||||
#
|
#
|
||||||
# This allows macro substitution by the C compiler thus:
|
# This allows macro substitution by the C compiler thus:
|
||||||
#
|
#
|
||||||
# #define first_name John
|
# #define first_name John
|
||||||
# #define last_name Smith
|
# #define last_name Smith
|
||||||
#
|
#
|
||||||
# PNG_DFN"#define name @'@" first_name "@ @" last_name "@@'"
|
# PNG_DFN"#define name @'@" first_name "@ @" last_name "@@'"
|
||||||
#
|
#
|
||||||
# Might get C preprocessed to:
|
# Might get C preprocessed to:
|
||||||
#
|
#
|
||||||
# PNG_DFN "#define foo @'@" John "@ @" Smith "@@'"
|
# PNG_DFN "#define foo @'@" John "@ @" Smith "@@'"
|
||||||
#
|
#
|
||||||
# Which this script reduces to:
|
# Which this script reduces to:
|
||||||
#
|
#
|
||||||
# #define name "John Smith"
|
# #define name "John Smith"
|
||||||
#
|
#
|
||||||
while (sub(/@" */, "")) {
|
while (1) {
|
||||||
if (!sub(/ *"@/, "")) {
|
# While there is an @" remove it and the next "@
|
||||||
print "unbalanced @\" ... \"@ pair"
|
if (line ~ /@"/) {
|
||||||
err=1
|
if (line ~ /@".*"@/) {
|
||||||
break
|
# Do this special case first to avoid swallowing extra spaces
|
||||||
}
|
# before or after the @ stuff:
|
||||||
}
|
if (!sub(/@" *"@/, "", line)) {
|
||||||
|
# Ok, do it in pieces - there has to be a non-space between the
|
||||||
|
# two. NOTE: really weird things happen if a leading @" is
|
||||||
|
# lost - the code will error out below (I believe).
|
||||||
|
if (!sub(/@" */, "", line) || !sub(/ *"@/, "", line)) {
|
||||||
|
print "line", lineno, ": internal error:", orig
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Put any needed double quotes in
|
# There is no matching "@. Assume a split line
|
||||||
gsub(/@'/,"\"")
|
else while (1) {
|
||||||
|
if (getline nextline) {
|
||||||
|
# If the line starts with '#' it is a preprocesor line directive
|
||||||
|
# from cc -E, skip it:
|
||||||
|
if (nextline !~ /^#/) {
|
||||||
|
line = line " " nextline
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
# This is end-of-input - probably a missig "@ on the first line:
|
||||||
|
print "line", lineno ": unbalanced @\" ... \"@ pair"
|
||||||
|
err=1
|
||||||
|
next
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Remove any trailing spaces (not really required, but for
|
# Keep going until all the @" have gone
|
||||||
# editorial consistency
|
continue
|
||||||
sub(/ *$/, "")
|
}
|
||||||
|
|
||||||
if (sort)
|
# Attempt to remove a trailing " (not preceded by '@') - if this can
|
||||||
array[$(sort)] = $0
|
# be done stop now, if not assume a split line again
|
||||||
|
if (sub(/"[^"]*$/, "", line))
|
||||||
|
break
|
||||||
|
|
||||||
else
|
# Read another line
|
||||||
print $0 >out
|
while (1) {
|
||||||
next
|
if (getline nextline) {
|
||||||
|
if (nextline !~ /^#/) {
|
||||||
|
line = line " " nextline
|
||||||
|
# Go back to stripping @" "@ pairs
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print "line", lineno ": unterminated PNG_DFN string"
|
||||||
|
err=1
|
||||||
|
next
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Put any needed double quotes in (at the end, because these would otherwise
|
||||||
|
# interfere with the processing above.)
|
||||||
|
gsub(/@'/,"\"", line)
|
||||||
|
|
||||||
|
# Remove any trailing spaces (not really required, but for
|
||||||
|
# editorial consistency
|
||||||
|
sub(/ *$/, "", line)
|
||||||
|
|
||||||
|
# Remove trailing CR
|
||||||
|
sub(/
$/, "", line)
|
||||||
|
|
||||||
|
if (sort) {
|
||||||
|
if (split(line, parts) < sort) {
|
||||||
|
print "line", lineno ": missing sort field:", line
|
||||||
|
err=1
|
||||||
|
} else
|
||||||
|
array[parts[sort]] = line
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
print line >out
|
||||||
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
/PNG_DFN/{
|
/PNG_DFN/{
|
||||||
print "line", NR, "incorrectly formated PNG_DFN line:"
|
print "line", NR, "incorrectly formated PNG_DFN line:"
|
||||||
print $0
|
print $0
|
||||||
err = 1
|
err = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
END{
|
END{
|
||||||
if (out_count > 0 || err > 0)
|
if (out_count > 0 || err > 0)
|
||||||
exit err
|
exit err
|
||||||
|
|
||||||
print "no definition lines found"
|
print "no definition lines found"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
# Modeled after libxml-config.
|
# Modeled after libxml-config.
|
||||||
|
|
||||||
version=1.5.15beta06
|
version=1.5.16beta06
|
||||||
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.15beta06
|
Version: 1.5.16beta06
|
||||||
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 = 15
|
VERMIC = 16
|
||||||
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
||||||
NAME = libpng
|
NAME = libpng
|
||||||
PACKAGE = $(NAME)-$(VER)
|
PACKAGE = $(NAME)-$(VER)
|
||||||
|
@ -26,19 +26,24 @@ SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
|
|||||||
libpng/pngconf.h ${INCSDIR}/../pngconf.h \
|
libpng/pngconf.h ${INCSDIR}/../pngconf.h \
|
||||||
libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
|
libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
|
||||||
|
|
||||||
LDADD+= -lm -lz
|
# where make install finds libz.a and zlib.h
|
||||||
#LDADD+= -lm -lz -lssp_nonshared # for OSVERSION >= 800000 ?
|
ZLIBLIB= /usr/lib
|
||||||
|
ZLIBINC= /usr/include
|
||||||
|
|
||||||
|
LDADD+= -lm -lz
|
||||||
|
#LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ?
|
||||||
|
|
||||||
DPADD+= ${LIBM} ${LIBZ}
|
DPADD+= ${LIBM} ${LIBZ}
|
||||||
|
|
||||||
CFLAGS+= -I.
|
CFLAGS+= -I. -I${ZLIBINC}
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
pngtest: pngtest.o libpng.a
|
pngtest: pngtest.o libpng.a
|
||||||
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
|
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
|
||||||
|
-lpng ${LDADD}
|
||||||
|
|
||||||
CLEANFILES= pngtest pngtest.o pngout.png
|
CLEANFILES= pngtest pngtest.o pngout.png
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng15
|
LIBNAME = libpng15
|
||||||
PNGMAJ = 15
|
PNGMAJ = 15
|
||||||
RELEASE = 15
|
RELEASE = 16
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).so
|
LIBSO=$(LIBNAME).so
|
||||||
|
@ -18,7 +18,7 @@ exec_prefix=$(prefix)
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng15
|
LIBNAME = libpng15
|
||||||
PNGMAJ = 15
|
PNGMAJ = 15
|
||||||
RELEASE = 15
|
RELEASE = 16
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).dll
|
LIBSO=$(LIBNAME).dll
|
||||||
|
@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng15
|
|||||||
|
|
||||||
LIB= png15
|
LIB= png15
|
||||||
SHLIB_MAJOR= 0
|
SHLIB_MAJOR= 0
|
||||||
SHLIB_MINOR= 1.5.15beta06
|
SHLIB_MINOR= 1.5.16beta06
|
||||||
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.15beta06
|
SHLIB_MINOR= 1.5.16beta06
|
||||||
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.15beta06
|
SHLIB_MINOR= 1.5.16beta06
|
||||||
|
|
||||||
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 \
|
||||||
|
@ -53,7 +53,7 @@ BEGIN{
|
|||||||
comment=start "/*" # Comment start
|
comment=start "/*" # Comment start
|
||||||
cend="*/" end # Comment end
|
cend="*/" end # Comment end
|
||||||
def=start "#define PNG_" # Arbitrary define
|
def=start "#define PNG_" # Arbitrary define
|
||||||
sup="_SUPPORTED 1" end # end supported option
|
sup="_SUPPORTED" end # end supported option
|
||||||
und=comment "#undef PNG_" # Unsupported option
|
und=comment "#undef PNG_" # Unsupported option
|
||||||
une="_SUPPORTED" cend # end unsupported option
|
une="_SUPPORTED" cend # end unsupported option
|
||||||
error=start "ERROR:" # error message, terminate with 'end'
|
error=start "ERROR:" # error message, terminate with 'end'
|
||||||
@ -64,11 +64,15 @@ BEGIN{
|
|||||||
logunsupported=0 # write unsupported options too
|
logunsupported=0 # write unsupported options too
|
||||||
|
|
||||||
# Precreate arrays
|
# Precreate arrays
|
||||||
|
# for each option:
|
||||||
option[""] = "" # list of all options: default enabled/disabled
|
option[""] = "" # list of all options: default enabled/disabled
|
||||||
done[""] = 1 # marks option as having been output
|
done[""] = 1 # marks option as having been output
|
||||||
requires[""] = "" # requires by option
|
requires[""] = "" # requires by option
|
||||||
iffs[""] = "" # if by option
|
iffs[""] = "" # if by option
|
||||||
enabledby[""] = "" # options that enable it by option
|
enabledby[""] = "" # options that enable it by option
|
||||||
|
sets[""] = "" # settings set by each option
|
||||||
|
setval[""] = "" # value to set (indexed: 'option sets[option]')
|
||||||
|
# for each setting:
|
||||||
setting[""] = "" # requires by setting
|
setting[""] = "" # requires by setting
|
||||||
defaults[""] = "" # used for a defaulted value
|
defaults[""] = "" # used for a defaulted value
|
||||||
doneset[""] = 1 # marks setting as having been output
|
doneset[""] = 1 # marks setting as having been output
|
||||||
@ -200,7 +204,7 @@ $1 == "com"{
|
|||||||
if (NF > 1) {
|
if (NF > 1) {
|
||||||
# sub(/^[ ]*com[ ]*/, "")
|
# sub(/^[ ]*com[ ]*/, "")
|
||||||
$1 = ""
|
$1 = ""
|
||||||
print comment, $0, cend >out
|
print comment $0, cend >out
|
||||||
} else
|
} else
|
||||||
print start end >out
|
print start end >out
|
||||||
next
|
next
|
||||||
@ -237,7 +241,9 @@ $1 == "file" && NF >= 2{
|
|||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
# option NAME ( (requires|enables|if) NAME* | on | off | disabled )*
|
# option NAME ( (requires|enables|if) NAME* | on | off | disabled |
|
||||||
|
# sets SETTING VALUE+ )*
|
||||||
|
#
|
||||||
# Declares an option 'NAME' and describes its default setting (disabled)
|
# Declares an option 'NAME' and describes its default setting (disabled)
|
||||||
# and its relationship to other options. The option is disabled
|
# and its relationship to other options. The option is disabled
|
||||||
# unless *all* the options listed after 'requires' are set and at
|
# unless *all* the options listed after 'requires' are set and at
|
||||||
@ -252,95 +258,152 @@ $1 == "file" && NF >= 2{
|
|||||||
# be later) entry may turn an option on or off explicitly.
|
# be later) entry may turn an option on or off explicitly.
|
||||||
|
|
||||||
$1 == "option" && NF >= 2{
|
$1 == "option" && NF >= 2{
|
||||||
onoff = option[$2] # records current (and the default is "", enabled)
|
opt = $2
|
||||||
|
sub(/,$/,"",opt)
|
||||||
|
onoff = option[opt] # records current (and the default is "", enabled)
|
||||||
key = ""
|
key = ""
|
||||||
for (i=3; i<=NF; ++i) {
|
istart = 3
|
||||||
if ($(i) == "on" || $(i) == "off" || $(i) == "disabled") {
|
do {
|
||||||
key = ""
|
if (istart == 1) { # continuation line
|
||||||
if (onoff != $(i)) {
|
val = getline
|
||||||
# on or off can zap disabled or enabled:
|
|
||||||
if (onoff == "" || (onoff == "disabled" || onoff == "enabled") && ($(i) == "on" || $(i) == "off")) {
|
if (val != 1) { # error reading it
|
||||||
# It's easy to mis-spell the option when turning it
|
if (val == 0)
|
||||||
# on or off, so warn about it here:
|
print "option", opt ": ERROR: missing contination line"
|
||||||
if (onoff == "" && ($(i) == "on" || $(i) == "off")) {
|
else
|
||||||
print $2 ": ERROR: turning unrecognized option", $(i)
|
print "option", opt ": ERROR: error reading continuation line"
|
||||||
# For the moment error out - it is safer
|
|
||||||
err = 1 # prevent END{} running
|
# This is a hard error
|
||||||
exit 1
|
err = 1 # prevent END{} running
|
||||||
}
|
exit 1
|
||||||
onoff = $(i)
|
|
||||||
} else {
|
|
||||||
# Print a message, otherwise the error
|
|
||||||
# below is incomprehensible
|
|
||||||
print $2 ": currently", onoff ": attempt to turn", $(i)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if ($(i) == "requires" || $(i) == "if" || $(i) == "enables") {
|
}
|
||||||
key = $(i)
|
|
||||||
} else if (key == "requires") {
|
for (i=istart; i<=NF; ++i) {
|
||||||
requires[$2] = requires[$2] " " $(i)
|
val=$(i)
|
||||||
} else if (key == "if") {
|
sub(/,$/,"",val)
|
||||||
iffs[$2] = iffs[$2] " " $(i)
|
if (val == "on" || val == "off" || val == "disabled") {
|
||||||
} else if (key == "enables") {
|
key = ""
|
||||||
enabledby[$(i)] = enabledby[$(i)] " " $2
|
if (onoff != val) {
|
||||||
} else
|
# on or off can zap disabled or enabled:
|
||||||
break # bad line format
|
if (onoff == "" || (onoff == "disabled" || onoff == "enabled") &&
|
||||||
}
|
(val == "on" || val == "off")) {
|
||||||
|
# It's easy to mis-spell the option when turning it
|
||||||
|
# on or off, so warn about it here:
|
||||||
|
if (onoff == "" && (val == "on" || val == "off")) {
|
||||||
|
print "option", opt ": ERROR: turning unrecognized option", val
|
||||||
|
# For the moment error out - it is safer
|
||||||
|
err = 1 # prevent END{} running
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
onoff = val
|
||||||
|
} else {
|
||||||
|
# Print a message, otherwise the error
|
||||||
|
# below is incomprehensible
|
||||||
|
print "option", opt ": currently", onoff ": attempt to turn", val
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (val == "requires" || val == "if" || val == "enables" || val =="sets") {
|
||||||
|
key = val
|
||||||
|
} else if (key == "requires") {
|
||||||
|
requires[opt] = requires[opt] " " val
|
||||||
|
} else if (key == "if") {
|
||||||
|
iffs[opt] = iffs[opt] " " val
|
||||||
|
} else if (key == "enables") {
|
||||||
|
enabledby[val] = enabledby[val] " " opt
|
||||||
|
} else if (key == "sets") {
|
||||||
|
sets[opt] = sets[opt] " " val
|
||||||
|
key = "setval"
|
||||||
|
set = val
|
||||||
|
} else if (key == "setval") {
|
||||||
|
setval[opt " " set] = setval[opt " " set] " " val
|
||||||
|
} else
|
||||||
|
break # bad line format
|
||||||
|
}
|
||||||
|
|
||||||
|
istart = 1
|
||||||
|
} while (i > NF && $0 ~ /,$/)
|
||||||
|
|
||||||
if (i > NF) {
|
if (i > NF) {
|
||||||
# Set the option, defaulting to 'enabled'
|
# Set the option, defaulting to 'enabled'
|
||||||
if (onoff == "") onoff = "enabled"
|
if (onoff == "") onoff = "enabled"
|
||||||
option[$2] = onoff
|
option[opt] = onoff
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
# Else fall through to the error handler
|
# Else fall through to the error handler
|
||||||
}
|
}
|
||||||
|
|
||||||
# chunk NAME [requires OPT] [on|off|disabled]
|
# chunk NAME [requires OPT] [enables LIST] [on|off|disabled]
|
||||||
# Expands to the 'option' settings appropriate to the reading and
|
# Expands to the 'option' settings appropriate to the reading and
|
||||||
# writing of an ancilliary PNG chunk 'NAME':
|
# writing of an ancilliary PNG chunk 'NAME':
|
||||||
#
|
#
|
||||||
# option READ_NAME requires READ_ANCILLARY_CHUNKS [READ_OPT]
|
# option READ_NAME requires READ_ANCILLARY_CHUNKS [READ_OPT]
|
||||||
# option READ_NAME enables NAME
|
# option READ_NAME enables NAME LIST
|
||||||
# [option READ_NAME off]
|
# [option READ_NAME off]
|
||||||
# option WRITE_NAME requires WRITE_ANCILLARY_CHUNKS [WRITE_OPT]
|
# option WRITE_NAME requires WRITE_ANCILLARY_CHUNKS [WRITE_OPT]
|
||||||
# option WRITE_NAME enables NAME
|
# option WRITE_NAME enables NAME LIST
|
||||||
# [option WRITE_NAME off]
|
# [option WRITE_NAME off]
|
||||||
|
|
||||||
pre != 0 && $1 == "chunk" && NF >= 2{
|
pre != 0 && $1 == "chunk" && NF >= 2{
|
||||||
# 'chunk' is handled on the first pass by writing appropriate
|
# 'chunk' is handled on the first pass by writing appropriate
|
||||||
# 'option' lines into the intermediate file.
|
# 'option' lines into the intermediate file.
|
||||||
|
opt = $2
|
||||||
|
sub(/,$/,"",opt)
|
||||||
onoff = ""
|
onoff = ""
|
||||||
reqread = ""
|
reqread = ""
|
||||||
reqwrite = ""
|
reqwrite = ""
|
||||||
i = 3 # indicates format error
|
enables = ""
|
||||||
if (NF > 2) {
|
req = 0
|
||||||
|
istart = 3
|
||||||
|
do {
|
||||||
|
if (istart == 1) { # continuation line
|
||||||
|
val = getline
|
||||||
|
|
||||||
|
if (val != 1) { # error reading it
|
||||||
|
if (val == 0)
|
||||||
|
print "chunk", opt ": ERROR: missing contination line"
|
||||||
|
else
|
||||||
|
print "chunk", opt ": ERROR: error reading continuation line"
|
||||||
|
|
||||||
|
# This is a hard error
|
||||||
|
err = 1 # prevent END{} running
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# read the keywords/additional OPTS
|
# read the keywords/additional OPTS
|
||||||
req = 0
|
for (i=istart; i<=NF; ++i) {
|
||||||
for (i=3; i<=NF; ++i) {
|
val = $(i)
|
||||||
if ($(i) == "on" || $(i) == "off" || $(i) == "disabled") {
|
sub(/,$/,"",val)
|
||||||
if (onoff != $(i)) {
|
if (val == "on" || val == "off" || val == "disabled") {
|
||||||
|
if (onoff != val) {
|
||||||
if (onoff == "")
|
if (onoff == "")
|
||||||
onoff = $(i)
|
onoff = val
|
||||||
else
|
else
|
||||||
break # on/off conflict
|
break # on/off conflict
|
||||||
}
|
}
|
||||||
} else if ($(i) == "requires")
|
req = 0
|
||||||
|
} else if (val == "requires")
|
||||||
req = 1
|
req = 1
|
||||||
else if (req != 1)
|
else if (val == "enables")
|
||||||
|
req = 2
|
||||||
|
else if (req == 1){
|
||||||
|
reqread = reqread " READ_" val
|
||||||
|
reqwrite = reqwrite " WRITE_" val
|
||||||
|
} else if (req == 2)
|
||||||
|
enables = enables " " val
|
||||||
|
else
|
||||||
break # bad line: handled below
|
break # bad line: handled below
|
||||||
else {
|
|
||||||
reqread = reqread " READ_" $(i)
|
|
||||||
reqwrite = reqwrite " WRITE_" $(i)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
istart = 1
|
||||||
|
} while (i > NF && $0 ~ /,$/)
|
||||||
|
|
||||||
if (i > NF) {
|
if (i > NF) {
|
||||||
# Output new 'option' lines to the intermediate file (out)
|
# Output new 'option' lines to the intermediate file (out)
|
||||||
print "option READ_" $2, "requires READ_ANCILLARY_CHUNKS" reqread, "enables", $2, onoff >out
|
print "option READ_" opt, "requires READ_ANCILLARY_CHUNKS" reqread, "enables", opt enables , onoff >out
|
||||||
print "option WRITE_" $2, "requires WRITE_ANCILLARY_CHUNKS" reqwrite, "enables", $2, onoff >out
|
print "option WRITE_" opt, "requires WRITE_ANCILLARY_CHUNKS" reqwrite, "enables", opt enables, onoff >out
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
# Else hit the error handler below - bad line format!
|
# Else hit the error handler below - bad line format!
|
||||||
@ -471,83 +534,7 @@ END{
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Do the 'setting' values first, the algorithm the standard
|
# Do the options first (allowing options to set settings). The dependency
|
||||||
# tree walk (O(1)) done in an O(2) while/for loop; interations
|
|
||||||
# settings x depth, outputing the deepest required macros
|
|
||||||
# first.
|
|
||||||
print "" >out
|
|
||||||
print "/* SETTINGS */" >out
|
|
||||||
print comment, "settings", cend >out
|
|
||||||
# Sort (in dfn.awk) on field 2, the setting name
|
|
||||||
print "PNG_DFN_START_SORT 2" >out
|
|
||||||
finished = 0
|
|
||||||
while (!finished) {
|
|
||||||
finished = 1
|
|
||||||
movement = 0 # done nothing
|
|
||||||
for (i in setting) if (!doneset[i]) {
|
|
||||||
nreqs = split(setting[i], r)
|
|
||||||
if (nreqs > 0) {
|
|
||||||
for (j=1; j<=nreqs; ++j) if (!doneset[r[j]]) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if (j<=nreqs) {
|
|
||||||
finished = 0
|
|
||||||
continue # try a different setting
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# All the requirements have been processed, output
|
|
||||||
# this setting.
|
|
||||||
if (deb) print "setting", i
|
|
||||||
deflt = defaults[i]
|
|
||||||
# A leading @ means leave it unquoted so the preprocessor
|
|
||||||
# can substitute the build time value
|
|
||||||
if (deflt ~ /^ @/)
|
|
||||||
deflt = " " subs substr(deflt, 3) sube
|
|
||||||
# Remove any spurious trailing spaces
|
|
||||||
sub(/ *$/,"",deflt)
|
|
||||||
print "" >out
|
|
||||||
print "/* setting: ", i >out
|
|
||||||
print " * requires:" setting[i] >out
|
|
||||||
print " * default: ", defaults[i] defltinfo, "*/" >out
|
|
||||||
if (defaults[i] == "") { # no default, only check if defined
|
|
||||||
print "#ifdef PNG_" i >out
|
|
||||||
}
|
|
||||||
for (j=1; j<=nreqs; ++j) {
|
|
||||||
print "# ifndef PNG_" r[j] >out
|
|
||||||
print error, i, "requires", r[j] end >out
|
|
||||||
print "# endif" >out
|
|
||||||
}
|
|
||||||
if (defaults[i] != "") { # default handling
|
|
||||||
print "#ifdef PNG_" i >out
|
|
||||||
}
|
|
||||||
# PNG_<i> is defined, so substitute the value:
|
|
||||||
print def i, subs "PNG_" i sube end >out
|
|
||||||
if (defaults[i] != "") {
|
|
||||||
print "#else /*default*/" >out
|
|
||||||
# And add the default definition for the benefit
|
|
||||||
# of later settings an options test:
|
|
||||||
print "# define PNG_" i deflt >out
|
|
||||||
print def i deflt end >out
|
|
||||||
}
|
|
||||||
print "#endif" >out
|
|
||||||
|
|
||||||
doneset[i] = 1
|
|
||||||
++movement
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!finished && !movement) {
|
|
||||||
print "setting: loop or missing setting in 'requires', cannot process:"
|
|
||||||
for (i in setting) if (!doneset[i]) {
|
|
||||||
print " setting", i, "requires" setting[i]
|
|
||||||
}
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print "PNG_DFN_END_SORT" >out
|
|
||||||
print comment, "end of settings", cend >out
|
|
||||||
|
|
||||||
# Now do the options - somewhat more complex. The dependency
|
|
||||||
# tree is thus:
|
# tree is thus:
|
||||||
#
|
#
|
||||||
# name > name
|
# name > name
|
||||||
@ -639,7 +626,7 @@ END{
|
|||||||
}
|
}
|
||||||
if (err) exit 1
|
if (err) exit 1
|
||||||
|
|
||||||
# Sort options too
|
# Sort options:
|
||||||
print "PNG_DFN_START_SORT 2" >out
|
print "PNG_DFN_START_SORT 2" >out
|
||||||
|
|
||||||
# option[i] is now the complete list of all the tokens we may
|
# option[i] is now the complete list of all the tokens we may
|
||||||
@ -679,8 +666,9 @@ END{
|
|||||||
print "" >out
|
print "" >out
|
||||||
print "/* option:", i, option[i] >out
|
print "/* option:", i, option[i] >out
|
||||||
print " * requires: " requires[i] >out
|
print " * requires: " requires[i] >out
|
||||||
print " * if: " iffs[i] >out
|
print " * if: " iffs[i] >out
|
||||||
print " * enabled-by:" enabledby[i], "*/" >out
|
print " * enabled-by:" enabledby[i] >out
|
||||||
|
print " * sets: " sets[i], "*/" >out
|
||||||
print "#undef PNG_on" >out
|
print "#undef PNG_on" >out
|
||||||
print "#define PNG_on 1" >out
|
print "#define PNG_on 1" >out
|
||||||
|
|
||||||
@ -763,6 +751,21 @@ END{
|
|||||||
print error, i, "is on: enabled by:" iffs[i] enabledby[i] ", requires" requires[i] end >out
|
print error, i, "is on: enabled by:" iffs[i] enabledby[i] ", requires" requires[i] end >out
|
||||||
} else if (i !~ /^ok_/) {
|
} else if (i !~ /^ok_/) {
|
||||||
print def i sup >out
|
print def i sup >out
|
||||||
|
# Supported option, set required settings
|
||||||
|
nreqs = split(sets[i], r)
|
||||||
|
for (j=1; j<=nreqs; ++j) {
|
||||||
|
print "# ifdef PNG_set_" r[j] >out
|
||||||
|
# Some other option has already set a value:
|
||||||
|
print error, i, "sets", r[j] ": duplicate setting" end >out
|
||||||
|
print error, " previous value: " end "PNG_set_" r[j] >out
|
||||||
|
print "# else" >out
|
||||||
|
# Else set the default: note that this won't accept arbitrary
|
||||||
|
# values, the setval string must be acceptable to all the C
|
||||||
|
# compilers we use. That means it must be VERY simple; a number,
|
||||||
|
# a name or a string.
|
||||||
|
print "# define PNG_set_" r[j], setval[i " " r[j]] >out
|
||||||
|
print "# endif" >out
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print "# endif /* definition */" >out
|
print "# endif /* definition */" >out
|
||||||
print "#endif /*requires, if*/" >out
|
print "#endif /*requires, if*/" >out
|
||||||
@ -796,6 +799,93 @@ END{
|
|||||||
print "PNG_DFN_END_SORT" >out
|
print "PNG_DFN_END_SORT" >out
|
||||||
print comment, "end of options", cend >out
|
print comment, "end of options", cend >out
|
||||||
|
|
||||||
|
# Do the 'setting' values second, the algorithm the standard
|
||||||
|
# tree walk (O(1)) done in an O(2) while/for loop; interations
|
||||||
|
# settings x depth, outputing the deepest required macros
|
||||||
|
# first.
|
||||||
|
print "" >out
|
||||||
|
print "/* SETTINGS */" >out
|
||||||
|
print comment, "settings", cend >out
|
||||||
|
# Sort (in dfn.awk) on field 2, the setting name
|
||||||
|
print "PNG_DFN_START_SORT 2" >out
|
||||||
|
finished = 0
|
||||||
|
while (!finished) {
|
||||||
|
finished = 1
|
||||||
|
movement = 0 # done nothing
|
||||||
|
for (i in setting) if (!doneset[i]) {
|
||||||
|
nreqs = split(setting[i], r)
|
||||||
|
if (nreqs > 0) {
|
||||||
|
# By default assume the requires values are options, but if there
|
||||||
|
# is no option with that name check for a setting
|
||||||
|
for (j=1; j<=nreqs; ++j) if (option[r[j]] == "" && !doneset[r[j]]) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (j<=nreqs) {
|
||||||
|
finished = 0
|
||||||
|
continue # try a different setting
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# All the requirements have been processed, output
|
||||||
|
# this setting.
|
||||||
|
if (deb) print "setting", i
|
||||||
|
deflt = defaults[i]
|
||||||
|
# Remove any spurious trailing spaces
|
||||||
|
sub(/ *$/,"",deflt)
|
||||||
|
# A leading @ means leave it unquoted so the preprocessor
|
||||||
|
# can substitute the build time value
|
||||||
|
if (deflt ~ /^ @/)
|
||||||
|
deflt = " " subs substr(deflt, 3) sube
|
||||||
|
print "" >out
|
||||||
|
print "/* setting: ", i >out
|
||||||
|
print " * requires:" setting[i] >out
|
||||||
|
print " * default: ", defaults[i] deflt, "*/" >out
|
||||||
|
for (j=1; j<=nreqs; ++j) {
|
||||||
|
if (option[r[j]] != "")
|
||||||
|
print "#ifndef PNG_" r[j] "_SUPPORTED" >out
|
||||||
|
else
|
||||||
|
print "#ifndef PNG_" r[j] >out
|
||||||
|
print error, i, "requires", r[j] end >out
|
||||||
|
print "# endif" >out
|
||||||
|
}
|
||||||
|
# The precedence is:
|
||||||
|
#
|
||||||
|
# 1) External definition; trumps:
|
||||||
|
# 2) Option 'sets' value; trumps:
|
||||||
|
# 3) Setting 'default'
|
||||||
|
#
|
||||||
|
print "#ifdef PNG_" i >out
|
||||||
|
# PNG_<i> is defined, so substitute the value:
|
||||||
|
print def i, subs "PNG_" i sube end >out
|
||||||
|
print "#else /* use default */" >out
|
||||||
|
print "# ifdef PNG_set_" i >out
|
||||||
|
# Value from an option 'sets' argument
|
||||||
|
print def i, subs "PNG_set_" i sube end >out
|
||||||
|
# This is so that subsequent tests on the setting work:
|
||||||
|
print "# define PNG_" i, "1" >out
|
||||||
|
if (defaults[i] != "") {
|
||||||
|
print "# else /*default*/" >out
|
||||||
|
print def i deflt end >out
|
||||||
|
print "# define PNG_" i, "1" >out
|
||||||
|
}
|
||||||
|
print "# endif /* defaults */" >out
|
||||||
|
print "#endif /* setting", i, "*/" >out
|
||||||
|
|
||||||
|
doneset[i] = 1
|
||||||
|
++movement
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!finished && !movement) {
|
||||||
|
print "setting: loop or missing setting in 'requires', cannot process:"
|
||||||
|
for (i in setting) if (!doneset[i]) {
|
||||||
|
print " setting", i, "requires" setting[i]
|
||||||
|
}
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print "PNG_DFN_END_SORT" >out
|
||||||
|
print comment, "end of settings", cend >out
|
||||||
|
|
||||||
# Regular end - everything looks ok
|
# Regular end - everything looks ok
|
||||||
if (protect != "") {
|
if (protect != "") {
|
||||||
print start "#endif", "/*", protect, "*/" end >out
|
print start "#endif", "/*", protect, "*/" end >out
|
||||||
|
@ -27,7 +27,7 @@ file pnglibconf.h scripts/pnglibconf.dfa PNGLCONF_H
|
|||||||
# The syntax is detailed in scripts/options.awk, this is a summary
|
# The syntax is detailed in scripts/options.awk, this is a summary
|
||||||
# only:
|
# only:
|
||||||
#
|
#
|
||||||
# setting <name> [default]
|
# setting <name> [requires ...] [default]
|
||||||
# #define PNG_<name> <value> /* value comes from current setting */
|
# #define PNG_<name> <value> /* value comes from current setting */
|
||||||
# option <name> [requires ...] [if ...] [enables ...] [disabled]
|
# option <name> [requires ...] [if ...] [enables ...] [disabled]
|
||||||
# #define PNG_<name>_SUPPORTED if the requirements are met and
|
# #define PNG_<name>_SUPPORTED if the requirements are met and
|
||||||
@ -191,12 +191,23 @@ option WRITE enables WRITE_INT_FUNCTIONS
|
|||||||
|
|
||||||
setting FILTER_OPTIMIZATIONS
|
setting FILTER_OPTIMIZATIONS
|
||||||
|
|
||||||
# This option turns on runtime checks for ARM NEON support, it is irrelevant
|
# Implementation specific control of the optimizations, enabled by those
|
||||||
# on other platforms and it is irrelevant unless NEON code is turned on. Checks
|
# hardware or software options that need it (typically when run-time choices
|
||||||
# are on by default
|
# must be made by the user)
|
||||||
|
option SET_OPTION disabled
|
||||||
option ARM_NEON_CHECK
|
|
||||||
|
# These options are specific to the ARM NEON hardware optimizations:
|
||||||
|
#
|
||||||
|
# ARM_NEON: the optimization itself
|
||||||
|
# ARM_NEON_API: allow the optimization to be switched on with png_set_hardware
|
||||||
|
# ARM_NEON_CHECK: compile a run-time check to see if Neon extensions are
|
||||||
|
# supported, this is poorly supported and deprectated - use the
|
||||||
|
# png_set_hardware API.
|
||||||
|
option ARM_NEON disabled,
|
||||||
|
sets FILTER_OPTIMIZATIONS png_init_filter_functions_neon
|
||||||
|
option ARM_NEON_API disabled enables SET_OPTION ARM_NEON
|
||||||
|
option ARM_NEON_CHECK disabled enables ARM_NEON
|
||||||
|
|
||||||
# Generic options - affect both read and write.
|
# Generic options - affect both read and write.
|
||||||
|
|
||||||
option WARNINGS
|
option WARNINGS
|
||||||
@ -369,6 +380,12 @@ option INCH_CONVERSIONS
|
|||||||
|
|
||||||
option BUILD_GRAYSCALE_PALETTE
|
option BUILD_GRAYSCALE_PALETTE
|
||||||
|
|
||||||
|
# This changes the default for the ARM NEON optimizations according to
|
||||||
|
# __ARM_NEON__
|
||||||
|
@#ifdef __ARM_NEON__
|
||||||
|
@# define PNG_ARM_NEON_SUPPORTED
|
||||||
|
@#endif
|
||||||
|
|
||||||
# IN DEVELOPMENT
|
# IN DEVELOPMENT
|
||||||
# These are currently experimental features; define them if you want
|
# These are currently experimental features; define them if you want
|
||||||
|
|
||||||
|
@ -1,25 +1,176 @@
|
|||||||
|
/* 1.5.16beta06 STANDARD API DEFINITION */
|
||||||
/* libpng STANDARD API DEFINITION */
|
|
||||||
|
|
||||||
/* pnglibconf.h - library build configuration */
|
/* pnglibconf.h - library build configuration */
|
||||||
|
|
||||||
/* Libpng 1.5.15beta06 - February 22, 2013 */
|
/* libpng version 1.5.16beta06 - May 12, 2013 */
|
||||||
|
|
||||||
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
|
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
||||||
|
|
||||||
/* 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 */
|
||||||
/* and license in png.h */
|
/* and license in png.h */
|
||||||
|
|
||||||
/* pnglibconf.h */
|
/* pnglibconf.h */
|
||||||
|
/* Machine generated file: DO NOT EDIT */
|
||||||
/* Derived from: scripts/pnglibconf.dfa */
|
/* Derived from: scripts/pnglibconf.dfa */
|
||||||
/* If you edit this file by hand you must obey the rules expressed in */
|
|
||||||
/* pnglibconf.dfa with respect to the dependencies between the following */
|
|
||||||
/* symbols. It is much better to generate a new file using */
|
|
||||||
/* scripts/libpngconf.mak */
|
|
||||||
|
|
||||||
#ifndef PNGLCONF_H
|
#ifndef PNGLCONF_H
|
||||||
#define PNGLCONF_H
|
#define PNGLCONF_H
|
||||||
|
/* options */
|
||||||
|
#define PNG_16BIT_SUPPORTED
|
||||||
|
#define PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
|
/*#undef PNG_ARM_NEON_API_SUPPORTED*/
|
||||||
|
/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
|
||||||
|
/*#undef PNG_ARM_NEON_SUPPORTED*/
|
||||||
|
#define PNG_BENIGN_ERRORS_SUPPORTED
|
||||||
|
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
||||||
|
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
#define PNG_CHECK_cHRM_SUPPORTED
|
||||||
|
#define PNG_CONSOLE_IO_SUPPORTED
|
||||||
|
#define PNG_CONVERT_tIME_SUPPORTED
|
||||||
|
#define PNG_EASY_ACCESS_SUPPORTED
|
||||||
|
/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
|
||||||
|
#define PNG_ERROR_TEXT_SUPPORTED
|
||||||
|
#define PNG_FIXED_POINT_SUPPORTED
|
||||||
|
#define PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||||
|
#define PNG_FLOATING_POINT_SUPPORTED
|
||||||
|
#define PNG_GET_PALETTE_MAX_SUPPORTED
|
||||||
|
#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||||
|
#define PNG_INCH_CONVERSIONS_SUPPORTED
|
||||||
|
#define PNG_INFO_IMAGE_SUPPORTED
|
||||||
|
#define PNG_IO_STATE_SUPPORTED
|
||||||
|
#define PNG_MNG_FEATURES_SUPPORTED
|
||||||
|
#define PNG_POINTER_INDEXING_SUPPORTED
|
||||||
|
#define PNG_PROGRESSIVE_READ_SUPPORTED
|
||||||
|
#define PNG_READ_16BIT_SUPPORTED
|
||||||
|
#define PNG_READ_ALPHA_MODE_SUPPORTED
|
||||||
|
#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
|
||||||
|
#define PNG_READ_BACKGROUND_SUPPORTED
|
||||||
|
#define PNG_READ_BGR_SUPPORTED
|
||||||
|
#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||||
|
#define PNG_READ_COMPRESSED_TEXT_SUPPORTED
|
||||||
|
#define PNG_READ_EXPAND_16_SUPPORTED
|
||||||
|
#define PNG_READ_EXPAND_SUPPORTED
|
||||||
|
#define PNG_READ_FILLER_SUPPORTED
|
||||||
|
#define PNG_READ_GAMMA_SUPPORTED
|
||||||
|
#define PNG_READ_GET_PALETTE_MAX_SUPPORTED
|
||||||
|
#define PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||||
|
#define PNG_READ_INTERLACING_SUPPORTED
|
||||||
|
#define PNG_READ_INT_FUNCTIONS_SUPPORTED
|
||||||
|
#define PNG_READ_INVERT_ALPHA_SUPPORTED
|
||||||
|
#define PNG_READ_INVERT_SUPPORTED
|
||||||
|
#define PNG_READ_OPT_PLTE_SUPPORTED
|
||||||
|
#define PNG_READ_PACKSWAP_SUPPORTED
|
||||||
|
#define PNG_READ_PACK_SUPPORTED
|
||||||
|
#define PNG_READ_QUANTIZE_SUPPORTED
|
||||||
|
#define PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||||
|
#define PNG_READ_SCALE_16_TO_8_SUPPORTED
|
||||||
|
#define PNG_READ_SHIFT_SUPPORTED
|
||||||
|
#define PNG_READ_STRIP_16_TO_8_SUPPORTED
|
||||||
|
#define PNG_READ_STRIP_ALPHA_SUPPORTED
|
||||||
|
#define PNG_READ_SUPPORTED
|
||||||
|
#define PNG_READ_SWAP_ALPHA_SUPPORTED
|
||||||
|
#define PNG_READ_SWAP_SUPPORTED
|
||||||
|
#define PNG_READ_TEXT_SUPPORTED
|
||||||
|
#define PNG_READ_TRANSFORMS_SUPPORTED
|
||||||
|
#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
|
#define PNG_READ_USER_CHUNKS_SUPPORTED
|
||||||
|
#define PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||||
|
#define PNG_READ_bKGD_SUPPORTED
|
||||||
|
#define PNG_READ_cHRM_SUPPORTED
|
||||||
|
#define PNG_READ_gAMA_SUPPORTED
|
||||||
|
#define PNG_READ_hIST_SUPPORTED
|
||||||
|
#define PNG_READ_iCCP_SUPPORTED
|
||||||
|
#define PNG_READ_iTXt_SUPPORTED
|
||||||
|
#define PNG_READ_oFFs_SUPPORTED
|
||||||
|
#define PNG_READ_pCAL_SUPPORTED
|
||||||
|
#define PNG_READ_pHYs_SUPPORTED
|
||||||
|
#define PNG_READ_sBIT_SUPPORTED
|
||||||
|
#define PNG_READ_sCAL_SUPPORTED
|
||||||
|
#define PNG_READ_sPLT_SUPPORTED
|
||||||
|
#define PNG_READ_sRGB_SUPPORTED
|
||||||
|
#define PNG_READ_tEXt_SUPPORTED
|
||||||
|
#define PNG_READ_tIME_SUPPORTED
|
||||||
|
#define PNG_READ_tRNS_SUPPORTED
|
||||||
|
#define PNG_READ_zTXt_SUPPORTED
|
||||||
|
/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
|
||||||
|
#define PNG_SAVE_INT_32_SUPPORTED
|
||||||
|
#define PNG_SEQUENTIAL_READ_SUPPORTED
|
||||||
|
#define PNG_SETJMP_SUPPORTED
|
||||||
|
#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
|
||||||
|
#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
|
||||||
|
/*#undef PNG_SET_OPTION_SUPPORTED*/
|
||||||
|
#define PNG_SET_USER_LIMITS_SUPPORTED
|
||||||
|
#define PNG_STDIO_SUPPORTED
|
||||||
|
#define PNG_TEXT_SUPPORTED
|
||||||
|
#define PNG_TIME_RFC1123_SUPPORTED
|
||||||
|
#define PNG_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
|
#define PNG_USER_CHUNKS_SUPPORTED
|
||||||
|
#define PNG_USER_LIMITS_SUPPORTED
|
||||||
|
#define PNG_USER_MEM_SUPPORTED
|
||||||
|
#define PNG_USER_TRANSFORM_INFO_SUPPORTED
|
||||||
|
#define PNG_USER_TRANSFORM_PTR_SUPPORTED
|
||||||
|
#define PNG_WARNINGS_SUPPORTED
|
||||||
|
#define PNG_WRITE_16BIT_SUPPORTED
|
||||||
|
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
||||||
|
#define PNG_WRITE_BGR_SUPPORTED
|
||||||
|
#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
|
||||||
|
#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
|
||||||
|
#define PNG_WRITE_FILLER_SUPPORTED
|
||||||
|
#define PNG_WRITE_FILTER_SUPPORTED
|
||||||
|
#define PNG_WRITE_FLUSH_SUPPORTED
|
||||||
|
#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED
|
||||||
|
#define PNG_WRITE_INTERLACING_SUPPORTED
|
||||||
|
#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED
|
||||||
|
#define PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||||
|
#define PNG_WRITE_INVERT_SUPPORTED
|
||||||
|
#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
|
||||||
|
#define PNG_WRITE_PACKSWAP_SUPPORTED
|
||||||
|
#define PNG_WRITE_PACK_SUPPORTED
|
||||||
|
#define PNG_WRITE_SHIFT_SUPPORTED
|
||||||
|
#define PNG_WRITE_SUPPORTED
|
||||||
|
#define PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
||||||
|
#define PNG_WRITE_SWAP_SUPPORTED
|
||||||
|
#define PNG_WRITE_TEXT_SUPPORTED
|
||||||
|
#define PNG_WRITE_TRANSFORMS_SUPPORTED
|
||||||
|
#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
|
#define PNG_WRITE_USER_TRANSFORM_SUPPORTED
|
||||||
|
#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||||
|
#define PNG_WRITE_bKGD_SUPPORTED
|
||||||
|
#define PNG_WRITE_cHRM_SUPPORTED
|
||||||
|
#define PNG_WRITE_gAMA_SUPPORTED
|
||||||
|
#define PNG_WRITE_hIST_SUPPORTED
|
||||||
|
#define PNG_WRITE_iCCP_SUPPORTED
|
||||||
|
#define PNG_WRITE_iTXt_SUPPORTED
|
||||||
|
#define PNG_WRITE_oFFs_SUPPORTED
|
||||||
|
#define PNG_WRITE_pCAL_SUPPORTED
|
||||||
|
#define PNG_WRITE_pHYs_SUPPORTED
|
||||||
|
#define PNG_WRITE_sBIT_SUPPORTED
|
||||||
|
#define PNG_WRITE_sCAL_SUPPORTED
|
||||||
|
#define PNG_WRITE_sPLT_SUPPORTED
|
||||||
|
#define PNG_WRITE_sRGB_SUPPORTED
|
||||||
|
#define PNG_WRITE_tEXt_SUPPORTED
|
||||||
|
#define PNG_WRITE_tIME_SUPPORTED
|
||||||
|
#define PNG_WRITE_tRNS_SUPPORTED
|
||||||
|
#define PNG_WRITE_zTXt_SUPPORTED
|
||||||
|
#define PNG_bKGD_SUPPORTED
|
||||||
|
#define PNG_cHRM_SUPPORTED
|
||||||
|
#define PNG_gAMA_SUPPORTED
|
||||||
|
#define PNG_hIST_SUPPORTED
|
||||||
|
#define PNG_iCCP_SUPPORTED
|
||||||
|
#define PNG_iTXt_SUPPORTED
|
||||||
|
#define PNG_oFFs_SUPPORTED
|
||||||
|
#define PNG_pCAL_SUPPORTED
|
||||||
|
#define PNG_pHYs_SUPPORTED
|
||||||
|
#define PNG_sBIT_SUPPORTED
|
||||||
|
#define PNG_sCAL_SUPPORTED
|
||||||
|
#define PNG_sPLT_SUPPORTED
|
||||||
|
#define PNG_sRGB_SUPPORTED
|
||||||
|
#define PNG_tEXt_SUPPORTED
|
||||||
|
#define PNG_tIME_SUPPORTED
|
||||||
|
#define PNG_tRNS_SUPPORTED
|
||||||
|
#define PNG_zTXt_SUPPORTED
|
||||||
|
/* end of options */
|
||||||
/* settings */
|
/* settings */
|
||||||
#define PNG_API_RULE 0
|
#define PNG_API_RULE 0
|
||||||
#define PNG_CALLOC_SUPPORTED
|
#define PNG_CALLOC_SUPPORTED
|
||||||
@ -34,158 +185,4 @@
|
|||||||
#define PNG_ZBUF_SIZE 8192
|
#define PNG_ZBUF_SIZE 8192
|
||||||
#define PNG_sCAL_PRECISION 5
|
#define PNG_sCAL_PRECISION 5
|
||||||
/* end of settings */
|
/* end of settings */
|
||||||
/* options */
|
|
||||||
#define PNG_16BIT_SUPPORTED 1
|
|
||||||
#define PNG_ALIGNED_MEMORY_SUPPORTED
|
|
||||||
#define PNG_ARM_NEON_CHECK_SUPPORTED
|
|
||||||
#define PNG_BENIGN_ERRORS_SUPPORTED 1
|
|
||||||
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED 1
|
|
||||||
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED 1
|
|
||||||
#define PNG_CHECK_cHRM_SUPPORTED 1
|
|
||||||
#define PNG_CONSOLE_IO_SUPPORTED 1
|
|
||||||
#define PNG_CONVERT_tIME_SUPPORTED 1
|
|
||||||
#define PNG_EASY_ACCESS_SUPPORTED 1
|
|
||||||
/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
|
|
||||||
#define PNG_ERROR_TEXT_SUPPORTED 1
|
|
||||||
#define PNG_FIXED_POINT_SUPPORTED 1
|
|
||||||
#define PNG_FLOATING_ARITHMETIC_SUPPORTED 1
|
|
||||||
#define PNG_FLOATING_POINT_SUPPORTED 1
|
|
||||||
#define PNG_GET_PALETTE_MAX_SUPPORTED 1
|
|
||||||
#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED 1
|
|
||||||
#define PNG_INCH_CONVERSIONS_SUPPORTED 1
|
|
||||||
#define PNG_INFO_IMAGE_SUPPORTED 1
|
|
||||||
#define PNG_IO_STATE_SUPPORTED 1
|
|
||||||
#define PNG_MNG_FEATURES_SUPPORTED 1
|
|
||||||
#define PNG_POINTER_INDEXING_SUPPORTED 1
|
|
||||||
#define PNG_PROGRESSIVE_READ_SUPPORTED 1
|
|
||||||
#define PNG_READ_16BIT_SUPPORTED 1
|
|
||||||
#define PNG_READ_ALPHA_MODE_SUPPORTED 1
|
|
||||||
#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED 1
|
|
||||||
#define PNG_READ_BACKGROUND_SUPPORTED 1
|
|
||||||
#define PNG_READ_BGR_SUPPORTED 1
|
|
||||||
#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED 1
|
|
||||||
#define PNG_READ_COMPOSITE_NODIV_SUPPORTED 1
|
|
||||||
#define PNG_READ_COMPRESSED_TEXT_SUPPORTED 1
|
|
||||||
#define PNG_READ_EXPAND_16_SUPPORTED 1
|
|
||||||
#define PNG_READ_EXPAND_SUPPORTED 1
|
|
||||||
#define PNG_READ_FILLER_SUPPORTED 1
|
|
||||||
#define PNG_READ_GAMMA_SUPPORTED 1
|
|
||||||
#define PNG_READ_GET_PALETTE_MAX_SUPPORTED 1
|
|
||||||
#define PNG_READ_GRAY_TO_RGB_SUPPORTED 1
|
|
||||||
#define PNG_READ_INTERLACING_SUPPORTED 1
|
|
||||||
#define PNG_READ_INT_FUNCTIONS_SUPPORTED 1
|
|
||||||
#define PNG_READ_INVERT_ALPHA_SUPPORTED 1
|
|
||||||
#define PNG_READ_INVERT_SUPPORTED 1
|
|
||||||
#define PNG_READ_OPT_PLTE_SUPPORTED 1
|
|
||||||
#define PNG_READ_PACKSWAP_SUPPORTED 1
|
|
||||||
#define PNG_READ_PACK_SUPPORTED 1
|
|
||||||
#define PNG_READ_QUANTIZE_SUPPORTED 1
|
|
||||||
#define PNG_READ_RGB_TO_GRAY_SUPPORTED 1
|
|
||||||
#define PNG_READ_SCALE_16_TO_8_SUPPORTED 1
|
|
||||||
#define PNG_READ_SHIFT_SUPPORTED 1
|
|
||||||
#define PNG_READ_STRIP_16_TO_8_SUPPORTED 1
|
|
||||||
#define PNG_READ_STRIP_ALPHA_SUPPORTED 1
|
|
||||||
#define PNG_READ_SUPPORTED 1
|
|
||||||
#define PNG_READ_SWAP_ALPHA_SUPPORTED 1
|
|
||||||
#define PNG_READ_SWAP_SUPPORTED 1
|
|
||||||
#define PNG_READ_TEXT_SUPPORTED 1
|
|
||||||
#define PNG_READ_TRANSFORMS_SUPPORTED 1
|
|
||||||
#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED 1
|
|
||||||
#define PNG_READ_USER_CHUNKS_SUPPORTED 1
|
|
||||||
#define PNG_READ_USER_TRANSFORM_SUPPORTED 1
|
|
||||||
#define PNG_READ_bKGD_SUPPORTED 1
|
|
||||||
#define PNG_READ_cHRM_SUPPORTED 1
|
|
||||||
#define PNG_READ_gAMA_SUPPORTED 1
|
|
||||||
#define PNG_READ_hIST_SUPPORTED 1
|
|
||||||
#define PNG_READ_iCCP_SUPPORTED 1
|
|
||||||
#define PNG_READ_iTXt_SUPPORTED 1
|
|
||||||
#define PNG_READ_oFFs_SUPPORTED 1
|
|
||||||
#define PNG_READ_pCAL_SUPPORTED 1
|
|
||||||
#define PNG_READ_pHYs_SUPPORTED 1
|
|
||||||
#define PNG_READ_sBIT_SUPPORTED 1
|
|
||||||
#define PNG_READ_sCAL_SUPPORTED 1
|
|
||||||
#define PNG_READ_sPLT_SUPPORTED 1
|
|
||||||
#define PNG_READ_sRGB_SUPPORTED 1
|
|
||||||
#define PNG_READ_tEXt_SUPPORTED 1
|
|
||||||
#define PNG_READ_tIME_SUPPORTED 1
|
|
||||||
#define PNG_READ_tRNS_SUPPORTED 1
|
|
||||||
#define PNG_READ_zTXt_SUPPORTED 1
|
|
||||||
/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
|
|
||||||
#define PNG_SAVE_INT_32_SUPPORTED 1
|
|
||||||
#define PNG_SEQUENTIAL_READ_SUPPORTED 1
|
|
||||||
#define PNG_SETJMP_SUPPORTED 1
|
|
||||||
#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED 1
|
|
||||||
#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED 1
|
|
||||||
#define PNG_SET_USER_LIMITS_SUPPORTED 1
|
|
||||||
#define PNG_STDIO_SUPPORTED 1
|
|
||||||
#define PNG_TEXT_SUPPORTED 1
|
|
||||||
#define PNG_TIME_RFC1123_SUPPORTED 1
|
|
||||||
#define PNG_UNKNOWN_CHUNKS_SUPPORTED 1
|
|
||||||
#define PNG_USER_CHUNKS_SUPPORTED 1
|
|
||||||
#define PNG_USER_LIMITS_SUPPORTED 1
|
|
||||||
#define PNG_USER_MEM_SUPPORTED 1
|
|
||||||
#define PNG_USER_TRANSFORM_INFO_SUPPORTED 1
|
|
||||||
#define PNG_USER_TRANSFORM_PTR_SUPPORTED 1
|
|
||||||
#define PNG_WARNINGS_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_16BIT_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_BGR_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_FILLER_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_FILTER_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_FLUSH_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_INTERLACING_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_INVERT_ALPHA_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_INVERT_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_PACKSWAP_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_PACK_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_SHIFT_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_SWAP_ALPHA_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_SWAP_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_TEXT_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_TRANSFORMS_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_USER_TRANSFORM_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_bKGD_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_cHRM_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_gAMA_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_hIST_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_iCCP_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_iTXt_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_oFFs_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_pCAL_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_pHYs_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_sBIT_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_sCAL_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_sPLT_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_sRGB_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_tEXt_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_tIME_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_tRNS_SUPPORTED 1
|
|
||||||
#define PNG_WRITE_zTXt_SUPPORTED 1
|
|
||||||
#define PNG_bKGD_SUPPORTED 1
|
|
||||||
#define PNG_cHRM_SUPPORTED 1
|
|
||||||
#define PNG_gAMA_SUPPORTED 1
|
|
||||||
#define PNG_hIST_SUPPORTED 1
|
|
||||||
#define PNG_iCCP_SUPPORTED 1
|
|
||||||
#define PNG_iTXt_SUPPORTED 1
|
|
||||||
#define PNG_oFFs_SUPPORTED 1
|
|
||||||
#define PNG_pCAL_SUPPORTED 1
|
|
||||||
#define PNG_pHYs_SUPPORTED 1
|
|
||||||
#define PNG_sBIT_SUPPORTED 1
|
|
||||||
#define PNG_sCAL_SUPPORTED 1
|
|
||||||
#define PNG_sPLT_SUPPORTED 1
|
|
||||||
#define PNG_sRGB_SUPPORTED 1
|
|
||||||
#define PNG_tEXt_SUPPORTED 1
|
|
||||||
#define PNG_tIME_SUPPORTED 1
|
|
||||||
#define PNG_tRNS_SUPPORTED 1
|
|
||||||
#define PNG_zTXt_SUPPORTED 1
|
|
||||||
/* end of options */
|
|
||||||
#endif /* PNGLCONF_H */
|
#endif /* PNGLCONF_H */
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
;Version 1.5.16beta06
|
||||||
;--------------------------------------------------------------
|
;--------------------------------------------------------------
|
||||||
; LIBPNG symbol list as a Win32 DEF file
|
; LIBPNG symbol list as a Win32 DEF file
|
||||||
; Contains all the symbols that can be exported from libpng
|
; Contains all the symbols that can be exported from libpng
|
||||||
@ -5,7 +6,6 @@
|
|||||||
LIBRARY
|
LIBRARY
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
;Version 1.5.15beta06
|
|
||||||
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
|
||||||
@ -241,3 +241,4 @@ EXPORTS
|
|||||||
png_set_cHRM_XYZ_fixed @233
|
png_set_cHRM_XYZ_fixed @233
|
||||||
png_set_check_for_invalid_index @234
|
png_set_check_for_invalid_index @234
|
||||||
png_get_palette_max @235
|
png_get_palette_max @235
|
||||||
|
png_set_option @236
|
||||||
|
@ -35,13 +35,14 @@
|
|||||||
* defaulted to 'off' in scripts/pnglibconf.dfa
|
* defaulted to 'off' in scripts/pnglibconf.dfa
|
||||||
*
|
*
|
||||||
* Maintenance: if scripts/pnglibconf.dfa options are changed
|
* Maintenance: if scripts/pnglibconf.dfa options are changed
|
||||||
* from, or to, 'off' this needs updating!
|
* from, or to, 'disabled' this needs updating!
|
||||||
*/
|
*/
|
||||||
#define PNG_BENIGN_ERRORS_SUPPORTED
|
#define PNG_BENIGN_ERRORS_SUPPORTED
|
||||||
#define PNG_ERROR_NUMBERS_SUPPORTED
|
#define PNG_ERROR_NUMBERS_SUPPORTED
|
||||||
#define PNG_READ_BIG_ENDIAN_SUPPORTED /* should do nothing! */
|
#define PNG_READ_BIG_ENDIAN_SUPPORTED /* should do nothing! */
|
||||||
#define PNG_INCH_CONVERSIONS_SUPPORTED
|
#define PNG_INCH_CONVERSIONS_SUPPORTED
|
||||||
#define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
#define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||||
|
#define PNG_SET_OPTION_SUPPORTED
|
||||||
|
|
||||||
#undef PNG_H
|
#undef PNG_H
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user