mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[master] Imported from libpng-1.6.9.tar
This commit is contained in:
parent
339ef1ec97
commit
a710317d2f
78
ANNOUNCE
78
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.6.8 - December 19, 2013
|
Libpng 1.6.9 - February 6, 2014
|
||||||
|
|
||||||
This is a public release of libpng, intended for use in production codes.
|
This is a public release of libpng, intended for use in production codes.
|
||||||
|
|
||||||
@ -8,50 +8,56 @@ Files available for download:
|
|||||||
Source files with LF line endings (for Unix/Linux) and with a
|
Source files with LF line endings (for Unix/Linux) and with a
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
libpng-1.6.8.tar.xz (LZMA-compressed, recommended)
|
libpng-1.6.9.tar.xz (LZMA-compressed, recommended)
|
||||||
libpng-1.6.8.tar.gz
|
libpng-1.6.9.tar.gz
|
||||||
|
|
||||||
Source files with CRLF line endings (for Windows), without the
|
Source files with CRLF line endings (for Windows), without the
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
lpng168.7z (LZMA-compressed, recommended)
|
lpng169.7z (LZMA-compressed, recommended)
|
||||||
lpng168.zip
|
lpng169.zip
|
||||||
|
|
||||||
Other information:
|
Other information:
|
||||||
|
|
||||||
libpng-1.6.8-README.txt
|
libpng-1.6.9-README.txt
|
||||||
libpng-1.6.8-LICENSE.txt
|
libpng-1.6.9-LICENSE.txt
|
||||||
Gnupg/*.asc (PGP armored detached signatures)
|
Gnupg/*.asc (PGP armored detached signatures)
|
||||||
|
|
||||||
Changes since the last public release (1.6.7):
|
Changes since the last public release (1.6.8):
|
||||||
Changed #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED in pngpread.c to
|
Bookkeeping: Moved functions around (no changes). Moved transform
|
||||||
#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED to be consistent with
|
function definitions before the place where they are called so that
|
||||||
what is in pngpriv.h.
|
they can be masde static. Move the intrapixel functions and the
|
||||||
Moved prototype for png_handle_unknown() in pngpriv.h outside of
|
grayscale palette builder out of the png?tran.c files. The latter
|
||||||
the #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED/#endif block.
|
isn't a transform function and is no longer used internally, and the
|
||||||
Added "-Wall" to CFLAGS in contrib/pngminim/*/makefile
|
former MNG specific functions are better placed in pngread/pngwrite.c
|
||||||
Conditionally compile some unused functions reported by -Wall in
|
Made transform implementation functions static. This makes the internal
|
||||||
pngminim.
|
functions called by png_do_{read|write}_transformations static. On an
|
||||||
Fixed 'minimal' builds. Various obviously useful minimal configurations
|
x86-64 DLL build (Gentoo Linux) this reduces the size of the text
|
||||||
don't build because of missing contrib/libtests test programs and
|
segment of the DLL by 1208 bytes, about 0.6%. It also simplifies
|
||||||
overly complex dependencies in scripts/pnglibconf.dfa. This change
|
maintenance by removing the declarations from pngpriv.h and allowing
|
||||||
adds contrib/conftest/*.dfa files that can be used in automatic build
|
easier changes to the internal interfaces.
|
||||||
scripts to ensure that these configurations continue to build.
|
Rebuilt configure scripts with automake-1.14.1 and autoconf-2.69
|
||||||
Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder.
|
in the tar distributions.
|
||||||
Fixed pngvalid 'fail' function declaration on the Intel C Compiler.
|
Added checks for libpng 1.5 to pngvalid.c. This supports the use of
|
||||||
This reverts to the previous 'static' implementation and works round
|
this version of pngvalid in libpng 1.5
|
||||||
the 'unused static function' warning by using PNG_UNUSED().
|
Merged with pngvalid.c from libpng-1.7 changes to create a single
|
||||||
Removed or marked PNG_UNUSED some harmless "dead assignments" reported
|
pngvalid.c
|
||||||
by clang scan-build.
|
Removed #error macro from contrib/tools/pngfix.c (Thomas Klausner).
|
||||||
Changed tabs to 3 spaces in png_debug macros and changed '"%s"m'
|
Merged pngrio.c, pngtrans.c, pngwio.c, and pngerror.c with libpng-1.7.0
|
||||||
to '"%s" m' to improve portability among compilers.
|
Merged libpng-1.7.0 changes to make no-interlace configurations work
|
||||||
Changed png_free_default() to free() in pngtest.c
|
with test programs.
|
||||||
Tidied up pngfix inits and fixed pngtest no-write builds.
|
Revised pngvalid.c to support libpng 1.5, which does not support the
|
||||||
Handle zero-length PLTE chunk or NULL palette with png_error()
|
PNG_MAXIMUM_INFLATE_WINDOW option, so #define it out when appropriate in
|
||||||
instead of png_chunk_report(), which by default issues a warning
|
pngvalid.c
|
||||||
rather than an error, leading to later reading from a NULL pointer
|
Allow unversioned links created on install to be disabled in configure.
|
||||||
(png_ptr->palette) in png_do_expand_palette(). This is CVE-2013-6954
|
In configure builds 'make install' changes/adds links like png.h
|
||||||
and VU#650142.
|
and libpng.a to point to the newly installed, versioned, files (e.g.
|
||||||
|
libpng17/png.h and libpng17.a). Three new configure options and some
|
||||||
|
rearrangement of Makefile.am allow creation of these links to be disabled.
|
||||||
|
Removed potentially misleading warning from png_check_IHDR().
|
||||||
|
Updated scripts/makefile.* to use CPPFLAGS (Cosmin).
|
||||||
|
Added clang attribute support (Cosmin).
|
||||||
|
Quiet an uninitialized memory warning from VC2013 in png_get_png().
|
||||||
|
|
||||||
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
|
||||||
|
53
CHANGES
53
CHANGES
@ -4745,9 +4745,60 @@ Version 1.6.8rc02 [December 14, 2013]
|
|||||||
instead of png_chunk_report(), which by default issues a warning
|
instead of png_chunk_report(), which by default issues a warning
|
||||||
rather than an error, leading to later reading from a NULL pointer
|
rather than an error, leading to later reading from a NULL pointer
|
||||||
(png_ptr->palette) in png_do_expand_palette(). This is CVE-2013-6954
|
(png_ptr->palette) in png_do_expand_palette(). This is CVE-2013-6954
|
||||||
and VU#650142.
|
and VU#650142. Libpng-1.6.1 through 1.6.7 are vulnerable.
|
||||||
|
Libpng-1.6.0 and earlier do not have this bug.
|
||||||
|
|
||||||
Version 1.6.8 [December 19, 2013]
|
Version 1.6.8 [December 19, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.6.9beta01 [December 26, 2013]
|
||||||
|
Bookkeeping: Moved functions around (no changes). Moved transform
|
||||||
|
function definitions before the place where they are called so that
|
||||||
|
they can be masde static. Move the intrapixel functions and the
|
||||||
|
grayscale palette builder out of the png?tran.c files. The latter
|
||||||
|
isn't a transform function and is no longer used internally, and the
|
||||||
|
former MNG specific functions are better placed in pngread/pngwrite.c
|
||||||
|
Made transform implementation functions static. This makes the internal
|
||||||
|
functions called by png_do_{read|write}_transformations static. On an
|
||||||
|
x86-64 DLL build (Gentoo Linux) this reduces the size of the text
|
||||||
|
segment of the DLL by 1208 bytes, about 0.6%. It also simplifies
|
||||||
|
maintenance by removing the declarations from pngpriv.h and allowing
|
||||||
|
easier changes to the internal interfaces.
|
||||||
|
Rebuilt configure scripts with automake-1.14.1 and autoconf-2.69
|
||||||
|
in the tar distributions.
|
||||||
|
|
||||||
|
Version 1.6.9beta02 [January 1, 2014]
|
||||||
|
Added checks for libpng 1.5 to pngvalid.c. This supports the use of
|
||||||
|
this version of pngvalid in libpng 1.5
|
||||||
|
Merged with pngvalid.c from libpng-1.7 changes to create a single
|
||||||
|
pngvalid.c
|
||||||
|
Removed #error macro from contrib/tools/pngfix.c (Thomas Klausner).
|
||||||
|
Merged pngrio.c, pngtrans.c, pngwio.c, and pngerror.c with libpng-1.7.0
|
||||||
|
Merged libpng-1.7.0 changes to make no-interlace configurations work
|
||||||
|
with test programs.
|
||||||
|
Revised pngvalid.c to support libpng 1.5, which does not support the
|
||||||
|
PNG_MAXIMUM_INFLATE_WINDOW option, so #define it out when appropriate in
|
||||||
|
pngvalid.c
|
||||||
|
Allow unversioned links created on install to be disabled in configure.
|
||||||
|
In configure builds 'make install' changes/adds links like png.h
|
||||||
|
and libpng.a to point to the newly installed, versioned, files (e.g.
|
||||||
|
libpng17/png.h and libpng17.a). Three new configure options and some
|
||||||
|
rearrangement of Makefile.am allow creation of these links to be disabled.
|
||||||
|
|
||||||
|
Version 1.6.9beta03 [January 10, 2014]
|
||||||
|
Removed potentially misleading warning from png_check_IHDR().
|
||||||
|
|
||||||
|
Version 1.6.9beta04 [January 20, 2014]
|
||||||
|
Updated scripts/makefile.* to use CPPFLAGS (Cosmin).
|
||||||
|
Added clang attribute support (Cosmin).
|
||||||
|
|
||||||
|
Version 1.6.9rc01 [January 28, 2014]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.6.9rc02 [January 30, 2014]
|
||||||
|
Quiet an uninitialized memory warning from VC2013 in png_get_png().
|
||||||
|
|
||||||
|
Version 1.6.9 [February 6, 2014]
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
@ -16,7 +16,7 @@ enable_testing()
|
|||||||
|
|
||||||
set(PNGLIB_MAJOR 1)
|
set(PNGLIB_MAJOR 1)
|
||||||
set(PNGLIB_MINOR 6)
|
set(PNGLIB_MINOR 6)
|
||||||
set(PNGLIB_RELEASE 8)
|
set(PNGLIB_RELEASE 9)
|
||||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
|
|||||||
# SET UP LINKS
|
# SET UP LINKS
|
||||||
if(PNG_SHARED)
|
if(PNG_SHARED)
|
||||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||||
# VERSION 16.${PNGLIB_RELEASE}.1.6.8
|
# VERSION 16.${PNGLIB_RELEASE}.1.6.9
|
||||||
VERSION 16.${PNGLIB_RELEASE}.0
|
VERSION 16.${PNGLIB_RELEASE}.0
|
||||||
SOVERSION 16
|
SOVERSION 16
|
||||||
CLEAN_DIRECT_OUTPUT 1)
|
CLEAN_DIRECT_OUTPUT 1)
|
||||||
|
6
LICENSE
6
LICENSE
@ -10,8 +10,8 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.6.8, December 19, 2013, are
|
libpng versions 1.2.6, August 15, 2004, through 1.6.9, February 6, 2014, are
|
||||||
Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004, 2006-2014 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
|
||||||
December 19, 2013
|
February 6, 2014
|
||||||
|
95
Makefile.am
95
Makefile.am
@ -287,43 +287,74 @@ check: scripts/symbols.chk
|
|||||||
dist-hook:
|
dist-hook:
|
||||||
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
|
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
|
||||||
|
|
||||||
# install the .../include headers as links to the new ones
|
# Make links between installed files with release-specific names and the generic
|
||||||
install-data-hook:
|
# file names. If this install rule is run the generic names will be deleted and
|
||||||
cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h
|
# recreated - this has obvious issues for systems with multiple installations.
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
|
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \
|
|
||||||
pngconf.h
|
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \
|
|
||||||
pnglibconf.h
|
|
||||||
cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc
|
|
||||||
cd '$(DESTDIR)$(pkgconfigdir)'; $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
|
||||||
|
|
||||||
# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used
|
install-header-links:
|
||||||
install-exec-hook:
|
@set -ex; cd '$(DESTDIR)$(includedir)'; for f in $(HEADERS); do \
|
||||||
cd '$(DESTDIR)$(bindir)'; rm -f libpng-config
|
rm -f "$$f"; $(LN_S) "$(PNGLIB_BASENAME)/$$f" "$$f"; done
|
||||||
cd '$(DESTDIR)$(bindir)';\
|
|
||||||
$(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
uninstall-header-links:
|
||||||
@set -x;\
|
cd '$(DESTDIR)$(includedir)'; rm -f $(HEADERS)
|
||||||
cd '$(DESTDIR)$(libdir)';\
|
|
||||||
for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@\
|
install-libpng-pc:
|
||||||
sl dylib dll.a; do\
|
@set -ex; cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc; \
|
||||||
rm -f libpng.$$ext;\
|
$(LN_S) '$(PNGLIB_BASENAME).pc' libpng.pc
|
||||||
if test -f $(PNGLIB_BASENAME).$$ext; then\
|
|
||||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
uninstall-libpng-pc:
|
||||||
|
rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc'
|
||||||
|
|
||||||
|
# EXT_LIST is a list of the possibly library directory extensions, this exists
|
||||||
|
# because we can't find a good way of discovering the file extensions that are
|
||||||
|
# actually installed on a given system, so instead we check for every extension
|
||||||
|
# we have seen.
|
||||||
|
|
||||||
|
EXT_LIST = a dll.a so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ la sl dylib
|
||||||
|
|
||||||
|
install-library-links:
|
||||||
|
@set -x; cd '$(DESTDIR)$(libdir)';\
|
||||||
|
for ext in $(EXT_LIST); do\
|
||||||
|
rm -f "libpng.$$ext";\
|
||||||
|
if test -f "$(PNGLIB_BASENAME).$$ext"; then\
|
||||||
|
$(LN_S) "$(PNGLIB_BASENAME).$$ext" "libpng.$$ext" || exit 1;\
|
||||||
fi;\
|
fi;\
|
||||||
done
|
done
|
||||||
|
|
||||||
uninstall-hook:
|
uninstall-library-links:
|
||||||
cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h
|
@set -x; cd '$(DESTDIR)$(libdir)'; for ext in $(EXT_LIST); do\
|
||||||
rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc'
|
rm -f "libpng.$$ext"; done
|
||||||
|
|
||||||
|
install-libpng-config:
|
||||||
|
@set -ex; cd '$(DESTDIR)$(bindir)'; rm -f libpng-config; \
|
||||||
|
$(LN_S) '$(PNGLIB_BASENAME)-config' libpng-config
|
||||||
|
|
||||||
|
uninstall-libpng-config:
|
||||||
rm -f '$(DESTDIR)$(bindir)/libpng-config'
|
rm -f '$(DESTDIR)$(bindir)/libpng-config'
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.a'
|
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.la'
|
if DO_INSTALL_LINKS
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.so'
|
# If --enable-unversioned-links is specified the header and lib file links
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@'
|
# will be automatically made on a 'make install':
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.sl'
|
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.dylib'
|
install-data-hook: install-header-links
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.dll.a'
|
uninstall-hook: uninstall-header-links
|
||||||
|
install-exec-hook: install-library-links
|
||||||
|
uninstall-hook: uninstall-library-links
|
||||||
|
endif
|
||||||
|
|
||||||
|
if DO_INSTALL_LIBPNG_PC
|
||||||
|
# Likewise, --install-pc causes libpng.pc to be constructed:
|
||||||
|
|
||||||
|
install-data-hook: install-libpng-pc
|
||||||
|
uninstall-hook: uninstall-libpng-pc
|
||||||
|
endif
|
||||||
|
|
||||||
|
if DO_INSTALL_LIBPNG_CONFIG
|
||||||
|
# And --install-config:
|
||||||
|
|
||||||
|
install-exec-hook: install-libpng-config
|
||||||
|
uninstall-hook: uninstall-libpng-config
|
||||||
|
endif
|
||||||
|
|
||||||
# The following addition ensures that 'make all' always builds the test programs
|
# The following addition ensures that 'make all' always builds the test programs
|
||||||
# too. It used to, but some change either in libpng or configure stopped this
|
# too. It used to, but some change either in libpng or configure stopped this
|
||||||
|
4
README
4
README
@ -1,4 +1,4 @@
|
|||||||
README for libpng version 1.6.8 - December 19, 2013 (shared library 16.0)
|
README for libpng version 1.6.9 - February 6, 2014 (shared library 16.0)
|
||||||
See the note about version numbers near the top of png.h
|
See the note about version numbers near the top of png.h
|
||||||
|
|
||||||
See INSTALL for instructions on how to install libpng.
|
See INSTALL for instructions on how to install libpng.
|
||||||
@ -121,7 +121,7 @@ and ...". If in doubt, send questions to me. I'll bounce them
|
|||||||
to others, if necessary.
|
to others, if necessary.
|
||||||
|
|
||||||
Please do not send suggestions on how to change PNG. We have
|
Please do not send suggestions on how to change PNG. We have
|
||||||
been discussing PNG for eighteen years now, and it is official and
|
been discussing PNG for nineteen years now, and it is official and
|
||||||
finished. If you have suggestions for libpng, however, I'll
|
finished. If you have suggestions for libpng, however, I'll
|
||||||
gladly listen. Even if your suggestion is not used immediately,
|
gladly listen. Even if your suggestion is not used immediately,
|
||||||
it may be used later.
|
it may be used later.
|
||||||
|
@ -90,7 +90,7 @@ safe_read(png_structp png_ptr, int fd, void *buffer_in, size_t nbytes)
|
|||||||
if (errno != EINTR)
|
if (errno != EINTR)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "/proc read failed");
|
png_warning(png_ptr, "/proc read failed");
|
||||||
return 0; /* I.e. a permanent failure */
|
return 0; /* I.e., a permanent failure */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
/* libpng row pointers are not necessarily aligned to any particular boundary,
|
/* libpng row pointers are not necessarily aligned to any particular boundary,
|
||||||
* however this code will only work with appropriate alignment. arm/arm_init.c
|
* however this code will only work with appropriate alignment. arm/arm_init.c
|
||||||
* checks for this (and will not compile unless it is done), this code uses
|
* checks for this (and will not compile unless it is done). This code uses
|
||||||
* variants of png_aligncast to avoid compiler warnings.
|
* variants of png_aligncast to avoid compiler warnings.
|
||||||
*/
|
*/
|
||||||
#define png_ptr(type,pointer) png_aligncast(type *,pointer)
|
#define png_ptr(type,pointer) png_aligncast(type *,pointer)
|
||||||
|
45
configure.ac
45
configure.ac
@ -18,7 +18,7 @@ AC_PREREQ([2.68])
|
|||||||
|
|
||||||
dnl Version number stuff here:
|
dnl Version number stuff here:
|
||||||
|
|
||||||
AC_INIT([libpng],[1.6.8],[png-mng-implement@lists.sourceforge.net])
|
AC_INIT([libpng],[1.6.9],[png-mng-implement@lists.sourceforge.net])
|
||||||
AC_CONFIG_MACRO_DIR([scripts])
|
AC_CONFIG_MACRO_DIR([scripts])
|
||||||
|
|
||||||
# libpng does not follow GNU file name conventions (hence 'foreign')
|
# libpng does not follow GNU file name conventions (hence 'foreign')
|
||||||
@ -39,10 +39,10 @@ dnl automake, so the following is not necessary (and is not defined anyway):
|
|||||||
dnl AM_PREREQ([1.11.2])
|
dnl AM_PREREQ([1.11.2])
|
||||||
dnl stop configure from automagically running automake
|
dnl stop configure from automagically running automake
|
||||||
|
|
||||||
PNGLIB_VERSION=1.6.8
|
PNGLIB_VERSION=1.6.9
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=6
|
PNGLIB_MINOR=6
|
||||||
PNGLIB_RELEASE=8
|
PNGLIB_RELEASE=9
|
||||||
|
|
||||||
dnl End of version number stuff
|
dnl End of version number stuff
|
||||||
|
|
||||||
@ -226,6 +226,45 @@ AC_ARG_WITH(libpng-prefix,
|
|||||||
fi])
|
fi])
|
||||||
AM_CONDITIONAL([DO_PNG_PREFIX], [test "${with_libpng_prefix:-no}" != "no"])
|
AM_CONDITIONAL([DO_PNG_PREFIX], [test "${with_libpng_prefix:-no}" != "no"])
|
||||||
|
|
||||||
|
# Control over what links are made for installed files. Versioned files are
|
||||||
|
# always installed, when the following options are turned on corresponding
|
||||||
|
# unversioned links are also created (normally as symbolic links):
|
||||||
|
AC_ARG_ENABLE([unversioned-links],
|
||||||
|
AS_HELP_STRING([[[--enable-unversioned-links]]],
|
||||||
|
[Installed libpng header files are placed in a versioned subdirectory]
|
||||||
|
[and installed libpng library (including DLL) files are versioned.]
|
||||||
|
[If this option is enabled unversioned links will be created pointing to]
|
||||||
|
[the corresponding installed files. If you use libpng.pc or]
|
||||||
|
[libpng-config for all builds you do not need these links, but if you]
|
||||||
|
[compile programs directly they will typically #include <png.h> and]
|
||||||
|
[link with -lpng; in that case you need the links.]
|
||||||
|
[The links can be installed manually using 'make install-header-links']
|
||||||
|
[and 'make install-library-links' and can be removed using the]
|
||||||
|
[corresponding uninstall- targets. If you do enable this option every]
|
||||||
|
[libpng 'make install' will recreate the links to point to the just]
|
||||||
|
[installed version of libpng. The default is to create the links;]
|
||||||
|
[use --disable-unversioned-links to change this]))
|
||||||
|
|
||||||
|
# The AM_CONDITIONAL test is written so that the default is enabled;
|
||||||
|
# --disable-unversioned-links must be given to turn the option off.
|
||||||
|
AM_CONDITIONAL([DO_INSTALL_LINKS],[test "$enable_unversioned_links" != "no"])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([unversioned-libpng-pc],
|
||||||
|
AS_HELP_STRING([[[--enable-unversioned-libpng-pc]]],
|
||||||
|
[Install the configuration file 'libpng.pc' as a link to the versioned]
|
||||||
|
[version. This is done by default - use --disable-unversioned-libpng-pc]
|
||||||
|
[to change this.]))
|
||||||
|
AM_CONDITIONAL([DO_INSTALL_LIBPNG_PC],
|
||||||
|
[test "$enable_unversioned_libpng_pc" != "no"])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([unversioned-libpng-config],
|
||||||
|
AS_HELP_STRING([[[--enable-unversioned-libpng-config]]],
|
||||||
|
[Install the configuration file 'libpng-config' as a link to the]
|
||||||
|
[versioned version. This is done by default - use]
|
||||||
|
[--disable-unversioned-libpng-config to change this.]))
|
||||||
|
AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG],
|
||||||
|
[test "$enable_unversioned_libpng_config" != "no"])
|
||||||
|
|
||||||
# HOST SPECIFIC OPTIONS
|
# HOST SPECIFIC OPTIONS
|
||||||
# =====================
|
# =====================
|
||||||
#
|
#
|
||||||
|
@ -47,7 +47,8 @@ CC = gcc
|
|||||||
#CC = i386-mingw32msvc-gcc # e.g., Linux -> Win32 cross-compilation
|
#CC = i386-mingw32msvc-gcc # e.g., Linux -> Win32 cross-compilation
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
CFLAGS = -O -Wall $(INCS) $(MINGW_CCFLAGS)
|
CPPFLAGS = $(INCS)
|
||||||
|
CFLAGS = -O -Wall $(MINGW_CCFLAGS)
|
||||||
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
||||||
# [-ansi, -pedantic and -W can also be used]
|
# [-ansi, -pedantic and -W can also be used]
|
||||||
LDFLAGS = $(MINGW_LDFLAGS)
|
LDFLAGS = $(MINGW_LDFLAGS)
|
||||||
@ -85,10 +86,10 @@ EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
%.pic$(O): %.c
|
%.pic$(O): %.c
|
||||||
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
# dependencies --------------------------------------------------------------
|
# dependencies --------------------------------------------------------------
|
||||||
|
@ -54,6 +54,7 @@ LD = cc
|
|||||||
RM = rm -f
|
RM = rm -f
|
||||||
# ABI must be the same as that used to build libpng.
|
# ABI must be the same as that used to build libpng.
|
||||||
ABI =
|
ABI =
|
||||||
|
CPPFLAGS =
|
||||||
CFLAGS = $(ABI) -O -fullwarn $(INCS)
|
CFLAGS = $(ABI) -O -fullwarn $(INCS)
|
||||||
LDFLAGS = $(ABI)
|
LDFLAGS = $(ABI)
|
||||||
O = .o
|
O = .o
|
||||||
@ -73,7 +74,7 @@ EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
# dependencies --------------------------------------------------------------
|
# dependencies --------------------------------------------------------------
|
||||||
|
@ -64,7 +64,8 @@ WLIBSs = $(PNGLIBs) $(ZLIBs)
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
LD = gcc
|
LD = gcc
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
CFLAGS = -O -Wall $(INCS) -DFEATURE_LOOP
|
CPPFLAGS = $(INCS) -DFEATURE_LOOP
|
||||||
|
CFLAGS = -O -Wall
|
||||||
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
||||||
# [-ansi, -pedantic and -W can also be used]
|
# [-ansi, -pedantic and -W can also be used]
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
@ -92,7 +93,7 @@ EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
# dependencies --------------------------------------------------------------
|
# dependencies --------------------------------------------------------------
|
||||||
|
@ -53,7 +53,8 @@ WLIBS = $(PNGLIB) $(ZLIB)
|
|||||||
CC = cl
|
CC = cl
|
||||||
LD = link
|
LD = link
|
||||||
RM = del
|
RM = del
|
||||||
CFLAGS = -nologo -O -W3 $(INCS) $(cvars)
|
CPPFLAGS = $(INCS)
|
||||||
|
CFLAGS = -nologo -O -W3 $(cvars)
|
||||||
# [note that -W3 is an MSVC-specific compilation flag ("all warnings on")]
|
# [note that -W3 is an MSVC-specific compilation flag ("all warnings on")]
|
||||||
# [see %devstudio%\vc\include\win32.mak for cvars macro definition]
|
# [see %devstudio%\vc\include\win32.mak for cvars macro definition]
|
||||||
O = .obj
|
O = .obj
|
||||||
@ -76,7 +77,7 @@ EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
# dependencies --------------------------------------------------------------
|
# dependencies --------------------------------------------------------------
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -82,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) $(CPPFLAGS) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ OBJS = $(PROGOBJS) $(PNGOBJS) $(ZOBJS)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) $(CPPFLAGS) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
|
|
||||||
|
@ -23,7 +23,8 @@ ZINC = -I../../../zlib
|
|||||||
ZLIB = -L../../../zlib -lz
|
ZLIB = -L../../../zlib -lz
|
||||||
ZLIBS = ../../../zlib/libz.a
|
ZLIBS = ../../../zlib/libz.a
|
||||||
|
|
||||||
CFLAGS=$(PNGINC) $(ZINC)
|
CPPFLAGS=$(PNGINC) $(ZINC)
|
||||||
|
CFLAGS=
|
||||||
LDLIBS=$(PNGLIB) $(ZLIB)
|
LDLIBS=$(PNGLIB) $(ZLIB)
|
||||||
LDLIBSS=$(PNGLIBS) $(ZLIBS)
|
LDLIBSS=$(PNGLIBS) $(ZLIBS)
|
||||||
C=.c
|
C=.c
|
||||||
@ -37,7 +38,7 @@ E=
|
|||||||
all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E)
|
all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E)
|
||||||
|
|
||||||
png2pnm$(O): png2pnm$(C)
|
png2pnm$(O): png2pnm$(C)
|
||||||
$(CC) -c $(CFLAGS) png2pnm$(C)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) png2pnm$(C)
|
||||||
|
|
||||||
png2pnm$(E): png2pnm$(O)
|
png2pnm$(E): png2pnm$(O)
|
||||||
$(LD) $(LDFLAGS) -o png2pnm$(E) png2pnm$(O) $(LDLIBS) -lm
|
$(LD) $(LDFLAGS) -o png2pnm$(E) png2pnm$(O) $(LDLIBS) -lm
|
||||||
@ -46,7 +47,7 @@ png2pnm-static$(E): png2pnm$(O)
|
|||||||
$(LD) $(LDFLAGS) -o png2pnm-static$(E) png2pnm$(O) $(LDLIBSS) -lm
|
$(LD) $(LDFLAGS) -o png2pnm-static$(E) png2pnm$(O) $(LDLIBSS) -lm
|
||||||
|
|
||||||
pnm2png$(O): pnm2png$(C)
|
pnm2png$(O): pnm2png$(C)
|
||||||
$(CC) -c $(CFLAGS) pnm2png$(C)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) pnm2png$(C)
|
||||||
|
|
||||||
pnm2png$(E): pnm2png$(O)
|
pnm2png$(E): pnm2png$(O)
|
||||||
$(LD) $(LDFLAGS) -o pnm2png$(E) pnm2png$(O) $(LDLIBS) -lm
|
$(LD) $(LDFLAGS) -o pnm2png$(E) pnm2png$(O) $(LDLIBS) -lm
|
||||||
|
@ -7,7 +7,8 @@ LB=tlib
|
|||||||
RM=del
|
RM=del
|
||||||
CP=copy
|
CP=copy
|
||||||
MODEL=l
|
MODEL=l
|
||||||
CCFLAGS=-O -m$(MODEL) -I..\libpng -I..\zlib
|
CPPFLAGS=-I..\libpng -I..\zlib
|
||||||
|
CFLAGS=-O -m$(MODEL)
|
||||||
LDFLAGS=-m$(MODEL) -L..\libpng -L..\zlib
|
LDFLAGS=-m$(MODEL) -L..\libpng -L..\zlib
|
||||||
C=.c
|
C=.c
|
||||||
O=.obj
|
O=.obj
|
||||||
@ -19,13 +20,13 @@ E=.exe
|
|||||||
all: png2pnm$(E) pnm2png$(E)
|
all: png2pnm$(E) pnm2png$(E)
|
||||||
|
|
||||||
png2pnm$(O): png2pnm$(C)
|
png2pnm$(O): png2pnm$(C)
|
||||||
$(CC) -c $(CCFLAGS) png2pnm$(C)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) png2pnm$(C)
|
||||||
|
|
||||||
png2pnm$(E): png2pnm$(O)
|
png2pnm$(E): png2pnm$(O)
|
||||||
$(LD) $(LDFLAGS) png2pnm$(O) libpng$(L) zlib$(L)
|
$(LD) $(LDFLAGS) png2pnm$(O) libpng$(L) zlib$(L)
|
||||||
|
|
||||||
pnm2png$(O): pnm2png$(C)
|
pnm2png$(O): pnm2png$(C)
|
||||||
$(CC) -c $(CCFLAGS) pnm2png$(C)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) pnm2png$(C)
|
||||||
|
|
||||||
pnm2png$(E): pnm2png$(O)
|
pnm2png$(E): pnm2png$(O)
|
||||||
$(LD) $(LDFLAGS) pnm2png$(O) libpng$(L) zlib$(L)
|
$(LD) $(LDFLAGS) pnm2png$(O) libpng$(L) zlib$(L)
|
||||||
@ -35,4 +36,3 @@ clean:
|
|||||||
$(RM) *$(E)
|
$(RM) *$(E)
|
||||||
|
|
||||||
# End of makefile for png2pnm / pnm2png
|
# End of makefile for png2pnm / pnm2png
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/* pngfix.c
|
/* pngfix.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013 John Cunningham Bowler
|
* Copyright (c) 2014 John Cunningham Bowler
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -32,7 +32,6 @@
|
|||||||
# define FIX_GCC volatile
|
# define FIX_GCC volatile
|
||||||
#else
|
#else
|
||||||
# define FIX_GCC
|
# define FIX_GCC
|
||||||
# error not tested
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PROGRAM_NAME "pngfix"
|
#define PROGRAM_NAME "pngfix"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.6.8 - December 19, 2013
|
libpng version 1.6.9 - February 6, 2014
|
||||||
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-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
This document is released under the libpng license.
|
This document 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,9 +11,9 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.6.8 - December 19, 2013
|
libpng versions 0.97, January 1998, through 1.6.9 - February 6, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
libpng 1.0 beta 6 version 0.96 May 28, 1997
|
libpng 1.0 beta 6 version 0.96 May 28, 1997
|
||||||
Updated and distributed by Andreas Dilger
|
Updated and distributed by Andreas Dilger
|
||||||
@ -4393,6 +4393,9 @@ png_set_error_fn(), which is essentially the same function, but with a new
|
|||||||
name to force compilation errors with applications that try to use the old
|
name to force compilation errors with applications that try to use the old
|
||||||
method.
|
method.
|
||||||
|
|
||||||
|
Support for the sCAL, iCCP, iTXt, and sPLT chunks was added at libpng-1.0.6;
|
||||||
|
however, iTXt support was not enabled by default.
|
||||||
|
|
||||||
Starting with version 1.0.7, you can find out which version of the library
|
Starting with version 1.0.7, you can find out which version of the library
|
||||||
you are using at run-time:
|
you are using at run-time:
|
||||||
|
|
||||||
@ -4621,6 +4624,7 @@ XI. Changes to Libpng from version 1.4.x to 1.5.x
|
|||||||
|
|
||||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
||||||
function) incorrectly returned a value of type png_uint_32.
|
function) incorrectly returned a value of type png_uint_32.
|
||||||
|
The incorrect macro was removed from libpng-1.4.5.
|
||||||
|
|
||||||
Checking for invalid palette index on write was added at libpng
|
Checking for invalid palette index on write was added at libpng
|
||||||
1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues
|
1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues
|
||||||
@ -4725,7 +4729,10 @@ and the accuracy of PNG fixed point values is insufficient for
|
|||||||
representation of these values. Consequently a "string" API
|
representation of these values. Consequently a "string" API
|
||||||
(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
|
(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
|
||||||
arbitrary sCAL chunks in the absence of either the floating point API or
|
arbitrary sCAL chunks in the absence of either the floating point API or
|
||||||
internal floating point calculations.
|
internal floating point calculations. Starting with libpng-1.5.0, both
|
||||||
|
of these functions are present when PNG_sCAL_SUPPORTED is defined. Prior
|
||||||
|
to libpng-1.5.0, their presence also depended upon PNG_FIXED_POINT_SUPPORTED
|
||||||
|
being defined and PNG_FLOATING_POINT_SUPPORTED not being defined.
|
||||||
|
|
||||||
Applications no longer need to include the optional distribution header
|
Applications no longer need to include the optional distribution header
|
||||||
file pngusr.h or define the corresponding macros during application
|
file pngusr.h or define the corresponding macros during application
|
||||||
@ -4745,11 +4752,6 @@ reset by pngusr.h or by explicit settings on the compiler command line.
|
|||||||
These settings may produce compiler warnings or errors in 1.5.0 because
|
These settings may produce compiler warnings or errors in 1.5.0 because
|
||||||
of macro redefinition.
|
of macro redefinition.
|
||||||
|
|
||||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
|
||||||
function) incorrectly returned a value of type png_uint_32. libpng 1.5.0
|
|
||||||
is consistent with the implementation in 1.4.5 and 1.2.x (where the macro
|
|
||||||
did not exist.)
|
|
||||||
|
|
||||||
Applications can now choose whether to use these macros or to call the
|
Applications can now choose whether to use these macros or to call the
|
||||||
corresponding function by defining PNG_USE_READ_MACROS or
|
corresponding function by defining PNG_USE_READ_MACROS or
|
||||||
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
||||||
@ -4767,7 +4769,10 @@ option was off by default, and slightly inaccurate scaling occurred.
|
|||||||
This option can no longer be turned off, and the choice of accurate
|
This option can no longer be turned off, and the choice of accurate
|
||||||
or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8()
|
or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8()
|
||||||
API for accurate scaling or the old png_set_strip_16_to_8() API for simple
|
API for accurate scaling or the old png_set_strip_16_to_8() API for simple
|
||||||
chopping.
|
chopping. In libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||||
|
macro became PNG_READ_SCALE_16_TO_8_SUPPORTED, and the PNG_READ_16_TO_8
|
||||||
|
macro became PNG_READ_STRIP_16_TO_8_SUPPORTED, to enable the two
|
||||||
|
png_set_*_16_to_8() functions separately.
|
||||||
|
|
||||||
Prior to libpng-1.5.4, the png_set_user_limits() function could only be
|
Prior to libpng-1.5.4, the png_set_user_limits() function could only be
|
||||||
used to reduce the width and height limits from the value of
|
used to reduce the width and height limits from the value of
|
||||||
@ -5233,13 +5238,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XVI. Y2K Compliance in libpng
|
XVI. Y2K Compliance in libpng
|
||||||
|
|
||||||
December 19, 2013
|
February 6, 2014
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.6.8 are Y2K compliant. It is my belief that earlier
|
upward through 1.6.9 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has two year fields. One is a 2-byte unsigned integer
|
Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||||
|
44
libpng.3
44
libpng.3
@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNG 3 "December 19, 2013"
|
.TH LIBPNG 3 "February 6, 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.8
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.9
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB
|
\fB
|
||||||
#include <png.h>\fP
|
#include <png.h>\fP
|
||||||
@ -504,10 +504,10 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.6.8 - December 19, 2013
|
libpng version 1.6.9 - February 6, 2014
|
||||||
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-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
This document is released under the libpng license.
|
This document is released under the libpng license.
|
||||||
For conditions of distribution and use, see the disclaimer
|
For conditions of distribution and use, see the disclaimer
|
||||||
@ -515,9 +515,9 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.6.8 - December 19, 2013
|
libpng versions 0.97, January 1998, through 1.6.9 - February 6, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
libpng 1.0 beta 6 version 0.96 May 28, 1997
|
libpng 1.0 beta 6 version 0.96 May 28, 1997
|
||||||
Updated and distributed by Andreas Dilger
|
Updated and distributed by Andreas Dilger
|
||||||
@ -4898,6 +4898,9 @@ png_set_error_fn(), which is essentially the same function, but with a new
|
|||||||
name to force compilation errors with applications that try to use the old
|
name to force compilation errors with applications that try to use the old
|
||||||
method.
|
method.
|
||||||
|
|
||||||
|
Support for the sCAL, iCCP, iTXt, and sPLT chunks was added at libpng-1.0.6;
|
||||||
|
however, iTXt support was not enabled by default.
|
||||||
|
|
||||||
Starting with version 1.0.7, you can find out which version of the library
|
Starting with version 1.0.7, you can find out which version of the library
|
||||||
you are using at run-time:
|
you are using at run-time:
|
||||||
|
|
||||||
@ -5126,6 +5129,7 @@ We removed the trailing '.' from the warning and error messages.
|
|||||||
|
|
||||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
||||||
function) incorrectly returned a value of type png_uint_32.
|
function) incorrectly returned a value of type png_uint_32.
|
||||||
|
The incorrect macro was removed from libpng-1.4.5.
|
||||||
|
|
||||||
Checking for invalid palette index on write was added at libpng
|
Checking for invalid palette index on write was added at libpng
|
||||||
1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues
|
1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues
|
||||||
@ -5230,7 +5234,10 @@ and the accuracy of PNG fixed point values is insufficient for
|
|||||||
representation of these values. Consequently a "string" API
|
representation of these values. Consequently a "string" API
|
||||||
(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
|
(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
|
||||||
arbitrary sCAL chunks in the absence of either the floating point API or
|
arbitrary sCAL chunks in the absence of either the floating point API or
|
||||||
internal floating point calculations.
|
internal floating point calculations. Starting with libpng-1.5.0, both
|
||||||
|
of these functions are present when PNG_sCAL_SUPPORTED is defined. Prior
|
||||||
|
to libpng-1.5.0, their presence also depended upon PNG_FIXED_POINT_SUPPORTED
|
||||||
|
being defined and PNG_FLOATING_POINT_SUPPORTED not being defined.
|
||||||
|
|
||||||
Applications no longer need to include the optional distribution header
|
Applications no longer need to include the optional distribution header
|
||||||
file pngusr.h or define the corresponding macros during application
|
file pngusr.h or define the corresponding macros during application
|
||||||
@ -5250,11 +5257,6 @@ reset by pngusr.h or by explicit settings on the compiler command line.
|
|||||||
These settings may produce compiler warnings or errors in 1.5.0 because
|
These settings may produce compiler warnings or errors in 1.5.0 because
|
||||||
of macro redefinition.
|
of macro redefinition.
|
||||||
|
|
||||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
|
||||||
function) incorrectly returned a value of type png_uint_32. libpng 1.5.0
|
|
||||||
is consistent with the implementation in 1.4.5 and 1.2.x (where the macro
|
|
||||||
did not exist.)
|
|
||||||
|
|
||||||
Applications can now choose whether to use these macros or to call the
|
Applications can now choose whether to use these macros or to call the
|
||||||
corresponding function by defining PNG_USE_READ_MACROS or
|
corresponding function by defining PNG_USE_READ_MACROS or
|
||||||
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
||||||
@ -5272,7 +5274,10 @@ option was off by default, and slightly inaccurate scaling occurred.
|
|||||||
This option can no longer be turned off, and the choice of accurate
|
This option can no longer be turned off, and the choice of accurate
|
||||||
or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8()
|
or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8()
|
||||||
API for accurate scaling or the old png_set_strip_16_to_8() API for simple
|
API for accurate scaling or the old png_set_strip_16_to_8() API for simple
|
||||||
chopping.
|
chopping. In libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||||
|
macro became PNG_READ_SCALE_16_TO_8_SUPPORTED, and the PNG_READ_16_TO_8
|
||||||
|
macro became PNG_READ_STRIP_16_TO_8_SUPPORTED, to enable the two
|
||||||
|
png_set_*_16_to_8() functions separately.
|
||||||
|
|
||||||
Prior to libpng-1.5.4, the png_set_user_limits() function could only be
|
Prior to libpng-1.5.4, the png_set_user_limits() function could only be
|
||||||
used to reduce the width and height limits from the value of
|
used to reduce the width and height limits from the value of
|
||||||
@ -5738,13 +5743,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XVI. Y2K Compliance in libpng
|
.SH XVI. Y2K Compliance in libpng
|
||||||
|
|
||||||
December 19, 2013
|
February 6, 2014
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.6.8 are Y2K compliant. It is my belief that earlier
|
upward through 1.6.9 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has two year fields. One is a 2-byte unsigned integer
|
Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||||
@ -5972,6 +5977,9 @@ the first widely used release:
|
|||||||
1.6.8beta01-02 16 10608 16.so.16.8[.0]
|
1.6.8beta01-02 16 10608 16.so.16.8[.0]
|
||||||
1.6.8rc01-02 16 10608 16.so.16.8[.0]
|
1.6.8rc01-02 16 10608 16.so.16.8[.0]
|
||||||
1.6.8 16 10608 16.so.16.8[.0]
|
1.6.8 16 10608 16.so.16.8[.0]
|
||||||
|
1.6.9beta01-04 16 10609 16.so.16.9[.0]
|
||||||
|
1.6.9rc01-02 16 10609 16.so.16.9[.0]
|
||||||
|
1.6.9 16 10609 16.so.16.9[.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
|
||||||
@ -6028,7 +6036,7 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.6.8 - December 19, 2013:
|
Libpng version 1.6.9 - February 6, 2014:
|
||||||
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).
|
||||||
|
|
||||||
@ -6051,7 +6059,7 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.6.8, December 19, 2013, are
|
libpng versions 1.2.6, August 15, 2004, through 1.6.9, February 6, 2014, 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
|
||||||
@ -6150,7 +6158,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
December 19, 2013
|
February 6, 2014
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNGPF 3 "December 19, 2013"
|
.TH LIBPNGPF 3 "February 6, 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.8
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.9
|
||||||
(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 "December 19, 2013"
|
.TH PNG 5 "February 6, 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
79
png.c
79
png.c
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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_6_8 Your_png_h_is_not_version_1_6_8;
|
typedef png_libpng_version_1_6_9 Your_png_h_is_not_version_1_6_9;
|
||||||
|
|
||||||
/* 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
|
||||||
@ -773,14 +773,14 @@ png_get_copyright(png_const_structrp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.6.8 - December 19, 2013" PNG_STRING_NEWLINE \
|
"libpng version 1.6.9 - February 6, 2014" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2013 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.6.8 - December 19, 2013\
|
return "libpng version 1.6.9 - February 6, 2014\
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2014 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.";
|
||||||
# endif
|
# endif
|
||||||
@ -826,6 +826,63 @@ png_get_header_version(png_const_structrp png_ptr)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
||||||
|
/* NOTE: this routine is not used internally! */
|
||||||
|
/* Build a grayscale palette. Palette is assumed to be 1 << bit_depth
|
||||||
|
* large of png_color. This lets grayscale images be treated as
|
||||||
|
* paletted. Most useful for gamma correction and simplification
|
||||||
|
* of code. This API is not used internally.
|
||||||
|
*/
|
||||||
|
void PNGAPI
|
||||||
|
png_build_grayscale_palette(int bit_depth, png_colorp palette)
|
||||||
|
{
|
||||||
|
int num_palette;
|
||||||
|
int color_inc;
|
||||||
|
int i;
|
||||||
|
int v;
|
||||||
|
|
||||||
|
png_debug(1, "in png_do_build_grayscale_palette");
|
||||||
|
|
||||||
|
if (palette == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (bit_depth)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
num_palette = 2;
|
||||||
|
color_inc = 0xff;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
num_palette = 4;
|
||||||
|
color_inc = 0x55;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
num_palette = 16;
|
||||||
|
color_inc = 0x11;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 8:
|
||||||
|
num_palette = 256;
|
||||||
|
color_inc = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
num_palette = 0;
|
||||||
|
color_inc = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0, v = 0; i < num_palette; i++, v += color_inc)
|
||||||
|
{
|
||||||
|
palette[i].red = (png_byte)v;
|
||||||
|
palette[i].green = (png_byte)v;
|
||||||
|
palette[i].blue = (png_byte)v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
|
#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
int PNGAPI
|
int PNGAPI
|
||||||
png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name)
|
png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name)
|
||||||
@ -2416,14 +2473,6 @@ png_check_IHDR(png_const_structrp png_ptr,
|
|||||||
error = 1;
|
error = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (width > (PNG_UINT_32_MAX
|
|
||||||
>> 3) /* 8-byte RGBA pixels */
|
|
||||||
- 48 /* bigrowbuf hack */
|
|
||||||
- 1 /* filter byte */
|
|
||||||
- 7*8 /* rounding of width to multiple of 8 pixels */
|
|
||||||
- 8) /* extra max_pixel_depth pad */
|
|
||||||
png_warning(png_ptr, "Width is too large for libpng to process pixels");
|
|
||||||
|
|
||||||
/* Check other values */
|
/* Check other values */
|
||||||
if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&
|
if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&
|
||||||
bit_depth != 8 && bit_depth != 16)
|
bit_depth != 8 && bit_depth != 16)
|
||||||
|
23
png.h
23
png.h
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.6.8 - December 19, 2013
|
* libpng version 1.6.9 - February 6, 2014
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.6.8 - December 19, 2013: Glenn
|
* libpng versions 0.97, January 1998, through 1.6.9 - February 6, 2014: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@ -189,6 +189,9 @@
|
|||||||
* 1.6.8beta01-02 16 10608 16.so.16.8[.0]
|
* 1.6.8beta01-02 16 10608 16.so.16.8[.0]
|
||||||
* 1.6.8rc01-02 16 10608 16.so.16.8[.0]
|
* 1.6.8rc01-02 16 10608 16.so.16.8[.0]
|
||||||
* 1.6.8 16 10608 16.so.16.8[.0]
|
* 1.6.8 16 10608 16.so.16.8[.0]
|
||||||
|
* 1.6.9beta01-04 16 10609 16.so.16.9[.0]
|
||||||
|
* 1.6.9rc01-02 16 10609 16.so.16.9[.0]
|
||||||
|
* 1.6.9 16 10609 16.so.16.9[.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
|
||||||
@ -220,7 +223,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.6.8, December 19, 2013, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.6.9, February 6, 2014, 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:
|
||||||
@ -332,13 +335,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* December 19, 2013
|
* February 6, 2014
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
*
|
*
|
||||||
* This is your unofficial assurance that libpng from version 0.71 and
|
* This is your unofficial assurance that libpng from version 0.71 and
|
||||||
* upward through 1.6.8 are Y2K compliant. It is my belief that
|
* upward through 1.6.9 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
|
||||||
@ -398,9 +401,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.6.8"
|
#define PNG_LIBPNG_VER_STRING "1.6.9"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.6.8 - December 19, 2013\n"
|
" libpng version 1.6.9 - February 6, 2014\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 16
|
#define PNG_LIBPNG_VER_SONUM 16
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 16
|
#define PNG_LIBPNG_VER_DLLNUM 16
|
||||||
@ -408,7 +411,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 6
|
#define PNG_LIBPNG_VER_MINOR 6
|
||||||
#define PNG_LIBPNG_VER_RELEASE 8
|
#define PNG_LIBPNG_VER_RELEASE 9
|
||||||
|
|
||||||
/* 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:
|
||||||
@ -439,7 +442,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 10608 /* 1.6.8 */
|
#define PNG_LIBPNG_VER 10609 /* 1.6.9 */
|
||||||
|
|
||||||
/* 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.
|
||||||
@ -544,7 +547,7 @@ extern "C" {
|
|||||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||||
* do not agree upon the version number.
|
* do not agree upon the version number.
|
||||||
*/
|
*/
|
||||||
typedef char* png_libpng_version_1_6_8;
|
typedef char* png_libpng_version_1_6_9;
|
||||||
|
|
||||||
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
||||||
*
|
*
|
||||||
|
35
pngconf.h
35
pngconf.h
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.6.8 - December 19, 2013
|
* libpng version 1.6.9 - February 6, 2014
|
||||||
*
|
*
|
||||||
* 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)
|
||||||
@ -361,7 +361,31 @@
|
|||||||
* version 1.2.41. Disabling these removes the warnings but may also produce
|
* version 1.2.41. Disabling these removes the warnings but may also produce
|
||||||
* less efficient code.
|
* less efficient code.
|
||||||
*/
|
*/
|
||||||
# if defined(__GNUC__)
|
# if defined(__clang__)
|
||||||
|
/* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */
|
||||||
|
# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__)
|
||||||
|
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
||||||
|
# endif
|
||||||
|
# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__)
|
||||||
|
# define PNG_NORETURN __attribute__((__noreturn__))
|
||||||
|
# endif
|
||||||
|
# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__)
|
||||||
|
# define PNG_ALLOCATED __attribute__((__malloc__))
|
||||||
|
# endif
|
||||||
|
# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__)
|
||||||
|
# define PNG_DEPRECATED __attribute__((__deprecated__))
|
||||||
|
# endif
|
||||||
|
# if !defined(PNG_PRIVATE)
|
||||||
|
# if __has_extension(attribute_unavailable_with_message)
|
||||||
|
# define PNG_PRIVATE __attribute__((__unavailable__(\
|
||||||
|
"This function is not exported by libpng.")))
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_RESTRICT
|
||||||
|
# define PNG_RESTRICT __restrict
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# elif defined(__GNUC__)
|
||||||
# ifndef PNG_USE_RESULT
|
# ifndef PNG_USE_RESULT
|
||||||
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
||||||
# endif
|
# endif
|
||||||
@ -384,11 +408,11 @@
|
|||||||
__attribute__((__deprecated__))
|
__attribute__((__deprecated__))
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# if ((__GNUC__ != 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
|
# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
|
||||||
# ifndef PNG_RESTRICT
|
# ifndef PNG_RESTRICT
|
||||||
# define PNG_RESTRICT __restrict
|
# define PNG_RESTRICT __restrict
|
||||||
# endif
|
# endif
|
||||||
# endif /* __GNUC__ == 3.0 */
|
# endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */
|
||||||
# endif /* __GNUC__ >= 3 */
|
# endif /* __GNUC__ >= 3 */
|
||||||
|
|
||||||
# elif defined(_MSC_VER) && (_MSC_VER >= 1300)
|
# elif defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||||
@ -419,7 +443,7 @@
|
|||||||
# ifndef PNG_RESTRICT
|
# ifndef PNG_RESTRICT
|
||||||
# define PNG_RESTRICT __restrict
|
# define PNG_RESTRICT __restrict
|
||||||
# endif
|
# endif
|
||||||
# endif /* _MSC_VER */
|
# endif
|
||||||
#endif /* PNG_PEDANTIC_WARNINGS */
|
#endif /* PNG_PEDANTIC_WARNINGS */
|
||||||
|
|
||||||
#ifndef PNG_DEPRECATED
|
#ifndef PNG_DEPRECATED
|
||||||
@ -440,6 +464,7 @@
|
|||||||
#ifndef PNG_RESTRICT
|
#ifndef PNG_RESTRICT
|
||||||
# define PNG_RESTRICT /* The C99 "restrict" feature */
|
# define PNG_RESTRICT /* The C99 "restrict" feature */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PNG_FP_EXPORT /* A floating point API. */
|
#ifndef PNG_FP_EXPORT /* A floating point API. */
|
||||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||||
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
||||||
|
@ -761,7 +761,12 @@ png_longjmp,(png_const_structrp png_ptr, int val),PNG_NORETURN)
|
|||||||
png_ptr->longjmp_fn(*png_ptr->jmp_buf_ptr, val);
|
png_ptr->longjmp_fn(*png_ptr->jmp_buf_ptr, val);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Here if not setjmp support or if png_ptr is null. */
|
/* If control reaches this point, png_longjmp() must not return. The only
|
||||||
|
* choice is to terminate the whole process (or maybe the thread); to do
|
||||||
|
* this the ANSI-C abort() function is used unless a different method is
|
||||||
|
* implemented by overriding the default configuration setting for
|
||||||
|
* PNG_ABORT().
|
||||||
|
*/
|
||||||
PNG_ABORT();
|
PNG_ABORT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
120
pngpriv.h
120
pngpriv.h
@ -2,11 +2,11 @@
|
|||||||
/* pngpriv.h - private declarations for use inside libpng
|
/* pngpriv.h - private declarations for use inside libpng
|
||||||
*
|
*
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* For conditions of distribution and use, see copyright notice in png.h
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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.)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -135,7 +135,7 @@
|
|||||||
|
|
||||||
/* By default the 'intrinsics' code in arm/filter_neon_intrinsics.c is used
|
/* By default the 'intrinsics' code in arm/filter_neon_intrinsics.c is used
|
||||||
* if possible - if __ARM_NEON__ is set and the compiler version is not known
|
* if possible - if __ARM_NEON__ is set and the compiler version is not known
|
||||||
* to be broken. This is control by PNG_ARM_NEON_IMPLEMENTATION which can
|
* to be broken. This is controlled by PNG_ARM_NEON_IMPLEMENTATION which can
|
||||||
* be:
|
* be:
|
||||||
*
|
*
|
||||||
* 1 The intrinsics code (the default with __ARM_NEON__)
|
* 1 The intrinsics code (the default with __ARM_NEON__)
|
||||||
@ -1235,32 +1235,7 @@ PNG_INTERNAL_FUNCTION(void,png_read_transform_info,(png_structrp png_ptr,
|
|||||||
png_inforp info_ptr),PNG_EMPTY);
|
png_inforp info_ptr),PNG_EMPTY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* These are the functions that do the transformations */
|
/* Shared transform functions, defined in pngtran.c */
|
||||||
#ifdef PNG_READ_FILLER_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_read_filler,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_uint_32 filler, png_uint_32 flags),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_read_swap_alpha,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_write_swap_alpha,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_read_invert_alpha,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_write_invert_alpha,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
|
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
|
||||||
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
|
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_strip_channel,(png_row_infop row_info,
|
PNG_INTERNAL_FUNCTION(void,png_do_strip_channel,(png_row_infop row_info,
|
||||||
@ -1280,96 +1255,16 @@ PNG_INTERNAL_FUNCTION(void,png_do_packswap,(png_row_infop row_info,
|
|||||||
png_bytep row),PNG_EMPTY);
|
png_bytep row),PNG_EMPTY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(int,png_do_rgb_to_gray,(png_structrp png_ptr,
|
|
||||||
png_row_infop row_info, png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_gray_to_rgb,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_PACK_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_unpack,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_SHIFT_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_unshift,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_const_color_8p sig_bits),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
|
#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_invert,(png_row_infop row_info,
|
PNG_INTERNAL_FUNCTION(void,png_do_invert,(png_row_infop row_info,
|
||||||
png_bytep row),PNG_EMPTY);
|
png_bytep row),PNG_EMPTY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_scale_16_to_8,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_chop,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_quantize,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_const_bytep palette_lookup,
|
|
||||||
png_const_bytep quantize_lookup),PNG_EMPTY);
|
|
||||||
|
|
||||||
# ifdef PNG_CORRECT_PALETTE_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_correct_palette,(png_structrp png_ptr,
|
|
||||||
png_colorp palette, int num_palette),PNG_EMPTY);
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
|
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_bgr,(png_row_infop row_info,
|
PNG_INTERNAL_FUNCTION(void,png_do_bgr,(png_row_infop row_info,
|
||||||
png_bytep row),PNG_EMPTY);
|
png_bytep row),PNG_EMPTY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_PACK_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_pack,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_uint_32 bit_depth),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SHIFT_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_shift,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_const_color_8p bit_depth),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
|
|
||||||
defined(PNG_READ_ALPHA_MODE_SUPPORTED)
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_compose,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_structrp png_ptr),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_gamma,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_structrp png_ptr),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_ALPHA_MODE_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_encode_alpha,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_structrp png_ptr),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_EXPAND_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_expand_palette,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_const_colorp palette, png_const_bytep trans,
|
|
||||||
int num_trans),PNG_EMPTY);
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_expand,(png_row_infop row_info,
|
|
||||||
png_bytep row, png_const_color_16p trans_color),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_EXPAND_16_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_expand_16,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The following decodes the appropriate chunks, and does error correction,
|
/* The following decodes the appropriate chunks, and does error correction,
|
||||||
* then calls the appropriate callback for the chunk if it is valid.
|
* then calls the appropriate callback for the chunk if it is valid.
|
||||||
*/
|
*/
|
||||||
@ -1556,13 +1451,6 @@ PNG_INTERNAL_FUNCTION(void,png_push_read_iTXt,(png_structrp png_ptr,
|
|||||||
|
|
||||||
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||||
|
|
||||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_read_intrapixel,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
PNG_INTERNAL_FUNCTION(void,png_do_write_intrapixel,(png_row_infop row_info,
|
|
||||||
png_bytep row),PNG_EMPTY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Added at libpng version 1.6.0 */
|
/* Added at libpng version 1.6.0 */
|
||||||
#ifdef PNG_GAMMA_SUPPORTED
|
#ifdef PNG_GAMMA_SUPPORTED
|
||||||
PNG_INTERNAL_FUNCTION(void,png_colorspace_set_gamma,(png_const_structrp png_ptr,
|
PNG_INTERNAL_FUNCTION(void,png_colorspace_set_gamma,(png_const_structrp png_ptr,
|
||||||
|
83
pngread.c
83
pngread.c
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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.)
|
||||||
*
|
*
|
||||||
@ -305,6 +305,72 @@ png_start_read_image(png_structrp png_ptr)
|
|||||||
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
|
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
|
||||||
|
|
||||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||||
|
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||||
|
/* Undoes intrapixel differencing,
|
||||||
|
* NOTE: this is apparently only supported in the 'sequential' reader.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
|
||||||
|
{
|
||||||
|
png_debug(1, "in png_do_read_intrapixel");
|
||||||
|
|
||||||
|
if (
|
||||||
|
(row_info->color_type & PNG_COLOR_MASK_COLOR))
|
||||||
|
{
|
||||||
|
int bytes_per_pixel;
|
||||||
|
png_uint_32 row_width = row_info->width;
|
||||||
|
|
||||||
|
if (row_info->bit_depth == 8)
|
||||||
|
{
|
||||||
|
png_bytep rp;
|
||||||
|
png_uint_32 i;
|
||||||
|
|
||||||
|
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
|
||||||
|
bytes_per_pixel = 3;
|
||||||
|
|
||||||
|
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
||||||
|
bytes_per_pixel = 4;
|
||||||
|
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
|
||||||
|
{
|
||||||
|
*(rp) = (png_byte)((256 + *rp + *(rp + 1)) & 0xff);
|
||||||
|
*(rp+2) = (png_byte)((256 + *(rp + 2) + *(rp + 1)) & 0xff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (row_info->bit_depth == 16)
|
||||||
|
{
|
||||||
|
png_bytep rp;
|
||||||
|
png_uint_32 i;
|
||||||
|
|
||||||
|
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
|
||||||
|
bytes_per_pixel = 6;
|
||||||
|
|
||||||
|
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
||||||
|
bytes_per_pixel = 8;
|
||||||
|
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
|
||||||
|
{
|
||||||
|
png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1);
|
||||||
|
png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3);
|
||||||
|
png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5);
|
||||||
|
png_uint_32 red = (s0 + s1 + 65536) & 0xffff;
|
||||||
|
png_uint_32 blue = (s2 + s1 + 65536) & 0xffff;
|
||||||
|
*(rp ) = (png_byte)((red >> 8) & 0xff);
|
||||||
|
*(rp + 1) = (png_byte)(red & 0xff);
|
||||||
|
*(rp + 4) = (png_byte)((blue >> 8) & 0xff);
|
||||||
|
*(rp + 5) = (png_byte)(blue & 0xff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* PNG_MNG_FEATURES_SUPPORTED */
|
||||||
|
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
|
png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||||
{
|
{
|
||||||
@ -489,7 +555,6 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
||||||
if (png_ptr->transformations)
|
if (png_ptr->transformations)
|
||||||
png_do_read_transformations(png_ptr, &row_info);
|
png_do_read_transformations(png_ptr, &row_info);
|
||||||
@ -1004,7 +1069,7 @@ png_read_png(png_structrp png_ptr, png_inforp info_ptr,
|
|||||||
if (transforms & PNG_TRANSFORM_EXPAND)
|
if (transforms & PNG_TRANSFORM_EXPAND)
|
||||||
if ((png_ptr->bit_depth < 8) ||
|
if ((png_ptr->bit_depth < 8) ||
|
||||||
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
|
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
|
||||||
(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
|
(info_ptr->valid & PNG_INFO_tRNS))
|
||||||
png_set_expand(png_ptr);
|
png_set_expand(png_ptr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1023,14 +1088,8 @@ png_read_png(png_structrp png_ptr, png_inforp info_ptr,
|
|||||||
* [0,65535] to the original [0,7] or [0,31], or whatever range the
|
* [0,65535] to the original [0,7] or [0,31], or whatever range the
|
||||||
* colors were originally in:
|
* colors were originally in:
|
||||||
*/
|
*/
|
||||||
if ((transforms & PNG_TRANSFORM_SHIFT)
|
if ((transforms & PNG_TRANSFORM_SHIFT) && (info_ptr->valid & PNG_INFO_sBIT))
|
||||||
&& png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT))
|
png_set_shift(png_ptr, &info_ptr->sig_bit);
|
||||||
{
|
|
||||||
png_color_8p sig_bit;
|
|
||||||
|
|
||||||
png_get_sBIT(png_ptr, info_ptr, &sig_bit);
|
|
||||||
png_set_shift(png_ptr, sig_bit);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_BGR_SUPPORTED
|
#ifdef PNG_READ_BGR_SUPPORTED
|
||||||
|
6
pngrio.c
6
pngrio.c
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngrio.c - functions for data input
|
/* pngrio.c - functions for data input
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.0 [February 14, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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.)
|
||||||
*
|
*
|
||||||
@ -102,6 +102,7 @@ png_set_read_fn(png_structrp png_ptr, png_voidp io_ptr,
|
|||||||
png_ptr->read_data_fn = read_data_fn;
|
png_ptr->read_data_fn = read_data_fn;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
/* It is an error to write to a read device */
|
/* It is an error to write to a read device */
|
||||||
if (png_ptr->write_data_fn != NULL)
|
if (png_ptr->write_data_fn != NULL)
|
||||||
{
|
{
|
||||||
@ -110,6 +111,7 @@ png_set_read_fn(png_structrp png_ptr, png_voidp io_ptr,
|
|||||||
"Can't set both read_data_fn and write_data_fn in the"
|
"Can't set both read_data_fn and write_data_fn in the"
|
||||||
" same structure");
|
" same structure");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||||
png_ptr->output_flush_fn = NULL;
|
png_ptr->output_flush_fn = NULL;
|
||||||
|
722
pngrtran.c
722
pngrtran.c
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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.)
|
||||||
*
|
*
|
||||||
@ -1134,7 +1134,7 @@ png_init_palette_transformations(png_structrp png_ptr)
|
|||||||
if (!input_has_alpha)
|
if (!input_has_alpha)
|
||||||
{
|
{
|
||||||
/* Any alpha means background and associative alpha processing is
|
/* Any alpha means background and associative alpha processing is
|
||||||
* required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA
|
* required, however if the alpha is 0 or 1 throughout OPTIMIZE_ALPHA
|
||||||
* and ENCODE_ALPHA are irrelevant.
|
* and ENCODE_ALPHA are irrelevant.
|
||||||
*/
|
*/
|
||||||
png_ptr->transformations &= ~PNG_ENCODE_ALPHA;
|
png_ptr->transformations &= ~PNG_ENCODE_ALPHA;
|
||||||
@ -1199,7 +1199,7 @@ png_init_rgb_transformations(png_structrp png_ptr)
|
|||||||
if (!input_has_alpha)
|
if (!input_has_alpha)
|
||||||
{
|
{
|
||||||
/* Any alpha means background and associative alpha processing is
|
/* Any alpha means background and associative alpha processing is
|
||||||
* required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA
|
* required, however if the alpha is 0 or 1 throughout OPTIMIZE_ALPHA
|
||||||
* and ENCODE_ALPHA are irrelevant.
|
* and ENCODE_ALPHA are irrelevant.
|
||||||
*/
|
*/
|
||||||
# ifdef PNG_READ_ALPHA_MODE_SUPPORTED
|
# ifdef PNG_READ_ALPHA_MODE_SUPPORTED
|
||||||
@ -2123,303 +2123,6 @@ defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Transform the row. The order of transformations is significant,
|
|
||||||
* and is very touchy. If you add a transformation, take care to
|
|
||||||
* decide how it fits in with the other transformations here.
|
|
||||||
*/
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
|
|
||||||
{
|
|
||||||
png_debug(1, "in png_do_read_transformations");
|
|
||||||
|
|
||||||
if (png_ptr->row_buf == NULL)
|
|
||||||
{
|
|
||||||
/* Prior to 1.5.4 this output row/pass where the NULL pointer is, but this
|
|
||||||
* error is incredibly rare and incredibly easy to debug without this
|
|
||||||
* information.
|
|
||||||
*/
|
|
||||||
png_error(png_ptr, "NULL row buffer");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The following is debugging; prior to 1.5.4 the code was never compiled in;
|
|
||||||
* in 1.5.4 PNG_FLAG_DETECT_UNINITIALIZED was added and the macro
|
|
||||||
* PNG_WARN_UNINITIALIZED_ROW removed. In 1.6 the new flag is set only for
|
|
||||||
* all transformations, however in practice the ROW_INIT always gets done on
|
|
||||||
* demand, if necessary.
|
|
||||||
*/
|
|
||||||
if ((png_ptr->flags & PNG_FLAG_DETECT_UNINITIALIZED) != 0 &&
|
|
||||||
!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
|
||||||
{
|
|
||||||
/* Application has failed to call either png_read_start_image() or
|
|
||||||
* png_read_update_info() after setting transforms that expand pixels.
|
|
||||||
* This check added to libpng-1.2.19 (but not enabled until 1.5.4).
|
|
||||||
*/
|
|
||||||
png_error(png_ptr, "Uninitialized row");
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_READ_EXPAND_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_EXPAND)
|
|
||||||
{
|
|
||||||
if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
|
|
||||||
{
|
|
||||||
png_do_expand_palette(row_info, png_ptr->row_buf + 1,
|
|
||||||
png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (png_ptr->num_trans &&
|
|
||||||
(png_ptr->transformations & PNG_EXPAND_tRNS))
|
|
||||||
png_do_expand(row_info, png_ptr->row_buf + 1,
|
|
||||||
&(png_ptr->trans_color));
|
|
||||||
|
|
||||||
else
|
|
||||||
png_do_expand(row_info, png_ptr->row_buf + 1,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
|
|
||||||
if ((png_ptr->transformations & PNG_STRIP_ALPHA) &&
|
|
||||||
!(png_ptr->transformations & PNG_COMPOSE) &&
|
|
||||||
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
|
|
||||||
row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
|
|
||||||
png_do_strip_channel(row_info, png_ptr->row_buf + 1,
|
|
||||||
0 /* at_start == false, because SWAP_ALPHA happens later */);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
|
|
||||||
{
|
|
||||||
int rgb_error =
|
|
||||||
png_do_rgb_to_gray(png_ptr, row_info,
|
|
||||||
png_ptr->row_buf + 1);
|
|
||||||
|
|
||||||
if (rgb_error)
|
|
||||||
{
|
|
||||||
png_ptr->rgb_to_gray_status=1;
|
|
||||||
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
|
|
||||||
PNG_RGB_TO_GRAY_WARN)
|
|
||||||
png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel");
|
|
||||||
|
|
||||||
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
|
|
||||||
PNG_RGB_TO_GRAY_ERR)
|
|
||||||
png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* From Andreas Dilger e-mail to png-implement, 26 March 1998:
|
|
||||||
*
|
|
||||||
* In most cases, the "simple transparency" should be done prior to doing
|
|
||||||
* gray-to-RGB, or you will have to test 3x as many bytes to check if a
|
|
||||||
* pixel is transparent. You would also need to make sure that the
|
|
||||||
* transparency information is upgraded to RGB.
|
|
||||||
*
|
|
||||||
* To summarize, the current flow is:
|
|
||||||
* - Gray + simple transparency -> compare 1 or 2 gray bytes and composite
|
|
||||||
* with background "in place" if transparent,
|
|
||||||
* convert to RGB if necessary
|
|
||||||
* - Gray + alpha -> composite with gray background and remove alpha bytes,
|
|
||||||
* convert to RGB if necessary
|
|
||||||
*
|
|
||||||
* To support RGB backgrounds for gray images we need:
|
|
||||||
* - Gray + simple transparency -> convert to RGB + simple transparency,
|
|
||||||
* compare 3 or 6 bytes and composite with
|
|
||||||
* background "in place" if transparent
|
|
||||||
* (3x compare/pixel compared to doing
|
|
||||||
* composite with gray bkgrnd)
|
|
||||||
* - Gray + alpha -> convert to RGB + alpha, composite with background and
|
|
||||||
* remove alpha bytes (3x float
|
|
||||||
* operations/pixel compared with composite
|
|
||||||
* on gray background)
|
|
||||||
*
|
|
||||||
* Greg's change will do this. The reason it wasn't done before is for
|
|
||||||
* performance, as this increases the per-pixel operations. If we would check
|
|
||||||
* in advance if the background was gray or RGB, and position the gray-to-RGB
|
|
||||||
* transform appropriately, then it would save a lot of work/time.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
|
||||||
/* If gray -> RGB, do so now only if background is non-gray; else do later
|
|
||||||
* for performance reasons
|
|
||||||
*/
|
|
||||||
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
|
|
||||||
!(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
|
|
||||||
png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
|
|
||||||
defined(PNG_READ_ALPHA_MODE_SUPPORTED)
|
|
||||||
if (png_ptr->transformations & PNG_COMPOSE)
|
|
||||||
png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
|
||||||
if ((png_ptr->transformations & PNG_GAMMA) &&
|
|
||||||
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
|
||||||
/* Because RGB_TO_GRAY does the gamma transform. */
|
|
||||||
!(png_ptr->transformations & PNG_RGB_TO_GRAY) &&
|
|
||||||
#endif
|
|
||||||
#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
|
|
||||||
defined(PNG_READ_ALPHA_MODE_SUPPORTED)
|
|
||||||
/* Because PNG_COMPOSE does the gamma transform if there is something to
|
|
||||||
* do (if there is an alpha channel or transparency.)
|
|
||||||
*/
|
|
||||||
!((png_ptr->transformations & PNG_COMPOSE) &&
|
|
||||||
((png_ptr->num_trans != 0) ||
|
|
||||||
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) &&
|
|
||||||
#endif
|
|
||||||
/* Because png_init_read_transformations transforms the palette, unless
|
|
||||||
* RGB_TO_GRAY will do the transform.
|
|
||||||
*/
|
|
||||||
(png_ptr->color_type != PNG_COLOR_TYPE_PALETTE))
|
|
||||||
png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
|
|
||||||
if ((png_ptr->transformations & PNG_STRIP_ALPHA) &&
|
|
||||||
(png_ptr->transformations & PNG_COMPOSE) &&
|
|
||||||
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
|
|
||||||
row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
|
|
||||||
png_do_strip_channel(row_info, png_ptr->row_buf + 1,
|
|
||||||
0 /* at_start == false, because SWAP_ALPHA happens later */);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_ALPHA_MODE_SUPPORTED
|
|
||||||
if ((png_ptr->transformations & PNG_ENCODE_ALPHA) &&
|
|
||||||
(row_info->color_type & PNG_COLOR_MASK_ALPHA))
|
|
||||||
png_do_encode_alpha(row_info, png_ptr->row_buf + 1, png_ptr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_SCALE_16_TO_8)
|
|
||||||
png_do_scale_16_to_8(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
|
|
||||||
/* There is no harm in doing both of these because only one has any effect,
|
|
||||||
* by putting the 'scale' option first if the app asks for scale (either by
|
|
||||||
* calling the API or in a TRANSFORM flag) this is what happens.
|
|
||||||
*/
|
|
||||||
if (png_ptr->transformations & PNG_16_TO_8)
|
|
||||||
png_do_chop(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_QUANTIZE)
|
|
||||||
{
|
|
||||||
png_do_quantize(row_info, png_ptr->row_buf + 1,
|
|
||||||
png_ptr->palette_lookup, png_ptr->quantize_index);
|
|
||||||
|
|
||||||
if (row_info->rowbytes == 0)
|
|
||||||
png_error(png_ptr, "png_do_quantize returned rowbytes=0");
|
|
||||||
}
|
|
||||||
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
|
|
||||||
|
|
||||||
#ifdef PNG_READ_EXPAND_16_SUPPORTED
|
|
||||||
/* Do the expansion now, after all the arithmetic has been done. Notice
|
|
||||||
* that previous transformations can handle the PNG_EXPAND_16 flag if this
|
|
||||||
* is efficient (particularly true in the case of gamma correction, where
|
|
||||||
* better accuracy results faster!)
|
|
||||||
*/
|
|
||||||
if (png_ptr->transformations & PNG_EXPAND_16)
|
|
||||||
png_do_expand_16(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
|
||||||
/* NOTE: moved here in 1.5.4 (from much later in this list.) */
|
|
||||||
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
|
|
||||||
(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
|
|
||||||
png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_INVERT_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_INVERT_MONO)
|
|
||||||
png_do_invert(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_SHIFT_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_SHIFT)
|
|
||||||
png_do_unshift(row_info, png_ptr->row_buf + 1,
|
|
||||||
&(png_ptr->shift));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_PACK_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_PACK)
|
|
||||||
png_do_unpack(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
|
||||||
/* Added at libpng-1.5.10 */
|
|
||||||
if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
|
|
||||||
png_ptr->num_palette_max >= 0)
|
|
||||||
png_do_check_palette_indexes(png_ptr, row_info);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_BGR_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_BGR)
|
|
||||||
png_do_bgr(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_PACKSWAP_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_PACKSWAP)
|
|
||||||
png_do_packswap(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_FILLER_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_FILLER)
|
|
||||||
png_do_read_filler(row_info, png_ptr->row_buf + 1,
|
|
||||||
(png_uint_32)png_ptr->filler, png_ptr->flags);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
|
||||||
png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_SWAP_ALPHA)
|
|
||||||
png_do_read_swap_alpha(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_16BIT_SUPPORTED
|
|
||||||
#ifdef PNG_READ_SWAP_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_SWAP_BYTES)
|
|
||||||
png_do_swap(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_USER_TRANSFORM)
|
|
||||||
{
|
|
||||||
if (png_ptr->read_user_transform_fn != NULL)
|
|
||||||
(*(png_ptr->read_user_transform_fn)) /* User read transform function */
|
|
||||||
(png_ptr, /* png_ptr */
|
|
||||||
row_info, /* row_info: */
|
|
||||||
/* png_uint_32 width; width of row */
|
|
||||||
/* png_size_t rowbytes; number of bytes in row */
|
|
||||||
/* png_byte color_type; color type of pixels */
|
|
||||||
/* png_byte bit_depth; bit depth of samples */
|
|
||||||
/* png_byte channels; number of channels (1-4) */
|
|
||||||
/* png_byte pixel_depth; bits per pixel (depth*channels) */
|
|
||||||
png_ptr->row_buf + 1); /* start of pixel data for row */
|
|
||||||
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
|
|
||||||
if (png_ptr->user_transform_depth)
|
|
||||||
row_info->bit_depth = png_ptr->user_transform_depth;
|
|
||||||
|
|
||||||
if (png_ptr->user_transform_channels)
|
|
||||||
row_info->channels = png_ptr->user_transform_channels;
|
|
||||||
#endif
|
|
||||||
row_info->pixel_depth = (png_byte)(row_info->bit_depth *
|
|
||||||
row_info->channels);
|
|
||||||
|
|
||||||
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->width);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_READ_PACK_SUPPORTED
|
#ifdef PNG_READ_PACK_SUPPORTED
|
||||||
/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel,
|
/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel,
|
||||||
* without changing the actual values. Thus, if you had a row with
|
* without changing the actual values. Thus, if you had a row with
|
||||||
@ -2427,7 +2130,7 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
|
|||||||
* the numbers 0 or 1. If you would rather they contain 0 and 255, use
|
* the numbers 0 or 1. If you would rather they contain 0 and 255, use
|
||||||
* png_do_shift() after this.
|
* png_do_shift() after this.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_unpack(png_row_infop row_info, png_bytep row)
|
png_do_unpack(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_unpack");
|
png_debug(1, "in png_do_unpack");
|
||||||
@ -2525,7 +2228,7 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
|
|||||||
* a row of bit depth 8, but only 5 are significant, this will shift
|
* a row of bit depth 8, but only 5 are significant, this will shift
|
||||||
* the values back to 0 through 31.
|
* the values back to 0 through 31.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_unshift(png_row_infop row_info, png_bytep row,
|
png_do_unshift(png_row_infop row_info, png_bytep row,
|
||||||
png_const_color_8p sig_bits)
|
png_const_color_8p sig_bits)
|
||||||
{
|
{
|
||||||
@ -2664,7 +2367,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
|
#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
|
||||||
/* Scale rows of bit depth 16 down to 8 accurately */
|
/* Scale rows of bit depth 16 down to 8 accurately */
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)
|
png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_scale_16_to_8");
|
png_debug(1, "in png_do_scale_16_to_8");
|
||||||
@ -2722,7 +2425,7 @@ png_do_scale_16_to_8(png_row_infop row_info, png_bytep row)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
|
#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
|
||||||
void /* PRIVATE */
|
static void
|
||||||
/* Simply discard the low byte. This was the default behavior prior
|
/* Simply discard the low byte. This was the default behavior prior
|
||||||
* to libpng-1.5.4.
|
* to libpng-1.5.4.
|
||||||
*/
|
*/
|
||||||
@ -2750,7 +2453,7 @@ png_do_chop(png_row_infop row_info, png_bytep row)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
|
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
|
png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_read_swap_alpha");
|
png_debug(1, "in png_do_read_swap_alpha");
|
||||||
@ -2847,7 +2550,7 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
|
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
|
png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
png_uint_32 row_width;
|
png_uint_32 row_width;
|
||||||
@ -2949,7 +2652,7 @@ png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
|
|
||||||
#ifdef PNG_READ_FILLER_SUPPORTED
|
#ifdef PNG_READ_FILLER_SUPPORTED
|
||||||
/* Add filler channel if we have RGB color */
|
/* Add filler channel if we have RGB color */
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_read_filler(png_row_infop row_info, png_bytep row,
|
png_do_read_filler(png_row_infop row_info, png_bytep row,
|
||||||
png_uint_32 filler, png_uint_32 flags)
|
png_uint_32 filler, png_uint_32 flags)
|
||||||
{
|
{
|
||||||
@ -3136,7 +2839,7 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||||
/* Expand grayscale files to RGB, with or without alpha */
|
/* Expand grayscale files to RGB, with or without alpha */
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
|
png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
png_uint_32 i;
|
png_uint_32 i;
|
||||||
@ -3275,7 +2978,7 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
|
|||||||
* calculated to make the sum 32768. This will result in different rounding
|
* calculated to make the sum 32768. This will result in different rounding
|
||||||
* to that used above.
|
* to that used above.
|
||||||
*/
|
*/
|
||||||
int /* PRIVATE */
|
static int
|
||||||
png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
|
png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -3469,73 +3172,14 @@ png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
return rgb_error;
|
return rgb_error;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
|
|
||||||
|
|
||||||
#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
|
||||||
/* Build a grayscale palette. Palette is assumed to be 1 << bit_depth
|
|
||||||
* large of png_color. This lets grayscale images be treated as
|
|
||||||
* paletted. Most useful for gamma correction and simplification
|
|
||||||
* of code. This API is not used internally.
|
|
||||||
*/
|
|
||||||
void PNGAPI
|
|
||||||
png_build_grayscale_palette(int bit_depth, png_colorp palette)
|
|
||||||
{
|
|
||||||
int num_palette;
|
|
||||||
int color_inc;
|
|
||||||
int i;
|
|
||||||
int v;
|
|
||||||
|
|
||||||
png_debug(1, "in png_do_build_grayscale_palette");
|
|
||||||
|
|
||||||
if (palette == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (bit_depth)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
num_palette = 2;
|
|
||||||
color_inc = 0xff;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
num_palette = 4;
|
|
||||||
color_inc = 0x55;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
num_palette = 16;
|
|
||||||
color_inc = 0x11;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 8:
|
|
||||||
num_palette = 256;
|
|
||||||
color_inc = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
num_palette = 0;
|
|
||||||
color_inc = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, v = 0; i < num_palette; i++, v += color_inc)
|
|
||||||
{
|
|
||||||
palette[i].red = (png_byte)v;
|
|
||||||
palette[i].green = (png_byte)v;
|
|
||||||
palette[i].blue = (png_byte)v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
|
||||||
#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
|
||||||
defined(PNG_READ_ALPHA_MODE_SUPPORTED)
|
defined(PNG_READ_ALPHA_MODE_SUPPORTED)
|
||||||
/* Replace any alpha or transparency with the supplied background color.
|
/* Replace any alpha or transparency with the supplied background color.
|
||||||
* "background" is already in the screen gamma, while "background_1" is
|
* "background" is already in the screen gamma, while "background_1" is
|
||||||
* at a gamma of 1.0. Paletted files have already been taken care of.
|
* at a gamma of 1.0. Paletted files have already been taken care of.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
||||||
{
|
{
|
||||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
@ -4275,7 +3919,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
|||||||
* is 16, use gamma_16_table and gamma_shift. Build these with
|
* is 16, use gamma_16_table and gamma_shift. Build these with
|
||||||
* build_gamma_table().
|
* build_gamma_table().
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_gamma(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
png_do_gamma(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
||||||
{
|
{
|
||||||
png_const_bytep gamma_table = png_ptr->gamma_table;
|
png_const_bytep gamma_table = png_ptr->gamma_table;
|
||||||
@ -4476,7 +4120,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
|||||||
* linear.) Called only with color types that have an alpha channel. Needs the
|
* linear.) Called only with color types that have an alpha channel. Needs the
|
||||||
* from_1 tables.
|
* from_1 tables.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
||||||
{
|
{
|
||||||
png_uint_32 row_width = row_info->width;
|
png_uint_32 row_width = row_info->width;
|
||||||
@ -4542,7 +4186,7 @@ png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
|||||||
/* Expands a palette row to an RGB or RGBA row depending
|
/* Expands a palette row to an RGB or RGBA row depending
|
||||||
* upon whether you supply trans and num_trans.
|
* upon whether you supply trans and num_trans.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_expand_palette(png_row_infop row_info, png_bytep row,
|
png_do_expand_palette(png_row_infop row_info, png_bytep row,
|
||||||
png_const_colorp palette, png_const_bytep trans_alpha, int num_trans)
|
png_const_colorp palette, png_const_bytep trans_alpha, int num_trans)
|
||||||
{
|
{
|
||||||
@ -4695,7 +4339,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
|
|||||||
/* If the bit depth < 8, it is expanded to 8. Also, if the already
|
/* If the bit depth < 8, it is expanded to 8. Also, if the already
|
||||||
* expanded transparency value is supplied, an alpha channel is built.
|
* expanded transparency value is supplied, an alpha channel is built.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_expand(png_row_infop row_info, png_bytep row,
|
png_do_expand(png_row_infop row_info, png_bytep row,
|
||||||
png_const_color_16p trans_color)
|
png_const_color_16p trans_color)
|
||||||
{
|
{
|
||||||
@ -4925,7 +4569,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
|
|||||||
/* If the bit depth is 8 and the color type is not a palette type expand the
|
/* If the bit depth is 8 and the color type is not a palette type expand the
|
||||||
* whole row to 16 bits. Has no effect otherwise.
|
* whole row to 16 bits. Has no effect otherwise.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_expand_16(png_row_infop row_info, png_bytep row)
|
png_do_expand_16(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
if (row_info->bit_depth == 8 &&
|
if (row_info->bit_depth == 8 &&
|
||||||
@ -4953,7 +4597,7 @@ png_do_expand_16(png_row_infop row_info, png_bytep row)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_quantize(png_row_infop row_info, png_bytep row,
|
png_do_quantize(png_row_infop row_info, png_bytep row,
|
||||||
png_const_bytep palette_lookup, png_const_bytep quantize_lookup)
|
png_const_bytep palette_lookup, png_const_bytep quantize_lookup)
|
||||||
{
|
{
|
||||||
@ -5045,69 +4689,303 @@ png_do_quantize(png_row_infop row_info, png_bytep row,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
|
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
|
||||||
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
|
|
||||||
|
|
||||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
/* Transform the row. The order of transformations is significant,
|
||||||
/* Undoes intrapixel differencing */
|
* and is very touchy. If you add a transformation, take care to
|
||||||
|
* decide how it fits in with the other transformations here.
|
||||||
|
*/
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
|
png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_read_intrapixel");
|
png_debug(1, "in png_do_read_transformations");
|
||||||
|
|
||||||
if (
|
if (png_ptr->row_buf == NULL)
|
||||||
(row_info->color_type & PNG_COLOR_MASK_COLOR))
|
|
||||||
{
|
{
|
||||||
int bytes_per_pixel;
|
/* Prior to 1.5.4 this output row/pass where the NULL pointer is, but this
|
||||||
png_uint_32 row_width = row_info->width;
|
* error is incredibly rare and incredibly easy to debug without this
|
||||||
|
* information.
|
||||||
|
*/
|
||||||
|
png_error(png_ptr, "NULL row buffer");
|
||||||
|
}
|
||||||
|
|
||||||
if (row_info->bit_depth == 8)
|
/* The following is debugging; prior to 1.5.4 the code was never compiled in;
|
||||||
|
* in 1.5.4 PNG_FLAG_DETECT_UNINITIALIZED was added and the macro
|
||||||
|
* PNG_WARN_UNINITIALIZED_ROW removed. In 1.6 the new flag is set only for
|
||||||
|
* all transformations, however in practice the ROW_INIT always gets done on
|
||||||
|
* demand, if necessary.
|
||||||
|
*/
|
||||||
|
if ((png_ptr->flags & PNG_FLAG_DETECT_UNINITIALIZED) != 0 &&
|
||||||
|
!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||||
{
|
{
|
||||||
png_bytep rp;
|
/* Application has failed to call either png_read_start_image() or
|
||||||
png_uint_32 i;
|
* png_read_update_info() after setting transforms that expand pixels.
|
||||||
|
* This check added to libpng-1.2.19 (but not enabled until 1.5.4).
|
||||||
|
*/
|
||||||
|
png_error(png_ptr, "Uninitialized row");
|
||||||
|
}
|
||||||
|
|
||||||
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
|
#ifdef PNG_READ_EXPAND_SUPPORTED
|
||||||
bytes_per_pixel = 3;
|
if (png_ptr->transformations & PNG_EXPAND)
|
||||||
|
{
|
||||||
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
bytes_per_pixel = 4;
|
{
|
||||||
|
png_do_expand_palette(row_info, png_ptr->row_buf + 1,
|
||||||
|
png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
return;
|
|
||||||
|
|
||||||
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
|
|
||||||
{
|
{
|
||||||
*(rp) = (png_byte)((256 + *rp + *(rp + 1)) & 0xff);
|
if (png_ptr->num_trans &&
|
||||||
*(rp+2) = (png_byte)((256 + *(rp + 2) + *(rp + 1)) & 0xff);
|
(png_ptr->transformations & PNG_EXPAND_tRNS))
|
||||||
}
|
png_do_expand(row_info, png_ptr->row_buf + 1,
|
||||||
}
|
&(png_ptr->trans_color));
|
||||||
else if (row_info->bit_depth == 16)
|
|
||||||
{
|
|
||||||
png_bytep rp;
|
|
||||||
png_uint_32 i;
|
|
||||||
|
|
||||||
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
|
|
||||||
bytes_per_pixel = 6;
|
|
||||||
|
|
||||||
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
|
||||||
bytes_per_pixel = 8;
|
|
||||||
|
|
||||||
else
|
else
|
||||||
return;
|
png_do_expand(row_info, png_ptr->row_buf + 1,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
|
#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
|
||||||
|
if ((png_ptr->transformations & PNG_STRIP_ALPHA) &&
|
||||||
|
!(png_ptr->transformations & PNG_COMPOSE) &&
|
||||||
|
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
|
||||||
|
row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
|
||||||
|
png_do_strip_channel(row_info, png_ptr->row_buf + 1,
|
||||||
|
0 /* at_start == false, because SWAP_ALPHA happens later */);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
|
||||||
{
|
{
|
||||||
png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1);
|
int rgb_error =
|
||||||
png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3);
|
png_do_rgb_to_gray(png_ptr, row_info,
|
||||||
png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5);
|
png_ptr->row_buf + 1);
|
||||||
png_uint_32 red = (s0 + s1 + 65536) & 0xffff;
|
|
||||||
png_uint_32 blue = (s2 + s1 + 65536) & 0xffff;
|
if (rgb_error)
|
||||||
*(rp ) = (png_byte)((red >> 8) & 0xff);
|
{
|
||||||
*(rp + 1) = (png_byte)(red & 0xff);
|
png_ptr->rgb_to_gray_status=1;
|
||||||
*(rp + 4) = (png_byte)((blue >> 8) & 0xff);
|
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
|
||||||
*(rp + 5) = (png_byte)(blue & 0xff);
|
PNG_RGB_TO_GRAY_WARN)
|
||||||
|
png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel");
|
||||||
|
|
||||||
|
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
|
||||||
|
PNG_RGB_TO_GRAY_ERR)
|
||||||
|
png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* From Andreas Dilger e-mail to png-implement, 26 March 1998:
|
||||||
|
*
|
||||||
|
* In most cases, the "simple transparency" should be done prior to doing
|
||||||
|
* gray-to-RGB, or you will have to test 3x as many bytes to check if a
|
||||||
|
* pixel is transparent. You would also need to make sure that the
|
||||||
|
* transparency information is upgraded to RGB.
|
||||||
|
*
|
||||||
|
* To summarize, the current flow is:
|
||||||
|
* - Gray + simple transparency -> compare 1 or 2 gray bytes and composite
|
||||||
|
* with background "in place" if transparent,
|
||||||
|
* convert to RGB if necessary
|
||||||
|
* - Gray + alpha -> composite with gray background and remove alpha bytes,
|
||||||
|
* convert to RGB if necessary
|
||||||
|
*
|
||||||
|
* To support RGB backgrounds for gray images we need:
|
||||||
|
* - Gray + simple transparency -> convert to RGB + simple transparency,
|
||||||
|
* compare 3 or 6 bytes and composite with
|
||||||
|
* background "in place" if transparent
|
||||||
|
* (3x compare/pixel compared to doing
|
||||||
|
* composite with gray bkgrnd)
|
||||||
|
* - Gray + alpha -> convert to RGB + alpha, composite with background and
|
||||||
|
* remove alpha bytes (3x float
|
||||||
|
* operations/pixel compared with composite
|
||||||
|
* on gray background)
|
||||||
|
*
|
||||||
|
* Greg's change will do this. The reason it wasn't done before is for
|
||||||
|
* performance, as this increases the per-pixel operations. If we would check
|
||||||
|
* in advance if the background was gray or RGB, and position the gray-to-RGB
|
||||||
|
* transform appropriately, then it would save a lot of work/time.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||||
|
/* If gray -> RGB, do so now only if background is non-gray; else do later
|
||||||
|
* for performance reasons
|
||||||
|
*/
|
||||||
|
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
|
||||||
|
!(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
|
||||||
|
png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
|
||||||
|
defined(PNG_READ_ALPHA_MODE_SUPPORTED)
|
||||||
|
if (png_ptr->transformations & PNG_COMPOSE)
|
||||||
|
png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
|
if ((png_ptr->transformations & PNG_GAMMA) &&
|
||||||
|
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||||
|
/* Because RGB_TO_GRAY does the gamma transform. */
|
||||||
|
!(png_ptr->transformations & PNG_RGB_TO_GRAY) &&
|
||||||
|
#endif
|
||||||
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
|
||||||
|
defined(PNG_READ_ALPHA_MODE_SUPPORTED)
|
||||||
|
/* Because PNG_COMPOSE does the gamma transform if there is something to
|
||||||
|
* do (if there is an alpha channel or transparency.)
|
||||||
|
*/
|
||||||
|
!((png_ptr->transformations & PNG_COMPOSE) &&
|
||||||
|
((png_ptr->num_trans != 0) ||
|
||||||
|
(png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) &&
|
||||||
|
#endif
|
||||||
|
/* Because png_init_read_transformations transforms the palette, unless
|
||||||
|
* RGB_TO_GRAY will do the transform.
|
||||||
|
*/
|
||||||
|
(png_ptr->color_type != PNG_COLOR_TYPE_PALETTE))
|
||||||
|
png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
|
||||||
|
if ((png_ptr->transformations & PNG_STRIP_ALPHA) &&
|
||||||
|
(png_ptr->transformations & PNG_COMPOSE) &&
|
||||||
|
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
|
||||||
|
row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
|
||||||
|
png_do_strip_channel(row_info, png_ptr->row_buf + 1,
|
||||||
|
0 /* at_start == false, because SWAP_ALPHA happens later */);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_ALPHA_MODE_SUPPORTED
|
||||||
|
if ((png_ptr->transformations & PNG_ENCODE_ALPHA) &&
|
||||||
|
(row_info->color_type & PNG_COLOR_MASK_ALPHA))
|
||||||
|
png_do_encode_alpha(row_info, png_ptr->row_buf + 1, png_ptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_SCALE_16_TO_8)
|
||||||
|
png_do_scale_16_to_8(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
|
||||||
|
/* There is no harm in doing both of these because only one has any effect,
|
||||||
|
* by putting the 'scale' option first if the app asks for scale (either by
|
||||||
|
* calling the API or in a TRANSFORM flag) this is what happens.
|
||||||
|
*/
|
||||||
|
if (png_ptr->transformations & PNG_16_TO_8)
|
||||||
|
png_do_chop(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_QUANTIZE)
|
||||||
|
{
|
||||||
|
png_do_quantize(row_info, png_ptr->row_buf + 1,
|
||||||
|
png_ptr->palette_lookup, png_ptr->quantize_index);
|
||||||
|
|
||||||
|
if (row_info->rowbytes == 0)
|
||||||
|
png_error(png_ptr, "png_do_quantize returned rowbytes=0");
|
||||||
}
|
}
|
||||||
|
#endif /* PNG_READ_QUANTIZE_SUPPORTED */
|
||||||
|
|
||||||
|
#ifdef PNG_READ_EXPAND_16_SUPPORTED
|
||||||
|
/* Do the expansion now, after all the arithmetic has been done. Notice
|
||||||
|
* that previous transformations can handle the PNG_EXPAND_16 flag if this
|
||||||
|
* is efficient (particularly true in the case of gamma correction, where
|
||||||
|
* better accuracy results faster!)
|
||||||
|
*/
|
||||||
|
if (png_ptr->transformations & PNG_EXPAND_16)
|
||||||
|
png_do_expand_16(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||||
|
/* NOTE: moved here in 1.5.4 (from much later in this list.) */
|
||||||
|
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
|
||||||
|
(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
|
||||||
|
png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_INVERT_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_INVERT_MONO)
|
||||||
|
png_do_invert(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SHIFT_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_SHIFT)
|
||||||
|
png_do_unshift(row_info, png_ptr->row_buf + 1,
|
||||||
|
&(png_ptr->shift));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_PACK_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_PACK)
|
||||||
|
png_do_unpack(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
|
/* Added at libpng-1.5.10 */
|
||||||
|
if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
|
||||||
|
png_ptr->num_palette_max >= 0)
|
||||||
|
png_do_check_palette_indexes(png_ptr, row_info);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_BGR_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_BGR)
|
||||||
|
png_do_bgr(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_PACKSWAP_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_PACKSWAP)
|
||||||
|
png_do_packswap(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_FILLER_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_FILLER)
|
||||||
|
png_do_read_filler(row_info, png_ptr->row_buf + 1,
|
||||||
|
(png_uint_32)png_ptr->filler, png_ptr->flags);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
||||||
|
png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_SWAP_ALPHA)
|
||||||
|
png_do_read_swap_alpha(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_16BIT_SUPPORTED
|
||||||
|
#ifdef PNG_READ_SWAP_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_SWAP_BYTES)
|
||||||
|
png_do_swap(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_USER_TRANSFORM)
|
||||||
|
{
|
||||||
|
if (png_ptr->read_user_transform_fn != NULL)
|
||||||
|
(*(png_ptr->read_user_transform_fn)) /* User read transform function */
|
||||||
|
(png_ptr, /* png_ptr */
|
||||||
|
row_info, /* row_info: */
|
||||||
|
/* png_uint_32 width; width of row */
|
||||||
|
/* png_size_t rowbytes; number of bytes in row */
|
||||||
|
/* png_byte color_type; color type of pixels */
|
||||||
|
/* png_byte bit_depth; bit depth of samples */
|
||||||
|
/* png_byte channels; number of channels (1-4) */
|
||||||
|
/* png_byte pixel_depth; bits per pixel (depth*channels) */
|
||||||
|
png_ptr->row_buf + 1); /* start of pixel data for row */
|
||||||
|
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
|
||||||
|
if (png_ptr->user_transform_depth)
|
||||||
|
row_info->bit_depth = png_ptr->user_transform_depth;
|
||||||
|
|
||||||
|
if (png_ptr->user_transform_channels)
|
||||||
|
row_info->channels = png_ptr->user_transform_channels;
|
||||||
|
#endif
|
||||||
|
row_info->pixel_depth = (png_byte)(row_info->bit_depth *
|
||||||
|
row_info->channels);
|
||||||
|
|
||||||
|
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->width);
|
||||||
}
|
}
|
||||||
#endif /* PNG_MNG_FEATURES_SUPPORTED */
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
|
||||||
#endif /* PNG_READ_SUPPORTED */
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
69
pngtest.c
69
pngtest.c
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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.)
|
||||||
*
|
*
|
||||||
@ -45,6 +45,11 @@
|
|||||||
|
|
||||||
/* Known chunks that exist in pngtest.png must be supported or pngtest will fail
|
/* Known chunks that exist in pngtest.png must be supported or pngtest will fail
|
||||||
* simply as a result of re-ordering them. This may be fixed in 1.7
|
* simply as a result of re-ordering them. This may be fixed in 1.7
|
||||||
|
*
|
||||||
|
* pngtest allocates a single row buffer for each row and overwrites it,
|
||||||
|
* therefore if the write side doesn't support the writing of interlaced images
|
||||||
|
* nothing can be done for an interlaced image (and the code below will fail
|
||||||
|
* horribly trying to write extra data after writing garbage).
|
||||||
*/
|
*/
|
||||||
#if defined 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_bKGD_SUPPORTED &&\
|
||||||
@ -58,9 +63,15 @@
|
|||||||
defined PNG_READ_sRGB_SUPPORTED &&\
|
defined PNG_READ_sRGB_SUPPORTED &&\
|
||||||
defined PNG_READ_tEXt_SUPPORTED &&\
|
defined PNG_READ_tEXt_SUPPORTED &&\
|
||||||
defined PNG_READ_tIME_SUPPORTED &&\
|
defined PNG_READ_tIME_SUPPORTED &&\
|
||||||
defined PNG_READ_zTXt_SUPPORTED
|
defined PNG_READ_zTXt_SUPPORTED &&\
|
||||||
|
defined PNG_WRITE_INTERLACING_SUPPORTED
|
||||||
|
|
||||||
|
#ifdef PNG_ZLIB_HEADER
|
||||||
|
# include PNG_ZLIB_HEADER /* defined by pnglibconf.h from 1.7 */
|
||||||
|
#else
|
||||||
# include "zlib.h"
|
# include "zlib.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 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
|
||||||
# define PNG_ZBUF_SIZE 8192
|
# define PNG_ZBUF_SIZE 8192
|
||||||
@ -116,10 +127,6 @@ static int unsupported_chunks = 0; /* chunk unsupported by libpng in input */
|
|||||||
static int error_count = 0; /* count calls to png_error */
|
static int error_count = 0; /* count calls to png_error */
|
||||||
static int warning_count = 0; /* count calls to png_warning */
|
static int warning_count = 0; /* count calls to png_warning */
|
||||||
|
|
||||||
#ifdef __TURBOC__
|
|
||||||
#include <mem.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
||||||
#ifndef png_jmpbuf
|
#ifndef png_jmpbuf
|
||||||
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
||||||
@ -725,18 +732,18 @@ static int PNGCBAPI read_user_chunk_callback(png_struct *png_ptr,
|
|||||||
static void
|
static void
|
||||||
write_sTER_chunk(png_structp write_ptr)
|
write_sTER_chunk(png_structp write_ptr)
|
||||||
{
|
{
|
||||||
png_byte png_sTER[5] = {115, 84, 69, 82, '\0'};
|
png_byte sTER[5] = {115, 84, 69, 82, '\0'};
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
fprintf(STDERR, "\n stereo mode = %d\n", user_chunk_data.sTER_mode);
|
fprintf(STDERR, "\n stereo mode = %d\n", user_chunk_data.sTER_mode);
|
||||||
|
|
||||||
png_write_chunk(write_ptr, png_sTER, &user_chunk_data.sTER_mode, 1);
|
png_write_chunk(write_ptr, sTER, &user_chunk_data.sTER_mode, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_vpAg_chunk(png_structp write_ptr)
|
write_vpAg_chunk(png_structp write_ptr)
|
||||||
{
|
{
|
||||||
png_byte png_vpAg[5] = {118, 112, 65, 103, '\0'};
|
png_byte vpAg[5] = {118, 112, 65, 103, '\0'};
|
||||||
|
|
||||||
png_byte vpag_chunk_data[9];
|
png_byte vpag_chunk_data[9];
|
||||||
|
|
||||||
@ -749,7 +756,7 @@ write_vpAg_chunk(png_structp write_ptr)
|
|||||||
png_save_uint_32(vpag_chunk_data, user_chunk_data.vpAg_width);
|
png_save_uint_32(vpag_chunk_data, user_chunk_data.vpAg_width);
|
||||||
png_save_uint_32(vpag_chunk_data + 4, user_chunk_data.vpAg_height);
|
png_save_uint_32(vpag_chunk_data + 4, user_chunk_data.vpAg_height);
|
||||||
vpag_chunk_data[8] = user_chunk_data.vpAg_units;
|
vpag_chunk_data[8] = user_chunk_data.vpAg_units;
|
||||||
png_write_chunk(write_ptr, png_vpAg, vpag_chunk_data, 9);
|
png_write_chunk(write_ptr, vpAg, vpag_chunk_data, 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -830,6 +837,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
png_structp write_ptr;
|
png_structp write_ptr;
|
||||||
png_infop write_info_ptr;
|
png_infop write_info_ptr;
|
||||||
png_infop write_end_info_ptr;
|
png_infop write_end_info_ptr;
|
||||||
|
int interlace_preserved = 1;
|
||||||
#else
|
#else
|
||||||
png_structp write_ptr = NULL;
|
png_structp write_ptr = NULL;
|
||||||
png_infop write_info_ptr = NULL;
|
png_infop write_info_ptr = NULL;
|
||||||
@ -838,7 +846,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
png_bytep row_buf;
|
png_bytep row_buf;
|
||||||
png_uint_32 y;
|
png_uint_32 y;
|
||||||
png_uint_32 width, height;
|
png_uint_32 width, height;
|
||||||
int num_pass, pass;
|
int num_pass = 1, pass;
|
||||||
int bit_depth, color_type;
|
int bit_depth, color_type;
|
||||||
|
|
||||||
row_buf = NULL;
|
row_buf = NULL;
|
||||||
@ -1044,10 +1052,26 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
&color_type, &interlace_type, &compression_type, &filter_type))
|
&color_type, &interlace_type, &compression_type, &filter_type))
|
||||||
{
|
{
|
||||||
png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth,
|
png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth,
|
||||||
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
|
||||||
color_type, interlace_type, compression_type, filter_type);
|
color_type, interlace_type, compression_type, filter_type);
|
||||||
#else
|
#ifndef PNG_READ_INTERLACING_SUPPORTED
|
||||||
color_type, PNG_INTERLACE_NONE, compression_type, filter_type);
|
/* num_pass will not be set below, set it here if the image is
|
||||||
|
* interlaced: what happens is that write interlacing is *not* turned
|
||||||
|
* on an the partial interlaced rows are written directly.
|
||||||
|
*/
|
||||||
|
switch (interlace_type)
|
||||||
|
{
|
||||||
|
case PNG_INTERLACE_NONE:
|
||||||
|
num_pass = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PNG_INTERLACE_ADAM7:
|
||||||
|
num_pass = 7;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
png_error(read_ptr, "invalid interlace type");
|
||||||
|
/*NOT REACHED*/
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1340,14 +1364,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
#endif /* SINGLE_ROWBUF_ALLOC */
|
#endif /* SINGLE_ROWBUF_ALLOC */
|
||||||
pngtest_debug("Writing row data");
|
pngtest_debug("Writing row data");
|
||||||
|
|
||||||
#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
|
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||||
defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
|
||||||
num_pass = png_set_interlace_handling(read_ptr);
|
num_pass = png_set_interlace_handling(read_ptr);
|
||||||
# ifdef PNG_WRITE_SUPPORTED
|
if (png_set_interlace_handling(write_ptr) != num_pass)
|
||||||
png_set_interlace_handling(write_ptr);
|
png_error(write_ptr, "png_set_interlace_handling: inconsistent num_pass");
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
num_pass = 1;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNGTEST_TIMING
|
#ifdef PNGTEST_TIMING
|
||||||
@ -1579,6 +1599,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SUPPORTED /* else nothing was written */
|
#ifdef PNG_WRITE_SUPPORTED /* else nothing was written */
|
||||||
|
if (interlace_preserved) /* else the files will be changed */
|
||||||
{
|
{
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
@ -1965,9 +1986,9 @@ main(void)
|
|||||||
fprintf(STDERR,
|
fprintf(STDERR,
|
||||||
" test ignored because libpng was not built with read support\n");
|
" test ignored because libpng was not built with read support\n");
|
||||||
/* And skip this test */
|
/* And skip this test */
|
||||||
return 77;
|
return PNG_LIBPNG_VER < 10600 ? 0 : 77;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_6_8 Your_png_h_is_not_version_1_6_8;
|
typedef png_libpng_version_1_6_9 Your_png_h_is_not_version_1_6_9;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.2 [April 25, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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.)
|
||||||
*
|
*
|
||||||
@ -57,7 +57,9 @@ png_set_packing(png_structrp png_ptr)
|
|||||||
if (png_ptr->bit_depth < 8)
|
if (png_ptr->bit_depth < 8)
|
||||||
{
|
{
|
||||||
png_ptr->transformations |= PNG_PACK;
|
png_ptr->transformations |= PNG_PACK;
|
||||||
|
# ifdef PNG_WRITE_SUPPORTED
|
||||||
png_ptr->usr_bit_depth = 8;
|
png_ptr->usr_bit_depth = 8;
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
6
pngwio.c
6
pngwio.c
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngwio.c - functions for data output
|
/* pngwio.c - functions for data output
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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.)
|
||||||
*
|
*
|
||||||
@ -153,6 +153,7 @@ png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr,
|
|||||||
PNG_UNUSED(output_flush_fn)
|
PNG_UNUSED(output_flush_fn)
|
||||||
#endif /* PNG_WRITE_FLUSH_SUPPORTED */
|
#endif /* PNG_WRITE_FLUSH_SUPPORTED */
|
||||||
|
|
||||||
|
#ifdef PNG_READ_SUPPORTED
|
||||||
/* It is an error to read while writing a png file */
|
/* It is an error to read while writing a png file */
|
||||||
if (png_ptr->read_data_fn != NULL)
|
if (png_ptr->read_data_fn != NULL)
|
||||||
{
|
{
|
||||||
@ -162,5 +163,6 @@ png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr,
|
|||||||
"Can't set both read_data_fn and write_data_fn in the"
|
"Can't set both read_data_fn and write_data_fn in the"
|
||||||
" same structure");
|
" same structure");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* PNG_WRITE_SUPPORTED */
|
#endif /* PNG_WRITE_SUPPORTED */
|
||||||
|
69
pngwrite.c
69
pngwrite.c
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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.)
|
||||||
*
|
*
|
||||||
@ -607,6 +607,71 @@ png_write_image(png_structrp png_ptr, png_bytepp image)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||||
|
/* Performs intrapixel differencing */
|
||||||
|
static void
|
||||||
|
png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
|
||||||
|
{
|
||||||
|
png_debug(1, "in png_do_write_intrapixel");
|
||||||
|
|
||||||
|
if ((row_info->color_type & PNG_COLOR_MASK_COLOR))
|
||||||
|
{
|
||||||
|
int bytes_per_pixel;
|
||||||
|
png_uint_32 row_width = row_info->width;
|
||||||
|
if (row_info->bit_depth == 8)
|
||||||
|
{
|
||||||
|
png_bytep rp;
|
||||||
|
png_uint_32 i;
|
||||||
|
|
||||||
|
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
|
||||||
|
bytes_per_pixel = 3;
|
||||||
|
|
||||||
|
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
||||||
|
bytes_per_pixel = 4;
|
||||||
|
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
|
||||||
|
{
|
||||||
|
*(rp) = (png_byte)((*rp - *(rp + 1)) & 0xff);
|
||||||
|
*(rp + 2) = (png_byte)((*(rp + 2) - *(rp + 1)) & 0xff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_16BIT_SUPPORTED
|
||||||
|
else if (row_info->bit_depth == 16)
|
||||||
|
{
|
||||||
|
png_bytep rp;
|
||||||
|
png_uint_32 i;
|
||||||
|
|
||||||
|
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
|
||||||
|
bytes_per_pixel = 6;
|
||||||
|
|
||||||
|
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
||||||
|
bytes_per_pixel = 8;
|
||||||
|
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
|
||||||
|
{
|
||||||
|
png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1);
|
||||||
|
png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3);
|
||||||
|
png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5);
|
||||||
|
png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL);
|
||||||
|
png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL);
|
||||||
|
*(rp ) = (png_byte)((red >> 8) & 0xff);
|
||||||
|
*(rp + 1) = (png_byte)(red & 0xff);
|
||||||
|
*(rp + 4) = (png_byte)((blue >> 8) & 0xff);
|
||||||
|
*(rp + 5) = (png_byte)(blue & 0xff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* PNG_WRITE_16BIT_SUPPORTED */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* PNG_MNG_FEATURES_SUPPORTED */
|
||||||
|
|
||||||
/* Called by user to write a row of image data */
|
/* Called by user to write a row of image data */
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_write_row(png_structrp png_ptr, png_const_bytep row)
|
png_write_row(png_structrp png_ptr, png_const_bytep row)
|
||||||
|
207
pngwtran.c
207
pngwtran.c
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.0 [February 14, 2013]
|
* Last changed in libpng 1.6.9 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 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,90 +14,14 @@
|
|||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SUPPORTED
|
#ifdef PNG_WRITE_SUPPORTED
|
||||||
|
|
||||||
#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
|
#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
|
||||||
/* Transform the data according to the user's wishes. The order of
|
|
||||||
* transformations is significant.
|
|
||||||
*/
|
|
||||||
void /* PRIVATE */
|
|
||||||
png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info)
|
|
||||||
{
|
|
||||||
png_debug(1, "in png_do_write_transformations");
|
|
||||||
|
|
||||||
if (png_ptr == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_USER_TRANSFORM)
|
|
||||||
if (png_ptr->write_user_transform_fn != NULL)
|
|
||||||
(*(png_ptr->write_user_transform_fn)) /* User write transform
|
|
||||||
function */
|
|
||||||
(png_ptr, /* png_ptr */
|
|
||||||
row_info, /* row_info: */
|
|
||||||
/* png_uint_32 width; width of row */
|
|
||||||
/* png_size_t rowbytes; number of bytes in row */
|
|
||||||
/* png_byte color_type; color type of pixels */
|
|
||||||
/* png_byte bit_depth; bit depth of samples */
|
|
||||||
/* png_byte channels; number of channels (1-4) */
|
|
||||||
/* png_byte pixel_depth; bits per pixel (depth*channels) */
|
|
||||||
png_ptr->row_buf + 1); /* start of pixel data for row */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_FILLER_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_FILLER)
|
|
||||||
png_do_strip_channel(row_info, png_ptr->row_buf + 1,
|
|
||||||
!(png_ptr->flags & PNG_FLAG_FILLER_AFTER));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_PACKSWAP)
|
|
||||||
png_do_packswap(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_PACK_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_PACK)
|
|
||||||
png_do_pack(row_info, png_ptr->row_buf + 1,
|
|
||||||
(png_uint_32)png_ptr->bit_depth);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SWAP_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_SWAP_BYTES)
|
|
||||||
png_do_swap(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SHIFT_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_SHIFT)
|
|
||||||
png_do_shift(row_info, png_ptr->row_buf + 1,
|
|
||||||
&(png_ptr->shift));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_SWAP_ALPHA)
|
|
||||||
png_do_write_swap_alpha(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
|
||||||
png_do_write_invert_alpha(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_BGR_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_BGR)
|
|
||||||
png_do_bgr(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_INVERT_SUPPORTED
|
|
||||||
if (png_ptr->transformations & PNG_INVERT_MONO)
|
|
||||||
png_do_invert(row_info, png_ptr->row_buf + 1);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_WRITE_PACK_SUPPORTED
|
#ifdef PNG_WRITE_PACK_SUPPORTED
|
||||||
/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The
|
/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The
|
||||||
* row_info bit depth should be 8 (one pixel per byte). The channels
|
* row_info bit depth should be 8 (one pixel per byte). The channels
|
||||||
* should be 1 (this only happens on grayscale and paletted images).
|
* should be 1 (this only happens on grayscale and paletted images).
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_pack");
|
png_debug(1, "in png_do_pack");
|
||||||
@ -242,7 +166,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
|
|||||||
* would pass 3 as bit_depth, and this routine would translate the
|
* would pass 3 as bit_depth, and this routine would translate the
|
||||||
* data to 0 to 15.
|
* data to 0 to 15.
|
||||||
*/
|
*/
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_shift(png_row_infop row_info, png_bytep row,
|
png_do_shift(png_row_infop row_info, png_bytep row,
|
||||||
png_const_color_8p bit_depth)
|
png_const_color_8p bit_depth)
|
||||||
{
|
{
|
||||||
@ -381,7 +305,7 @@ png_do_shift(png_row_infop row_info, png_bytep row,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
|
png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_write_swap_alpha");
|
png_debug(1, "in png_do_write_swap_alpha");
|
||||||
@ -475,7 +399,7 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||||
void /* PRIVATE */
|
static void
|
||||||
png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_write_invert_alpha");
|
png_debug(1, "in png_do_write_invert_alpha");
|
||||||
@ -568,70 +492,81 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
|
|
||||||
|
|
||||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
/* Transform the data according to the user's wishes. The order of
|
||||||
/* Undoes intrapixel differencing */
|
* transformations is significant.
|
||||||
|
*/
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
|
png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info)
|
||||||
{
|
{
|
||||||
png_debug(1, "in png_do_write_intrapixel");
|
png_debug(1, "in png_do_write_transformations");
|
||||||
|
|
||||||
if ((row_info->color_type & PNG_COLOR_MASK_COLOR))
|
if (png_ptr == NULL)
|
||||||
{
|
|
||||||
int bytes_per_pixel;
|
|
||||||
png_uint_32 row_width = row_info->width;
|
|
||||||
if (row_info->bit_depth == 8)
|
|
||||||
{
|
|
||||||
png_bytep rp;
|
|
||||||
png_uint_32 i;
|
|
||||||
|
|
||||||
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
|
|
||||||
bytes_per_pixel = 3;
|
|
||||||
|
|
||||||
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
|
||||||
bytes_per_pixel = 4;
|
|
||||||
|
|
||||||
else
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
|
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
|
||||||
{
|
if (png_ptr->transformations & PNG_USER_TRANSFORM)
|
||||||
*(rp) = (png_byte)((*rp - *(rp + 1)) & 0xff);
|
if (png_ptr->write_user_transform_fn != NULL)
|
||||||
*(rp + 2) = (png_byte)((*(rp + 2) - *(rp + 1)) & 0xff);
|
(*(png_ptr->write_user_transform_fn)) /* User write transform
|
||||||
}
|
function */
|
||||||
}
|
(png_ptr, /* png_ptr */
|
||||||
|
row_info, /* row_info: */
|
||||||
|
/* png_uint_32 width; width of row */
|
||||||
|
/* png_size_t rowbytes; number of bytes in row */
|
||||||
|
/* png_byte color_type; color type of pixels */
|
||||||
|
/* png_byte bit_depth; bit depth of samples */
|
||||||
|
/* png_byte channels; number of channels (1-4) */
|
||||||
|
/* png_byte pixel_depth; bits per pixel (depth*channels) */
|
||||||
|
png_ptr->row_buf + 1); /* start of pixel data for row */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_16BIT_SUPPORTED
|
#ifdef PNG_WRITE_FILLER_SUPPORTED
|
||||||
else if (row_info->bit_depth == 16)
|
if (png_ptr->transformations & PNG_FILLER)
|
||||||
{
|
png_do_strip_channel(row_info, png_ptr->row_buf + 1,
|
||||||
png_bytep rp;
|
!(png_ptr->flags & PNG_FLAG_FILLER_AFTER));
|
||||||
png_uint_32 i;
|
#endif
|
||||||
|
|
||||||
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
|
#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
|
||||||
bytes_per_pixel = 6;
|
if (png_ptr->transformations & PNG_PACKSWAP)
|
||||||
|
png_do_packswap(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
|
#ifdef PNG_WRITE_PACK_SUPPORTED
|
||||||
bytes_per_pixel = 8;
|
if (png_ptr->transformations & PNG_PACK)
|
||||||
|
png_do_pack(row_info, png_ptr->row_buf + 1,
|
||||||
|
(png_uint_32)png_ptr->bit_depth);
|
||||||
|
#endif
|
||||||
|
|
||||||
else
|
#ifdef PNG_WRITE_SWAP_SUPPORTED
|
||||||
return;
|
if (png_ptr->transformations & PNG_SWAP_BYTES)
|
||||||
|
png_do_swap(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
|
#ifdef PNG_WRITE_SHIFT_SUPPORTED
|
||||||
{
|
if (png_ptr->transformations & PNG_SHIFT)
|
||||||
png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1);
|
png_do_shift(row_info, png_ptr->row_buf + 1,
|
||||||
png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3);
|
&(png_ptr->shift));
|
||||||
png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5);
|
#endif
|
||||||
png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL);
|
|
||||||
png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL);
|
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
||||||
*(rp ) = (png_byte)((red >> 8) & 0xff);
|
if (png_ptr->transformations & PNG_SWAP_ALPHA)
|
||||||
*(rp + 1) = (png_byte)(red & 0xff);
|
png_do_write_swap_alpha(row_info, png_ptr->row_buf + 1);
|
||||||
*(rp + 4) = (png_byte)((blue >> 8) & 0xff);
|
#endif
|
||||||
*(rp + 5) = (png_byte)(blue & 0xff);
|
|
||||||
|
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_INVERT_ALPHA)
|
||||||
|
png_do_write_invert_alpha(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_BGR_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_BGR)
|
||||||
|
png_do_bgr(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_INVERT_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_INVERT_MONO)
|
||||||
|
png_do_invert(row_info, png_ptr->row_buf + 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
|
||||||
#endif /* PNG_WRITE_16BIT_SUPPORTED */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* PNG_MNG_FEATURES_SUPPORTED */
|
|
||||||
#endif /* PNG_WRITE_SUPPORTED */
|
#endif /* PNG_WRITE_SUPPORTED */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
VisualStudio instructions
|
VisualStudio instructions
|
||||||
|
|
||||||
libpng version 1.6.8 - December 19, 2013
|
libpng version 1.6.9 - February 6, 2014
|
||||||
|
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* zlib.props - location of zlib source
|
* zlib.props - location of zlib source
|
||||||
*
|
*
|
||||||
* libpng version 1.6.8 - December 19, 2013
|
* libpng version 1.6.9 - February 6, 2014
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
Makefiles for libpng version 1.6.8 - December 19, 2013
|
Makefiles for libpng version 1.6.9 - February 6, 2014
|
||||||
|
|
||||||
pnglibconf.h.prebuilt => Stores configuration settings
|
pnglibconf.h.prebuilt => Stores configuration settings
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng16.so.16.1.6.8)
|
(gcc, creates libpng16.so.16.1.6.9)
|
||||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||||
ansi2knr (Requires ansi2knr.c from
|
ansi2knr (Requires ansi2knr.c from
|
||||||
@ -20,7 +20,7 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
|||||||
makefile.dec => DEC Alpha UNIX makefile
|
makefile.dec => DEC Alpha UNIX makefile
|
||||||
makefile.dj2 => DJGPP 2 makefile
|
makefile.dj2 => DJGPP 2 makefile
|
||||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||||
(gcc, creates libpng16.so.16.1.6.8)
|
(gcc, creates libpng16.so.16.1.6.9)
|
||||||
makefile.freebsd => FreeBSD makefile
|
makefile.freebsd => FreeBSD makefile
|
||||||
makefile.gcc => Generic gcc makefile
|
makefile.gcc => Generic gcc makefile
|
||||||
makefile.hpgcc => HPUX makefile using gcc
|
makefile.hpgcc => HPUX makefile using gcc
|
||||||
@ -35,12 +35,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
|||||||
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
||||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
makefile.sggcc => Silicon Graphics (gcc,
|
makefile.sggcc => Silicon Graphics (gcc,
|
||||||
creates libpng16.so.16.1.6.8)
|
creates libpng16.so.16.1.6.9)
|
||||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||||
creates libpng16.so.16.1.6.8)
|
creates libpng16.so.16.1.6.9)
|
||||||
makefile.so9 => Solaris 9 makefile (gcc,
|
makefile.so9 => Solaris 9 makefile (gcc,
|
||||||
creates libpng16.so.16.1.6.8)
|
creates libpng16.so.16.1.6.9)
|
||||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||||
makefile.sunos => Sun makefile
|
makefile.sunos => Sun makefile
|
||||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||||
|
@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
|
|||||||
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
|
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
|
||||||
PNG_DFN ""
|
PNG_DFN ""
|
||||||
PNG_DFN "EXPORTS"
|
PNG_DFN "EXPORTS"
|
||||||
PNG_DFN ";Version 1.6.8"
|
PNG_DFN ";Version 1.6.9"
|
||||||
|
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
||||||
|
@ -49,4 +49,4 @@ pngwrite.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,
|
|||||||
pngwtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
|
pngwtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
|
||||||
pngwutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
|
pngwutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h,pnginfo.h, pngdebug.h
|
||||||
|
|
||||||
pngtest.obj : png.h, pngconf.h
|
pngtest.obj : png.h, pngconf.h, pnglibconf.h
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
# Modeled after libxml-config.
|
# Modeled after libxml-config.
|
||||||
|
|
||||||
version=1.6.8
|
version=1.6.9
|
||||||
prefix=""
|
prefix=""
|
||||||
libdir=""
|
libdir=""
|
||||||
libs=""
|
libs=""
|
||||||
|
@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
|
|||||||
|
|
||||||
Name: libpng
|
Name: libpng
|
||||||
Description: Loads and saves PNG files
|
Description: Loads and saves PNG files
|
||||||
Version: 1.6.8
|
Version: 1.6.9
|
||||||
Libs: -L${libdir} -lpng16
|
Libs: -L${libdir} -lpng16
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on Solaris 2.x with cc
|
# makefile for libpng on Solaris 2.x with cc
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
|
|
||||||
@ -45,8 +45,8 @@ ZLIBINC=/usr/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
|
||||||
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@ -77,8 +77,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -196,7 +199,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
@ -205,7 +208,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on Solaris 2.x with cc
|
# makefile for libpng on Solaris 2.x with cc
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
|
|
||||||
@ -45,8 +45,8 @@ ZLIBINC=/usr/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g
|
||||||
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@ -77,8 +77,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -196,7 +199,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
@ -205,7 +208,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng using gcc (generic, static library)
|
# makefile for libpng using gcc (generic, static library)
|
||||||
# Copyright (C) 2002, 2006-2009 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
@ -41,42 +41,37 @@ DESTDIR=
|
|||||||
DI=$(DESTDIR)$(INCPATH)
|
DI=$(DESTDIR)$(INCPATH)
|
||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
|
|
||||||
CDEBUG = -g -DPNG_DEBUG=5
|
WARNMORE =
|
||||||
LDDEBUG =
|
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CRELEASE = -O2
|
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
|
||||||
LDRELEASE = -s
|
LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
WARNMORE=-W -Wall
|
|
||||||
CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
|
|
||||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm $(LDRELEASE)
|
|
||||||
|
|
||||||
# File extensions
|
|
||||||
O=.o
|
|
||||||
A=.a
|
|
||||||
E=
|
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
||||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
all: $(LIBNAME)$(A) pngtest$(E)
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
all: $(LIBNAME).a pngtest$(E)
|
||||||
|
|
||||||
include scripts/pnglibconf.mak
|
include scripts/pnglibconf.mak
|
||||||
REMOVE = $(RM_F)
|
REMOVE = $(RM_F)
|
||||||
DFNFLAGS = $(DEFS) $(CPPFLAGS)
|
DFNFLAGS = $(DEFS) $(CPPFLAGS)
|
||||||
|
|
||||||
$(LIBNAME)$(A): $(OBJS)
|
$(LIBNAME).a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
test: pngtest$(E)
|
test: pngtest$(E)
|
||||||
./pngtest$(E)
|
./pngtest$(E)
|
||||||
|
|
||||||
pngtest$(E): pngtest$(O) $(LIBNAME)$(A)
|
pngtest$(E): pngtest.o $(LIBNAME).a
|
||||||
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
|
$(LD) -o $@ pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
install: $(LIBNAME)$(A)
|
install: $(LIBNAME).a
|
||||||
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
@ -92,30 +87,30 @@ install: $(LIBNAME)$(A)
|
|||||||
$(DI)/$(LIBNAME)/pnglibconf.h
|
$(DI)/$(LIBNAME)/pnglibconf.h
|
||||||
-@$(RM_F) -r $(DI)/libpng
|
-@$(RM_F) -r $(DI)/libpng
|
||||||
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
-@$(RM_F) $(DL)/$(LIBNAME)$(A)
|
-@$(RM_F) $(DL)/$(LIBNAME).a
|
||||||
-@$(RM_F) $(DL)/libpng$(A)
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
|
cp $(LIBNAME).a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME)$(A)
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
(cd $(DL); $(LN_SF) $(LIBNAME)$(A) libpng$(A))
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
(cd $(DI); $(LN_SF) libpng/* .;)
|
(cd $(DI); $(LN_SF) libpng/* .;)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png pnglibconf.h
|
$(RM_F) *.o $(LIBNAME).a pngtest pngout.png pnglibconf.h
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest.o: png.h pngconf.h pnglibconf.h
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -9,9 +9,10 @@
|
|||||||
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
|
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
|
||||||
# rules for library management
|
# rules for library management
|
||||||
#
|
#
|
||||||
CFLAGS=-I..\zlib -O
|
CPPFLAGS = -I..\zlib
|
||||||
|
CFLAGS = -O
|
||||||
LBR = png.lib
|
LBR = png.lib
|
||||||
LDFLAGS=-lpng -lz -lm
|
LDFLAGS = -L. -L..\zlib -lpng -lz -lm
|
||||||
|
|
||||||
# where make install puts libpng.a and png.h
|
# where make install puts libpng.a and png.h
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
@ -36,6 +37,9 @@ OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
|
|||||||
|
|
||||||
all: $(LBR) pngtest.ttp
|
all: $(LBR) pngtest.ttp
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
$(LBR): $(OBJS)
|
$(LBR): $(OBJS)
|
||||||
|
|
||||||
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
|
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
|
||||||
|
@ -43,7 +43,8 @@ LDEBUG=$(LDEBUG) -N
|
|||||||
# -d merge duplicate strings
|
# -d merge duplicate strings
|
||||||
# -k- turn off standard stack frame
|
# -k- turn off standard stack frame
|
||||||
# -w display all warnings
|
# -w display all warnings
|
||||||
CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
|
CPPFLAGS=-I$(ZLIB_DIR)
|
||||||
|
CFLAGS=-O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
|
||||||
|
|
||||||
# -M generate map file
|
# -M generate map file
|
||||||
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
|
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
|
||||||
@ -89,10 +90,11 @@ LIBNAME=libpng.lib
|
|||||||
# Braces let make "batch" calls to the compiler,
|
# Braces let make "batch" calls to the compiler,
|
||||||
# 2 calls instead of 12; space is important.
|
# 2 calls instead of 12; space is important.
|
||||||
.c.obj:
|
.c.obj:
|
||||||
$(CC) $(CFLAGS) -c {$*.c }
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
|
||||||
|
|
||||||
.c.exe:
|
.c.exe:
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
|
||||||
|
$(LIBNAME) zlib.lib $(NOEHLIB)
|
||||||
|
|
||||||
.obj.exe:
|
.obj.exe:
|
||||||
$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
|
$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on BeOS x86 ELF with gcc
|
# makefile for libpng on BeOS x86 ELF with gcc
|
||||||
# modified from makefile.linux by Sander Stoks
|
# modified from makefile.linux by Sander Stoks
|
||||||
# Copyright (C) 2002, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1999 Greg Roelofs
|
# Copyright (C) 1999 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@ -40,8 +40,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
||||||
# still here in R4.5
|
# still here in R4.5
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=-W -Wall -O1 -funroll-loops $(ALIGN) # $(WARNMORE) -g
|
||||||
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
||||||
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
|
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
|
||||||
|
|
||||||
@ -76,6 +76,9 @@ OBJSDLL = $(OBJS)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# try include scripts/pnglibconf.mak for more options
|
# try include scripts/pnglibconf.mak for more options
|
||||||
@ -176,14 +179,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) $(CFLAGS) \
|
$(CC) -I$(DI) $(CPPFLAGS) $(CFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
|
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -51,7 +51,8 @@ LDEBUG=$(LDEBUG) -N
|
|||||||
# -w set all warnings on
|
# -w set all warnings on
|
||||||
# -O2 optimize for speed
|
# -O2 optimize for speed
|
||||||
# -Z global optimization
|
# -Z global optimization
|
||||||
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
|
CPPFLAGS=-I$(ZLIB_DIR)
|
||||||
|
CFLAGS=-O2 -Z -X- -w -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
|
||||||
|
|
||||||
# -M generate map file
|
# -M generate map file
|
||||||
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
|
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
|
||||||
@ -99,10 +100,11 @@ LIBNAME=libpng$(MODEL).lib
|
|||||||
# Braces let make "batch" calls to the compiler,
|
# Braces let make "batch" calls to the compiler,
|
||||||
# 2 calls instead of 12; space is important.
|
# 2 calls instead of 12; space is important.
|
||||||
.c.obj:
|
.c.obj:
|
||||||
$(CC) $(CFLAGS) -c {$*.c }
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
|
||||||
|
|
||||||
.c.exe:
|
.c.exe:
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
|
||||||
|
$(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
|
||||||
|
|
||||||
## Major targets
|
## Major targets
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
VERMAJ = 1
|
VERMAJ = 1
|
||||||
VERMIN = 6
|
VERMIN = 6
|
||||||
VERMIC = 8
|
VERMIC = 9
|
||||||
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
||||||
NAME = libpng
|
NAME = libpng
|
||||||
PACKAGE = $(NAME)-$(VER)
|
PACKAGE = $(NAME)-$(VER)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Darwin / Mac OS X
|
# makefile for libpng on Darwin / Mac OS X
|
||||||
# Copyright (C) 2002, 2004, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2004, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2001 Christoph Pfisterer
|
# Copyright (C) 2001 Christoph Pfisterer
|
||||||
# derived from makefile.linux:
|
# derived from makefile.linux:
|
||||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||||
@ -37,8 +37,9 @@ RANLIB=ranlib
|
|||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
ARCH=-arch ppc -arch i386 -arch x86_64
|
ARCH=-arch ppc -arch i386 -arch x86_64
|
||||||
|
|
||||||
# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
|
CPPFLAGS=-I$(ZLIBINC)
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops $(ARCH)
|
# CFLAGS=-W -Wall -O3 -funroll-loops
|
||||||
|
CFLAGS=-W -Wall -O -funroll-loops $(ARCH)
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz $(ARCH)
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz $(ARCH)
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@ -69,8 +70,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fno-common -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -176,14 +180,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on DEC Alpha Unix
|
# makefile for libpng on DEC Alpha Unix
|
||||||
# Copyright (C) 2000-2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -53,13 +53,17 @@ DM=$(DESTDIR)$(MANPATH)
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS=-std -w1 -O # -g
|
||||||
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
|
all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
@ -161,7 +165,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -w1 -I$(DI) -I$(ZLIBINC) \
|
$(CC) -w1 -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
@ -170,7 +174,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -w1 -I$(ZLIBINC) \
|
$(CC) -w1 $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB) \
|
-L$(ZLIBLIB) -R$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# DJGPP (DOS gcc) makefile for libpng
|
# DJGPP (DOS gcc) makefile for libpng
|
||||||
# Copyright (C) 2002, 2006, 2009-2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -13,7 +13,8 @@ INCPATH=$(prefix)/include
|
|||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(prefix)/lib
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS=-I../zlib -O -DPNG_NO_SNPRINTF
|
CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
|
||||||
|
CFLAGS=-O
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
@ -22,6 +23,9 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
|||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
|
||||||
pngmem.o pngerror.o pngpread.o
|
pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
||||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs
|
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs
|
||||||
# and Glenn Randers-Pehrson
|
# and Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@ -54,8 +54,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-W -Wall -D_REENTRANT -O2 \
|
CPPFLAGS=-D_REENTRANT # -DPNG_DEBUG=5
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=-W -Wall -O2 $(ALIGN) # $(WARNMORE) -g
|
||||||
|
|
||||||
LDFLAGS=-L. -lpng16
|
LDFLAGS=-L. -lpng16
|
||||||
LDFLAGS_A=libpng.a -lz -lm
|
LDFLAGS_A=libpng.a -lz -lm
|
||||||
@ -90,6 +90,9 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
@ -111,7 +114,7 @@ libpng.pc:
|
|||||||
-e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
|
-e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc
|
||||||
|
|
||||||
libpng.syms: png.h pngconf.h pnglibconf.h
|
libpng.syms: png.h pngconf.h pnglibconf.h
|
||||||
$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
|
$(CC) $(CPPFLAGS) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
|
||||||
awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG16_%s {global:\n",PNGMAJ)}\
|
awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG16_%s {global:\n",PNGMAJ)}\
|
||||||
{ for (i=1;i+2<=NF;++i)\
|
{ for (i=1;i+2<=NF;++i)\
|
||||||
if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
|
if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
|
||||||
@ -220,14 +223,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# makefile for libpng under FreeBSD
|
# makefile for libpng under FreeBSD
|
||||||
|
# Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||||
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
|
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -35,12 +36,16 @@ LDADD+= -lm -lz
|
|||||||
|
|
||||||
DPADD+= ${LIBM} ${LIBZ}
|
DPADD+= ${LIBM} ${LIBZ}
|
||||||
|
|
||||||
CFLAGS+= -I. -I${ZLIBINC}
|
CPPFLAGS+= -I. -I${ZLIBINC}
|
||||||
|
CFLAGS+= -W -Wall
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
pngtest: pngtest.o libpng.a
|
pngtest: pngtest.o libpng.a
|
||||||
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
|
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
|
||||||
-lpng ${LDADD}
|
-lpng ${LDADD}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng using gcc (generic, static library)
|
# makefile for libpng using gcc (generic, static library)
|
||||||
# Copyright (C) 2008 Glenn Randers-Pehrson
|
# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -18,25 +18,21 @@ AR_RC = ar rcs
|
|||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
RM_F = rm -f
|
RM_F = rm -f
|
||||||
|
|
||||||
CDEBUG = -g -DPNG_DEBUG=5
|
WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
LDDEBUG =
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
CRELEASE = -O2
|
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||||
LDRELEASE = -s
|
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
#CFLAGS = -W -Wall $(CDEBUG)
|
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
|
||||||
CFLAGS = -W -Wall $(CRELEASE)
|
LDFLAGS =
|
||||||
#LDFLAGS = $(LDDEBUG)
|
|
||||||
LDFLAGS = $(LDRELEASE)
|
|
||||||
LIBS = -lz -lm
|
LIBS = -lz -lm
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
O=.o
|
EXEEXT =
|
||||||
A=.a
|
|
||||||
EXE=
|
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
||||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
all: static
|
all: static
|
||||||
@ -45,43 +41,43 @@ all: static
|
|||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
cp scripts/pnglibconf.h.prebuilt $@
|
||||||
|
|
||||||
.c$(O):
|
.c.o:
|
||||||
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
static: libpng$(A) pngtest$(EXE)
|
static: libpng.a pngtest$(EXEEXT)
|
||||||
|
|
||||||
shared:
|
shared:
|
||||||
@echo This is a generic makefile that cannot create shared libraries.
|
@echo This is a generic makefile that cannot create shared libraries.
|
||||||
@echo Please use a configuration that is specific to your platform.
|
@echo Please use a configuration that is specific to your platform.
|
||||||
@false
|
@false
|
||||||
|
|
||||||
libpng$(A): $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
test: pngtest$(EXE)
|
test: pngtest$(EXEEXT)
|
||||||
./pngtest$(EXE)
|
./pngtest$(EXEEXT)
|
||||||
|
|
||||||
pngtest$(EXE): pngtest$(O) libpng$(A)
|
pngtest$(EXEEXT): pngtest.o libpng.a
|
||||||
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
|
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest.o libpng.a $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h
|
$(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest.o: png.h pngconf.h pnglibconf.h
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||||
# Copyright (C) 1999-2002, 2006, 2009, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||||
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||||
#
|
#
|
||||||
@ -36,11 +36,11 @@ LN_SF=ln -sf
|
|||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
CPPFLAGS=-I$(ZLIBINC) \
|
||||||
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_UNISTD_H -DUSE_MMAP
|
||||||
|
CFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
|
||||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||||
CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
CCFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
|
||||||
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
|
||||||
|
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
@ -75,8 +75,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -179,7 +182,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
|
$(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
@ -188,7 +191,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(CCFLAGS) \
|
$(CC) $(CPPFLAGS) $(CCFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
||||||
# Copyright (C) 2002, 2006-2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2001, Laurent faillie
|
# Copyright (C) 2001, Laurent faillie
|
||||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -53,8 +53,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=-W -Wall -O3 -funroll-loops $(ALIGN) # $(WARNMORE) -g
|
||||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
|
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
|
|
||||||
@ -86,8 +86,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -185,7 +188,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
@ -194,7 +197,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||||
# Copyright (C) 1999-2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||||
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||||
#
|
#
|
||||||
@ -14,7 +14,8 @@ ZLIBINC=/opt/zlib/include
|
|||||||
# Note that if you plan to build a libpng shared library, zlib must also
|
# Note that if you plan to build a libpng shared library, zlib must also
|
||||||
# be a shared library, which zlib's configure does not do. After running
|
# be a shared library, which zlib's configure does not do. After running
|
||||||
# zlib's configure, edit the appropriate lines of makefile to read:
|
# zlib's configure, edit the appropriate lines of makefile to read:
|
||||||
# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
|
# CPPFLAGS=-DHAVE_UNISTD -DUSE_MAP
|
||||||
|
# CFLAGS=-O1 -fPIC
|
||||||
# LDSHARED=ld -b
|
# LDSHARED=ld -b
|
||||||
# SHAREDLIB=libz.sl
|
# SHAREDLIB=libz.sl
|
||||||
|
|
||||||
@ -44,9 +45,10 @@ LIBPATH=$(exec_prefix)/lib
|
|||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(exec_prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
CPPFLAGS=-I$(ZLIBINC)
|
||||||
|
CFLAGS=-O -Ae +DA1.1 +DS2.0
|
||||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||||
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
CCFLAGS=-O -Ae +DA1.1 +DS2.0
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
@ -72,8 +74,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -176,7 +181,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
|
$(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
@ -185,7 +190,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(CCFLAGS) \
|
$(CC) $(CPPFLAGS) $(CCFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Makefile for libpng (static)
|
# Makefile for libpng (static)
|
||||||
# IBM C version 3.x for Win32 and OS/2
|
# IBM C version 3.x for Win32 and OS/2
|
||||||
# Copyright (C) 2006 Glenn Randers-Pehrson
|
# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -23,7 +23,8 @@ LD = ilink
|
|||||||
AR = ilib
|
AR = ilib
|
||||||
RM = del
|
RM = del
|
||||||
|
|
||||||
CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
|
CPPFLAGS = -I$(ZLIBINC)
|
||||||
|
CFLAGS = -Mc -O2 -W3
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
@ -39,6 +40,9 @@ OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
|||||||
LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
|
LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
|
.c$(O):
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
all: libpng$(A) pngtest$(E)
|
all: libpng$(A) pngtest$(E)
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Makefile for libpng
|
# Makefile for libpng
|
||||||
# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later
|
# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later
|
||||||
|
|
||||||
# Copyright (C) 2006 Glenn Randers-Pehrson
|
# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
|
# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
|
||||||
# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
|
# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@ -32,7 +32,8 @@ CALLING=r # __fastcall
|
|||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
CC=icl -c
|
CC=icl -c
|
||||||
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
|
CPPFLAGS=-I$(ZLIBINC)
|
||||||
|
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -nologo
|
||||||
LD=link
|
LD=link
|
||||||
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
|
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
|
||||||
|
|
||||||
@ -49,49 +50,49 @@ pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
|||||||
cp scripts/pnglibconf.h.prebuilt $@
|
cp scripts/pnglibconf.h.prebuilt $@
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
libpng.lib: $(OBJS)
|
libpng.lib: $(OBJS)
|
||||||
if exist libpng.lib del libpng.lib
|
if exist libpng.lib del libpng.lib
|
||||||
@ -101,7 +102,7 @@ pngtest.exe: pngtest.obj libpng.lib
|
|||||||
$(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
|
$(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
test: pngtest.exe
|
test: pngtest.exe
|
||||||
pngtest.exe
|
pngtest.exe
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -27,7 +27,8 @@ LIBPATH=$(prefix)/lib
|
|||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
CFLAGS=-I../zlib -O
|
CPPFLAGS = -I../zlib
|
||||||
|
CFLAGS = -O
|
||||||
LDFLAGS = -L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS = -L. -L../zlib/ -lpng -lz -lm
|
||||||
# flags for ansi2knr
|
# flags for ansi2knr
|
||||||
ANSI2KNRFLAGS=
|
ANSI2KNRFLAGS=
|
||||||
@ -48,12 +49,12 @@ pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
|||||||
# general rule to allow ansi2knr to work
|
# general rule to allow ansi2knr to work
|
||||||
.c.o:
|
.c.o:
|
||||||
./ansi2knr $*.c T$*.c
|
./ansi2knr $*.c T$*.c
|
||||||
$(CC) $(CFLAGS) -c T$*.c
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c T$*.c
|
||||||
rm -f T$*.c $*.o
|
rm -f T$*.c $*.o
|
||||||
mv T$*.o $*.o
|
mv T$*.o $*.o
|
||||||
|
|
||||||
ansi2knr: ansi2knr.c
|
ansi2knr: ansi2knr.c
|
||||||
$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
|
||||||
|
|
||||||
libpng.a: ansi2knr $(OBJS)
|
libpng.a: ansi2knr $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
ar rc $@ $(OBJS)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
# makefile for libpng.a and libpng16.so on Linux ELF with gcc
|
||||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs and
|
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
|
||||||
# Glenn Randers-Pehrson
|
# Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@ -10,7 +10,7 @@
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng16
|
LIBNAME = libpng16
|
||||||
PNGMAJ = 16
|
PNGMAJ = 16
|
||||||
RELEASE = 8
|
RELEASE = 9
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).so
|
LIBSO=$(LIBNAME).so
|
||||||
@ -48,7 +48,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS= -W -Wall -O3 -funroll-loops \
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
|
|
||||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
@ -82,6 +83,9 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
@ -196,14 +200,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) Glenn Randers-Pehrson
|
# Copyright (C) 1998-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -22,7 +22,8 @@ LIBPATH=$(prefix)/lib
|
|||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
|
CPPFLAGS=-I../zlib -DSYSV -Dmips
|
||||||
|
CFLAGS=-O -systype sysv -w
|
||||||
#CFLAGS=-O
|
#CFLAGS=-O
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||||
|
|
||||||
@ -33,6 +34,9 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
|||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
# Copyright (C) 2006, 2009 Glenn Randers-Pehrson
|
# Copyright (C) 2006, 2009, 2014 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
|
||||||
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
# -------- Microsoft C 5.1 and later, does not use assembler code --------
|
# -------- Microsoft C 5.1 and later, does not use assembler code --------
|
||||||
MODEL=L
|
MODEL=L
|
||||||
CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
|
CPPFLAGS=-I..\zlib
|
||||||
|
CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL)
|
||||||
#-Ox generates bad code with MSC 5.1
|
#-Ox generates bad code with MSC 5.1
|
||||||
CC=cl
|
CC=cl
|
||||||
LD=link
|
LD=link
|
||||||
@ -32,49 +33,49 @@ pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
|||||||
cp scripts/pnglibconf.h.prebuilt $@
|
cp scripts/pnglibconf.h.prebuilt $@
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
||||||
del libpng.lib
|
del libpng.lib
|
||||||
@ -83,7 +84,7 @@ libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
|||||||
lib libpng $(OBJS3);
|
lib libpng $(OBJS3);
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtest.exe: pngtest.obj libpng.lib
|
pngtest.exe: pngtest.obj libpng.lib
|
||||||
$(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ;
|
$(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
|
# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
|
||||||
#
|
#
|
||||||
# Portions taken from makefile.linux:
|
# Portions taken from makefile.linux:
|
||||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs and
|
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
|
||||||
# Glenn Randers-Pehrson
|
# Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -18,7 +18,7 @@ exec_prefix=$(prefix)
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng16
|
LIBNAME = libpng16
|
||||||
PNGMAJ = 16
|
PNGMAJ = 16
|
||||||
RELEASE = 8
|
RELEASE = 9
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).dll
|
LIBSO=$(LIBNAME).dll
|
||||||
@ -44,20 +44,13 @@ LN_SF=ln -sf
|
|||||||
#ARCH = -march=pentium3
|
#ARCH = -march=pentium3
|
||||||
#ARCH = -march=i686
|
#ARCH = -march=i686
|
||||||
ARCH =
|
ARCH =
|
||||||
CDEBUG = -g -DPNG_DEBUG=5
|
CPPFLAGS = # -DPNG_DEBUG=5
|
||||||
LDDEBUG =
|
CFLAGS = -W -Wall -O2 $(ARCH) # -g
|
||||||
CRELEASE = -O2
|
LDFLAGS =
|
||||||
LDRELEASE = -s
|
|
||||||
#CFLAGS = -W -Wall $(CDEBUG)
|
|
||||||
CFLAGS = -W -Wall $(CRELEASE) $(ARCH)
|
|
||||||
#LDFLAGS = $(LDDEBUG)
|
|
||||||
LDFLAGS = $(LDRELEASE)
|
|
||||||
LIBS = -lz -lm
|
LIBS = -lz -lm
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
O=.o
|
EXEEXT=.exe
|
||||||
A=.a
|
|
||||||
EXE=.exe
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(exec_prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
@ -81,9 +74,9 @@ DL=$(DESTDIR)$(LIBPATH)
|
|||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
||||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
all: static shared
|
all: static shared
|
||||||
@ -92,10 +85,10 @@ all: static shared
|
|||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
cp scripts/pnglibconf.h.prebuilt $@
|
||||||
|
|
||||||
.c$(O):
|
.c.o:
|
||||||
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
static: libpng$(A) pngtest$(EXE)
|
static: libpng.a pngtest$(EXEEXT)
|
||||||
|
|
||||||
shared: $(LIBSOMAJ)
|
shared: $(LIBSOMAJ)
|
||||||
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSO)
|
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSO)
|
||||||
@ -106,7 +99,7 @@ $(LIBSO): $(LIBSOMAJ)
|
|||||||
$(LIBSOMAJ):
|
$(LIBSOMAJ):
|
||||||
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ)
|
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ)
|
||||||
|
|
||||||
libpng$(A): $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
@ -175,30 +168,30 @@ install-config: libpng-config
|
|||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
test: pngtest$(EXE)
|
test: pngtest$(EXEEXT)
|
||||||
./pngtest$(EXE)
|
./pngtest$(EXEEXT)
|
||||||
|
|
||||||
pngtest$(EXE): pngtest$(O) libpng$(A)
|
pngtest$(EXEEXT): pngtest.o libpng.a
|
||||||
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
|
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest.o libpng.a $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h $(LIBSO) \
|
$(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h $(LIBSO) \
|
||||||
$(LIBSOMAJ) libpng-config
|
$(LIBSOMAJ) libpng-config
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest.o: png.h pngconf.h pnglibconf.h
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# make obj && make depend && make && make test
|
# make obj && make depend && make && make test
|
||||||
# make includes && make install
|
# make includes && make install
|
||||||
# Copyright (C) 2002 Patrick R.L. Welche
|
# Copyright (C) 2002 Patrick R.L. Welche
|
||||||
# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
|
# Copyright (C) 2007, 2009, 2014 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
|
||||||
@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16
|
|||||||
|
|
||||||
LIB= png16
|
LIB= png16
|
||||||
SHLIB_MAJOR= 0
|
SHLIB_MAJOR= 0
|
||||||
SHLIB_MINOR= 1.6.8
|
SHLIB_MINOR= 1.6.9
|
||||||
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
|
||||||
@ -34,6 +34,9 @@ CPPFLAGS+=-I${.CURDIR}
|
|||||||
|
|
||||||
CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
cp scripts/pnglibconf.h.prebuilt $@
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# make obj && make depend && make && make test
|
# make obj && make depend && make && make test
|
||||||
# make includes && make install
|
# make includes && make install
|
||||||
# Copyright (C) 2002 Patrick R.L. Welche
|
# Copyright (C) 2002 Patrick R.L. Welche
|
||||||
# Copyright (C) 2007-2009 Glenn Randers-Pehrson
|
# Copyright (C) 2007-2009, 2014 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
|
||||||
@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
|
|||||||
|
|
||||||
LIB= png
|
LIB= png
|
||||||
SHLIB_MAJOR= 16
|
SHLIB_MAJOR= 16
|
||||||
SHLIB_MINOR= 1.6.8
|
SHLIB_MINOR= 1.6.9
|
||||||
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
|
||||||
@ -34,6 +34,9 @@ CPPFLAGS+=-I${.CURDIR}
|
|||||||
|
|
||||||
CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
cp scripts/pnglibconf.h.prebuilt $@
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
|
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
# Copyright (C) 2007-2009 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
|
||||||
@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
|
|||||||
MANDIR= ${PREFIX}/man/cat
|
MANDIR= ${PREFIX}/man/cat
|
||||||
|
|
||||||
SHLIB_MAJOR= 16
|
SHLIB_MAJOR= 16
|
||||||
SHLIB_MINOR= 1.6.8
|
SHLIB_MINOR= 1.6.9
|
||||||
|
|
||||||
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 \
|
||||||
@ -31,6 +31,9 @@ MAN= libpng.3 libpngpf.3 png.5
|
|||||||
DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
|
DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
|
||||||
libpng-manual.txt
|
libpng-manual.txt
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
cp scripts/pnglibconf.h.prebuilt $@
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
|
# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
|
||||||
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
||||||
# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@ -37,7 +37,8 @@ exec_prefix=$(prefix)
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
CFLAGS= -dy -belf -I$(ZLIBINC) -O3
|
CPPFLAGS=-I$(ZLIBINC)
|
||||||
|
CFLAGS= -dy -belf -O3
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@ -68,8 +69,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -175,14 +179,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) $(CFLAGS) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
||||||
# Copyright (C) 2001-2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -42,8 +42,9 @@ ZLIBINC=../zlib
|
|||||||
# See "man abi". zlib must be built with the same ABI.
|
# See "man abi". zlib must be built with the same ABI.
|
||||||
ABI=
|
ABI=
|
||||||
|
|
||||||
WARNMORE= # -g -DPNG_DEBUG=5
|
WARNMORE=
|
||||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
|
||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||||
-set_version sgi$(PNGMAJ).0
|
-set_version sgi$(PNGMAJ).0
|
||||||
@ -74,6 +75,9 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
|||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest shared libpng.pc libpng-config
|
all: libpng.a pngtest shared libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
@ -182,7 +186,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-rpath $(ZLIBLIB):$(DL) \
|
-rpath $(ZLIBLIB):$(DL) \
|
||||||
@ -192,7 +196,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
|
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc'
|
||||||
# Copyright (C) 2001-2002, 2006, 2007, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -44,8 +44,9 @@ ABI=
|
|||||||
|
|
||||||
WARNMORE=-fullwarn
|
WARNMORE=-fullwarn
|
||||||
# Note: -KPIC is the default anyhow
|
# Note: -KPIC is the default anyhow
|
||||||
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE)
|
#CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g
|
||||||
|
CFLAGS=$(ABI) -O $(WARNMORE)
|
||||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||||
@ -77,6 +78,9 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
|||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest shared libpng.pc libpng-config
|
all: libpng.a pngtest shared libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
@ -182,7 +186,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-rpath $(ZLIBLIB):$(DL) \
|
-rpath $(ZLIBLIB):$(DL) \
|
||||||
@ -192,7 +196,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
|
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# makefile for libpng on Solaris 9 (beta) with Forte cc
|
# makefile for libpng on Solaris 9 (beta) with Forte cc
|
||||||
# Updated by Chad Schrock for Solaris 9
|
# Updated by Chad Schrock for Solaris 9
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2002, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998-2001 Greg Roelofs
|
# Copyright (C) 1998-2001 Greg Roelofs
|
||||||
# Copyright (C) 1996-1997 Andreas Dilger
|
# Copyright (C) 1996-1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@ -46,8 +46,9 @@ ZLIBINC=/usr/include
|
|||||||
#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
|
#CFLAGS=-W -Wall -O3 $(WARNMORE) -g
|
||||||
|
CFLAGS=-O3
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@ -78,8 +79,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -194,7 +198,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
||||||
@ -203,7 +207,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Solaris 2.x with gcc
|
# makefile for libpng on Solaris 2.x with gcc
|
||||||
# Copyright (C) 2004, 2006-2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -42,7 +42,8 @@ ZLIBINC=/usr/local/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS= -W -Wall -O \
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
# $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
|
|
||||||
@ -74,8 +75,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@ -191,7 +195,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
||||||
@ -200,7 +204,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Solaris 2.x with gcc
|
# makefile for libpng on Solaris 2.x with gcc
|
||||||
# Copyright (C) 2004, 2006-2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@ -42,8 +42,8 @@ ZLIBINC=/usr/local/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=-W -Wall -O # $(WARNMORE) -g
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@ -74,6 +74,9 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
@ -191,7 +194,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
||||||
@ -200,7 +203,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -40,13 +40,17 @@ ECHO = echo
|
|||||||
|
|
||||||
DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
|
DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
|
||||||
DFA_EXTRA = # extra files that can be used to control configuration
|
DFA_EXTRA = # extra files that can be used to control configuration
|
||||||
CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS = -O # -g
|
||||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt,
|
# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@ -39,13 +39,17 @@ LN_SF=ln -f -s
|
|||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS=-O # $(WARNMORE)
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# see scripts/pnglibconf.mak for more options
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
# To use, do "make -fmakefile.tc3"
|
# To use, do "make -fmakefile.tc3"
|
||||||
|
|
||||||
# ----- Turbo C 3.00 (can be modified to work with earlier versions) -----
|
# ----- Turbo C++ 3.0 -----
|
||||||
|
|
||||||
MODEL=l
|
MODEL=l
|
||||||
CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib
|
CPPFLAGS=-I..\zlib
|
||||||
#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00
|
CFLAGS=-O2 -Z -m$(MODEL)
|
||||||
CC=tcc
|
CC=tcc
|
||||||
LD=tcc
|
LD=tcc
|
||||||
LIB=tlib
|
LIB=tlib
|
||||||
@ -35,52 +35,52 @@ test: pngtest$(E)
|
|||||||
pngtest$(E)
|
pngtest$(E)
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
||||||
$(LIB) libpng$(MODEL) +$(OBJSL1)
|
$(LIB) libpng$(MODEL) +$(OBJSL1)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 1998 Tim Wegner
|
# Copyright (C) 1998 Tim Wegner
|
||||||
# Copyright (C) 2006,2009,2011 Glenn Randers-Pehrson
|
# Copyright (C) 2006,2009,2011,2014 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
|
||||||
@ -15,7 +15,8 @@
|
|||||||
CC = cl
|
CC = cl
|
||||||
LD = link
|
LD = link
|
||||||
AR = lib
|
AR = lib
|
||||||
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3 -I..\zlib
|
CPPFLAGS = -I..\zlib
|
||||||
|
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3
|
||||||
LDFLAGS = -nologo
|
LDFLAGS = -nologo
|
||||||
ARFLAGS = -nologo
|
ARFLAGS = -nologo
|
||||||
RM = del
|
RM = del
|
||||||
@ -40,56 +41,56 @@ pnglibconf.h: scripts\pnglibconf.h.prebuilt
|
|||||||
copy scripts\pnglibconf.h.prebuilt $@
|
copy scripts\pnglibconf.h.prebuilt $@
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
libpng.lib: $(OBJS)
|
libpng.lib: $(OBJS)
|
||||||
-$(RM) $@
|
-$(RM) $@
|
||||||
$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
|
$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtest.exe: pngtest$(O) libpng.lib
|
pngtest.exe: pngtest$(O) libpng.lib
|
||||||
$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
|
$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
|
||||||
|
@ -480,6 +480,7 @@ option INCH_CONVERSIONS
|
|||||||
= INCH_CONVERSIONS INCH_CONVERSIONS
|
= INCH_CONVERSIONS INCH_CONVERSIONS
|
||||||
|
|
||||||
# API to build a grayscale palette
|
# API to build a grayscale palette
|
||||||
|
# NOTE: this is not used internally by libpng at present.
|
||||||
|
|
||||||
option BUILD_GRAYSCALE_PALETTE
|
option BUILD_GRAYSCALE_PALETTE
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/* libpng 1.6.8 STANDARD API DEFINITION */
|
/* libpng 1.6.9 STANDARD API DEFINITION */
|
||||||
|
|
||||||
/* pnglibconf.h - library build configuration */
|
/* pnglibconf.h - library build configuration */
|
||||||
|
|
||||||
/* Libpng version 1.6.8 - December 19, 2013 */
|
/* Libpng version 1.6.9 - February 6, 2014 */
|
||||||
|
|
||||||
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
;Version 1.6.8
|
;Version 1.6.9
|
||||||
;--------------------------------------------------------------
|
;--------------------------------------------------------------
|
||||||
; 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
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec ./pngvalid --standard --interlace
|
exec ./pngvalid --standard --progressive-read
|
||||||
|
Loading…
x
Reference in New Issue
Block a user