[libpng10] Imported from libpng-1.0.50.tar

This commit is contained in:
Glenn Randers-Pehrson 2009-09-10 18:41:08 -05:00
parent e058ce14ea
commit afbb32433c
50 changed files with 287 additions and 184 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.0.48 - August 13, 2009 Libpng 1.0.50 - September 10, 2009
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,43 @@ 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.0.48.tar.xz (LZMA-compressed, recommended) libpng-1.0.50.tar.xz (LZMA-compressed, recommended)
libpng-1.0.48.tar.gz libpng-1.0.50.tar.gz
libpng-1.0.48.tar.bz2 libpng-1.0.50.tar.bz2
Source files with LF line endings (for Unix/Linux) without the Source files with LF line endings (for Unix/Linux) without the
"configure" script "configure" script
libpng-1.0.48-no-config.tar.xz (LZMA-compressed, recommended) libpng-1.0.50-no-config.tar.xz (LZMA-compressed, recommended)
libpng-1.0.48-no-config.tar.gz libpng-1.0.50-no-config.tar.gz
libpng-1.0.48-no-config.tar.bz2 libpng-1.0.50-no-config.tar.bz2
Source files with CRLF line endings (for Windows), without the Source files with CRLF line endings (for Windows), without the
"configure" script "configure" script
lpng1048.zip lpng1050.zip
lpng1048.7z lpng1050.7z
lpng1048.tar.bz2 lpng1050.tar.bz2
Project files Project files
libpng-1.0.48-project-netware.zip libpng-1.0.50-project-netware.zip
libpng-1.0.48-project-wince.zip libpng-1.0.50-project-wince.zip
Other information: Other information:
libpng-1.0.48-README.txt libpng-1.0.50-README.txt
libpng-1.0.48-KNOWNBUGS.txt libpng-1.0.50-KNOWNBUGS.txt
libpng-1.0.48-LICENSE.txt libpng-1.0.50-LICENSE.txt
libpng-1.0.48-Y2K-compliance.txt libpng-1.0.50-Y2K-compliance.txt
Changes since the last public release (1.0.47): Changes since the last public release (1.0.49):
version 1.0.48 [August 13, 2009] version 1.0.50 [September 10, 2009]
version 1.0.50 [September 10, 2009]
Removed some editing cruft from pngset.c and pngwutil.c.
Added a prototype for png_64bit_product() in png.h
Expanded the information about prototypes in the libpng style section of
the documentation.
Rebuilt configure scripts with autoconf-2.64.
Avoid a possible NULL dereference in debug build, in png_set_text_2().
(bug introduced in libpng-0.95, discovered by Evan Rouault)
Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec
from <http://tukaani.org/xz>.
Reject attempt to write iCCP chunk with negative embedded profile length
(JD Chen)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net

13
CHANGES
View File

@ -2448,6 +2448,19 @@ version 1.2.39c01 [August 6, 2009]
version 1.2.39 and 1.0.48 [August 13, 2009] version 1.2.39 and 1.0.48 [August 13, 2009]
No changes. No changes.
version 1.2.40beta01 [August 20, 2009]
Removed an extra png_debug() recently added to png_write_find_filter().
Fixed incorrect #ifdef in pngset.c regarding unknown chunk support.
version 1.2.40rc01 [September 2, 2009]
Various bugfixes and improvements to CMakeLists.txt (Philip Lowman)
version 1.2.40 and 1.0.49 [September 10, 2009]
No changes.
version 1.0.50 [September 10, 2009]
Removed some editing cruft from pngset.c and pngwutil.c.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement https://lists.sourceforge.net/lists/listinfo/png-mng-implement

16
INSTALL
View File

@ -1,5 +1,5 @@
Installing libpng version 1.0.48 - August 13, 2009 Installing libpng version 1.0.50 - September 10, 2009
On Unix/Linux and similar systems, you can simply type On Unix/Linux and similar systems, you can simply type
@ -44,7 +44,7 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed. correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they You can rename the directories that you downloaded (they
might be called "libpng-1.0.48" or "lpng109" and "zlib-1.2.1" might be called "libpng-1.0.50" or "lpng109" and "zlib-1.2.1"
or "zlib121") so that you have directories called "zlib" and "libpng". or "zlib121") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this: Your directory structure should look like this:
@ -101,9 +101,9 @@ include
CMakeLists.txt => "cmake" script CMakeLists.txt => "cmake" script
makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning, makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng10.so.0.1.0.48) gcc, creates libpng10.so.0.1.0.50)
makefile.linux => Linux/ELF makefile makefile.linux => Linux/ELF makefile
(gcc, creates libpng10.so.0.1.0.48) (gcc, creates libpng10.so.0.1.0.50)
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
@ -125,14 +125,14 @@ include
makefile.openbsd => OpenBSD makefile makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, makefile.sggcc => Silicon Graphics (gcc,
creates libpng10.so.0.1.0.48) creates libpng10.so.0.1.0.50)
makefile.sunos => Sun makefile makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng10.so.0.1.0.48) creates libpng10.so.0.1.0.50)
makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc, makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc,
creates libpng10.so.0.1.0.48) creates libpng10.so.0.1.0.50)
makefile.so9 => Solaris 9 makefile (gcc, makefile.so9 => Solaris 9 makefile (gcc,
creates libpng10.so.0.1.0.48) creates libpng10.so.0.1.0.50)
makefile.32sunu => Sun Ultra 32-bit makefile makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc

View File

@ -1,5 +1,5 @@
Known bugs in libpng version 1.0.48 Known bugs in libpng version 1.0.50
1. February 23, 2006: The custom makefiles don't build libpng with -lz. 1. February 23, 2006: The custom makefiles don't build libpng with -lz.

View File

@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license. This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.0.48, August 13, 2009, are libpng versions 1.2.6, August 15, 2004, through 1.0.50, September 10, 2009, are
Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are Copyright (c) 2004, 2006-2009 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
August 13, 2009 September 10, 2009

View File

@ -86,7 +86,7 @@ EXTRA_DIST= \
${srcdir}/contrib/pngsuite/* \ ${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \ ${srcdir}/contrib/visupng/* \
$(TESTS) \ $(TESTS) \
example.c libpng-1.0.48.txt pngvcrd.c example.c libpng-1.0.50.txt pngvcrd.c
CLEANFILES= pngout.png libpng10.pc libpng10-config libpng.vers \ CLEANFILES= pngout.png libpng10.pc libpng10-config libpng.vers \
libpng.sym libpng.sym

View File

@ -352,7 +352,7 @@ EXTRA_DIST = \
${srcdir}/contrib/pngsuite/* \ ${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \ ${srcdir}/contrib/visupng/* \
$(TESTS) \ $(TESTS) \
example.c libpng-1.0.48.txt pngvcrd.c example.c libpng-1.0.50.txt pngvcrd.c
CLEANFILES = pngout.png libpng10.pc libpng10-config libpng.vers \ CLEANFILES = pngout.png libpng10.pc libpng10-config libpng.vers \
libpng.sym libpng.sym

14
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.0.48 - August 13, 2009 (shared library 10.0) README for libpng version 1.0.50 - September 10, 2009 (shared library 10.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.
@ -194,11 +194,11 @@ Files in this distribution:
descrip.mms => VMS makefile for MMS or MMK descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning, makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng10.so.0.1.0.48) gcc, creates libpng10.so.0.1.0.50)
makefile.linux => Linux/ELF makefile makefile.linux => Linux/ELF makefile
(gcc, creates libpng10.so.0.1.0.48) (gcc, creates libpng10.so.0.1.0.50)
makefile.gcmmx => Linux/ELF makefile makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng10.so.0.1.0.48, (gcc, creates libpng10.so.0.1.0.50,
uses assembler code tuned for Intel MMX platform) uses assembler code tuned for Intel MMX platform)
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
@ -220,12 +220,12 @@ Files in this distribution:
makefile.openbsd => OpenBSD makefile makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics makefile.sggcc => Silicon Graphics
(gcc, creates libpng10.so.0.1.0.48) (gcc, creates libpng10.so.0.1.0.50)
makefile.sunos => Sun makefile makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng10.so.0.1.0.48) (gcc, creates libpng10.so.0.1.0.50)
makefile.so9 => Solaris 9 makefile makefile.so9 => Solaris 9 makefile
(gcc, creates libpng10.so.0.1.0.48) (gcc, creates libpng10.so.0.1.0.50)
makefile.32sunu => Sun Ultra 32-bit makefile makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc

View File

@ -1,13 +1,13 @@
Y2K compliance in libpng: Y2K compliance in libpng:
========================= =========================
August 13, 2009 September 10, 2009
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.0.48 are Y2K compliant. It is my belief that earlier upward through 1.0.50 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer Libpng only has three year fields. One is a 2-byte unsigned integer

24
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for libpng 1.0.48. # Generated by GNU Autoconf 2.64 for libpng 1.0.50.
# #
# Report bugs to <png-mng-implement@lists.sourceforge.net>. # Report bugs to <png-mng-implement@lists.sourceforge.net>.
# #
@ -698,8 +698,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='libpng' PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng' PACKAGE_TARNAME='libpng'
PACKAGE_VERSION='1.0.48' PACKAGE_VERSION='1.0.50'
PACKAGE_STRING='libpng 1.0.48' PACKAGE_STRING='libpng 1.0.50'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
PACKAGE_URL='' PACKAGE_URL=''
@ -1432,7 +1432,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures libpng 1.0.48 to adapt to many kinds of systems. \`configure' configures libpng 1.0.50 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1502,7 +1502,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of libpng 1.0.48:";; short | recursive ) echo "Configuration of libpng 1.0.50:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1609,7 +1609,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
libpng configure 1.0.48 libpng configure 1.0.50
generated by GNU Autoconf 2.64 generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc. Copyright (C) 2009 Free Software Foundation, Inc.
@ -2034,7 +2034,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by libpng $as_me 1.0.48, which was It was created by libpng $as_me 1.0.50, which was
generated by GNU Autoconf 2.64. Invocation command line was generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@ $ $0 $@
@ -2842,7 +2842,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='libpng' PACKAGE='libpng'
VERSION='1.0.48' VERSION='1.0.50'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -2906,10 +2906,10 @@ fi
PNGLIB_VERSION=1.0.48 PNGLIB_VERSION=1.0.50
PNGLIB_MAJOR=1 PNGLIB_MAJOR=1
PNGLIB_MINOR=0 PNGLIB_MINOR=0
PNGLIB_RELEASE=48 PNGLIB_RELEASE=50
@ -12047,7 +12047,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by libpng $as_me 1.0.48, which was This file was extended by libpng $as_me 1.0.50, which was
generated by GNU Autoconf 2.64. Invocation command line was generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -12111,7 +12111,7 @@ Report bugs to <png-mng-implement@lists.sourceforge.net>."
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\ ac_cs_version="\\
libpng config.status 1.0.48 libpng config.status 1.0.50
configured by $0, generated by GNU Autoconf 2.64, configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -18,15 +18,15 @@ AC_PREREQ(2.59)
dnl Version number stuff here: dnl Version number stuff here:
AC_INIT([libpng], [1.0.48], [png-mng-implement@lists.sourceforge.net]) AC_INIT([libpng], [1.0.50], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake dnl stop configure from automagically running automake
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
PNGLIB_VERSION=1.0.48 PNGLIB_VERSION=1.0.50
PNGLIB_MAJOR=1 PNGLIB_MAJOR=1
PNGLIB_MINOR=0 PNGLIB_MINOR=0
PNGLIB_RELEASE=48 PNGLIB_RELEASE=50
dnl End of version number stuff dnl End of version number stuff

View File

@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng libpng.txt - A description on how to use and modify libpng
libpng version 1.0.48 - August 13, 2009 libpng version 1.0.50 - September 10, 2009
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-2009 Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.0.48 - August 13, 2009 libpng versions 0.97, January 1998, through 1.0.50 - September 10, 2009
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -2963,13 +2963,13 @@ source.
XIII. Y2K Compliance in libpng XIII. Y2K Compliance in libpng
August 13, 2009 September 10, 2009
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.0.48 are Y2K compliant. It is my belief that earlier upward through 1.0.50 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that Libpng only has three year fields. One is a 2-byte unsigned integer that

View File

@ -1,6 +1,6 @@
.TH LIBPNG 3 "August 13, 2009" .TH LIBPNG 3 "September 10, 2009"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.48 libpng \- Portable Network Graphics (PNG) Reference Library 1.0.50
.SH SYNOPSIS .SH SYNOPSIS
\fI\fB \fI\fB
@ -821,7 +821,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT .SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng libpng.txt - A description on how to use and modify libpng
libpng version 1.0.48 - August 13, 2009 libpng version 1.0.50 - September 10, 2009
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-2009 Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -832,7 +832,7 @@ libpng.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.0.48 - August 13, 2009 libpng versions 0.97, January 1998, through 1.0.50 - September 10, 2009
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -3784,13 +3784,13 @@ source.
.SH XIII. Y2K Compliance in libpng .SH XIII. Y2K Compliance in libpng
August 13, 2009 September 10, 2009
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.0.48 are Y2K compliant. It is my belief that earlier upward through 1.0.50 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that Libpng only has three year fields. One is a 2-byte unsigned integer that
@ -4069,6 +4069,9 @@ the first widely used release:
1.2.39rc01 13 10239 12.so.0.39[.0] 1.2.39rc01 13 10239 12.so.0.39[.0]
1.0.48 10 10048 10.so.0.48[.0] 1.0.48 10 10048 10.so.0.48[.0]
1.2.39 13 10239 12.so.0.39[.0] 1.2.39 13 10239 12.so.0.39[.0]
1.2.40rc01 13 10240 12.so.0.40[.0]
1.0.49 10 10049 10.so.0.49[.0]
1.2.40 13 10240 12.so.0.40[.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
@ -4124,7 +4127,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.0.48 - August 13, 2009: Libpng version 1.0.50 - September 10, 2009:
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).
@ -4147,7 +4150,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.0.48, August 13, 2009, are libpng versions 1.2.6, August 15, 2004, through 1.0.50, September 10, 2009, are
Copyright (c) 2004,2006-2008 Glenn Randers-Pehrson, and are Copyright (c) 2004,2006-2008 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
@ -4246,7 +4249,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
August 13, 2009 September 10, 2009
.\" end of man page .\" end of man page

View File

@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "August 13, 2009" .TH LIBPNGPF 3 "September 10, 2009"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.48 libpng \- Portable Network Graphics (PNG) Reference Library 1.0.50
(private functions) (private functions)
.SH SYNOPSIS .SH SYNOPSIS
\fB#include <png.h>\fP \fB#include <png.h>\fP

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "August 13, 2009" .TH PNG 5 "September 10, 2009"
.SH NAME .SH NAME
png \- Portable Network Graphics (PNG) format png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION .SH DESCRIPTION

4
png.c
View File

@ -16,7 +16,7 @@
#include "png.h" #include "png.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 version_1_0_48 Your_png_h_is_not_version_1_0_48; typedef version_1_0_50 Your_png_h_is_not_version_1_0_50;
/* Version information for C files. This had better match the version /* Version information for C files. This had better match the version
* string defined in png.h. */ * string defined in png.h. */
@ -705,7 +705,7 @@ png_charp PNGAPI
png_get_copyright(png_structp png_ptr) png_get_copyright(png_structp png_ptr)
{ {
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */ png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
return ((png_charp) "\n libpng version 1.0.48 - August 13, 2009\n\ return ((png_charp) "\n libpng version 1.0.50 - September 10, 2009\n\
Copyright (c) 1998-2009 Glenn Randers-Pehrson\n\ Copyright (c) 1998-2009 Glenn Randers-Pehrson\n\
Copyright (c) 1996-1997 Andreas Dilger\n\ Copyright (c) 1996-1997 Andreas Dilger\n\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n"); Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");

44
png.h
View File

@ -1,6 +1,6 @@
/* png.h - header file for PNG reference library /* png.h - header file for PNG reference library
* *
* libpng version 1.0.48 - August 13, 2009 * libpng version 1.0.50 - September 10, 2009
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 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.)
@ -10,7 +10,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.0.48 - August 13, 2009: Glenn * libpng versions 0.97, January 1998, through 1.0.50 - September 10, 2009: Glenn
* See also "Contributing Authors", below. * See also "Contributing Authors", below.
* *
* Note about libpng version numbers: * Note about libpng version numbers:
@ -241,6 +241,10 @@
* 1.2.39rc01 13 10239 12.so.0.39[.0] * 1.2.39rc01 13 10239 12.so.0.39[.0]
* 1.0.48 10 10048 10.so.0.48[.0] * 1.0.48 10 10048 10.so.0.48[.0]
* 1.2.39 13 10239 12.so.0.39[.0] * 1.2.39 13 10239 12.so.0.39[.0]
* 1.2.40beta01 13 10240 12.so.0.40[.0]
* 1.2.40rc01 13 10240 12.so.0.40[.0]
* 1.0.49 10 10049 10.so.0.49[.0]
* 1.2.40 13 10240 12.so.0.40[.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
@ -272,7 +276,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.0.48, August 13, 2009, are * libpng versions 1.2.6, August 15, 2004, through 1.0.50, September 10, 2009, are
* Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are * Copyright (c) 2004, 2006-2009 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:
@ -384,13 +388,13 @@
* Y2K compliance in libpng: * Y2K compliance in libpng:
* ========================= * =========================
* *
* August 13, 2009 * September 10, 2009
* *
* 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.0.48 are Y2K compliant. It is my belief that earlier * upward through 1.0.50 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant. * versions were also Y2K compliant.
* *
* Libpng only has three year fields. One is a 2-byte unsigned integer * Libpng only has three year fields. One is a 2-byte unsigned integer
@ -446,9 +450,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.0.48" #define PNG_LIBPNG_VER_STRING "1.0.50"
#define PNG_HEADER_VERSION_STRING \ #define PNG_HEADER_VERSION_STRING \
" libpng version 1.0.48 - August 13, 2009\n" " libpng version 1.0.50 - September 10, 2009\n"
#define PNG_LIBPNG_VER_SONUM 0 #define PNG_LIBPNG_VER_SONUM 0
#define PNG_LIBPNG_VER_DLLNUM 10 #define PNG_LIBPNG_VER_DLLNUM 10
@ -456,7 +460,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 0 #define PNG_LIBPNG_VER_MINOR 0
#define PNG_LIBPNG_VER_RELEASE 48 #define PNG_LIBPNG_VER_RELEASE 50
/* 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:
*/ */
@ -486,14 +490,14 @@
* 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 10048 /* 1.0.48 */ #define PNG_LIBPNG_VER 10050 /* 1.0.50 */
#ifndef PNG_VERSION_INFO_ONLY #ifndef PNG_VERSION_INFO_ONLY
/* include the compression library's header */ /* Include the compression library's header */
#include "zlib.h" #include "zlib.h"
#endif #endif
/* include all user configurable info, including optional assembler routines */ /* Include all user configurable info, including optional assembler routines */
#include "pngconf.h" #include "pngconf.h"
/* /*
@ -575,7 +579,7 @@ extern "C" {
*/ */
#ifdef PNG_USE_GLOBAL_ARRAYS #ifdef PNG_USE_GLOBAL_ARRAYS
PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18]; PNG_EXPORT_VAR (PNG_CONST char) png_libpng_ver[18];
/* need room for 99.99.99beta99z */ /* Need room for 99.99.99beta99z */
#else #else
#define png_libpng_ver png_get_header_ver(NULL) #define png_libpng_ver png_get_header_ver(NULL)
#endif #endif
@ -785,7 +789,7 @@ typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
*/ */
typedef struct png_info_struct typedef struct png_info_struct
{ {
/* the following are necessary for every PNG file */ /* The following are necessary for every PNG file */
png_uint_32 width; /* width of image in pixels (from IHDR) */ png_uint_32 width; /* width of image in pixels (from IHDR) */
png_uint_32 height; /* height of image in pixels (from IHDR) */ png_uint_32 height; /* height of image in pixels (from IHDR) */
png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
@ -1190,10 +1194,10 @@ typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ #define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */
#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ #define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */
#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ #define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */
#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* WRITE only, deprecated */ #define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only, deprecated */
/* Added to libpng-1.2.34 */ /* Added to libpng-1.2.34 */
#define PNG_TRANSFORM_STRIP_FILLER_BEFORE 0x0800 /* WRITE only */ #define PNG_TRANSFORM_STRIP_FILLER_BEFORE 0x0800 /* write only */
#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* WRITE only */ #define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */
/* Flags for MNG supported features */ /* Flags for MNG supported features */
#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 #define PNG_FLAG_MNG_EMPTY_PLTE 0x01
@ -1434,7 +1438,7 @@ struct png_struct_def
#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ #if defined(PNG_MNG_FEATURES_SUPPORTED) || \
defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
/* changed from png_byte to png_uint_32 at version 1.2.0 */ /* Changed from png_byte to png_uint_32 at version 1.2.0 */
#ifdef PNG_1_0_X #ifdef PNG_1_0_X
png_byte mng_features_permitted; png_byte mng_features_permitted;
#else #else
@ -1513,7 +1517,7 @@ struct png_struct_def
/* 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 png_structp version_1_0_48; typedef png_structp version_1_0_50;
typedef png_struct FAR * FAR * png_structpp; typedef png_struct FAR * FAR * png_structpp;
@ -2090,7 +2094,7 @@ extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
/* function that combines rows. Not very much different than the /* Function that combines rows. Not very much different than the
* png_combine_row() call. Is this even used????? * png_combine_row() call. Is this even used?????
*/ */
extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
@ -2996,7 +3000,7 @@ extern PNG_EXPORT(void,png_save_uint_16)
/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */ /* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */
#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) #if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
/* place to hold the signature string for a PNG file. */ /* Place to hold the signature string for a PNG file. */
#ifdef PNG_USE_GLOBAL_ARRAYS #ifdef PNG_USE_GLOBAL_ARRAYS
PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8]; PNG_EXPORT_VAR (PNG_CONST png_byte FARDATA) png_sig[8];
#else #else

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng /* pngconf.h - machine configurable file for libpng
* *
* libpng version 1.0.48 - August 13, 2009 * libpng version 1.0.50 - September 10, 2009
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 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.)

View File

@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct /* pngset.c - storage of image information into info struct
* *
* Last changed in libpng 1.2.39 [August 13, 2009] * Last changed in libpng 1.2.40 [September 10, 2009]
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 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.)
@ -25,6 +25,7 @@ void PNGAPI
png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
{ {
png_debug1(1, "in %s storage function", "bKGD"); png_debug1(1, "in %s storage function", "bKGD");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -41,6 +42,7 @@ png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
double green_x, double green_y, double blue_x, double blue_y) double green_x, double green_y, double blue_x, double blue_y)
{ {
png_debug1(1, "in %s storage function", "cHRM"); png_debug1(1, "in %s storage function", "cHRM");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -74,6 +76,7 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
png_fixed_point blue_x, png_fixed_point blue_y) png_fixed_point blue_x, png_fixed_point blue_y)
{ {
png_debug1(1, "in %s storage function", "cHRM fixed"); png_debug1(1, "in %s storage function", "cHRM fixed");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -112,7 +115,9 @@ void PNGAPI
png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma) png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
{ {
double png_gamma; double png_gamma;
png_debug1(1, "in %s storage function", "gAMA"); png_debug1(1, "in %s storage function", "gAMA");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -140,6 +145,7 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
png_fixed_point png_gamma; png_fixed_point png_gamma;
png_debug1(1, "in %s storage function", "gAMA"); png_debug1(1, "in %s storage function", "gAMA");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -177,8 +183,10 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
int i; int i;
png_debug1(1, "in %s storage function", "hIST"); png_debug1(1, "in %s storage function", "hIST");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
if (info_ptr->num_palette == 0 || info_ptr->num_palette if (info_ptr->num_palette == 0 || info_ptr->num_palette
> PNG_MAX_PALETTE_LENGTH) > PNG_MAX_PALETTE_LENGTH)
{ {
@ -221,6 +229,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
int filter_type) int filter_type)
{ {
png_debug1(1, "in %s storage function", "IHDR"); png_debug1(1, "in %s storage function", "IHDR");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -328,6 +337,7 @@ png_set_oFFs(png_structp png_ptr, png_infop info_ptr,
png_int_32 offset_x, png_int_32 offset_y, int unit_type) png_int_32 offset_x, png_int_32 offset_y, int unit_type)
{ {
png_debug1(1, "in %s storage function", "oFFs"); png_debug1(1, "in %s storage function", "oFFs");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -348,6 +358,7 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
int i; int i;
png_debug1(1, "in %s storage function", "pCAL"); png_debug1(1, "in %s storage function", "pCAL");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -417,6 +428,7 @@ png_set_sCAL(png_structp png_ptr, png_infop info_ptr,
int unit, double width, double height) int unit, double width, double height)
{ {
png_debug1(1, "in %s storage function", "sCAL"); png_debug1(1, "in %s storage function", "sCAL");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -435,6 +447,7 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
png_uint_32 length; png_uint_32 length;
png_debug1(1, "in %s storage function", "sCAL"); png_debug1(1, "in %s storage function", "sCAL");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -480,6 +493,7 @@ png_set_pHYs(png_structp png_ptr, png_infop info_ptr,
png_uint_32 res_x, png_uint_32 res_y, int unit_type) png_uint_32 res_x, png_uint_32 res_y, int unit_type)
{ {
png_debug1(1, "in %s storage function", "pHYs"); png_debug1(1, "in %s storage function", "pHYs");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -496,6 +510,7 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
{ {
png_debug1(1, "in %s storage function", "PLTE"); png_debug1(1, "in %s storage function", "PLTE");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -546,6 +561,7 @@ png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
png_color_8p sig_bit) png_color_8p sig_bit)
{ {
png_debug1(1, "in %s storage function", "sBIT"); png_debug1(1, "in %s storage function", "sBIT");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -559,6 +575,7 @@ void PNGAPI
png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent) png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
{ {
png_debug1(1, "in %s storage function", "sRGB"); png_debug1(1, "in %s storage function", "sRGB");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -586,6 +603,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
int_green_y, int_blue_x, int_blue_y; int_green_y, int_blue_x, int_blue_y;
#endif #endif
png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM"); png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -655,6 +673,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
png_uint_32 length; png_uint_32 length;
png_debug1(1, "in %s storage function", "iCCP"); png_debug1(1, "in %s storage function", "iCCP");
if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL) if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL)
return; return;
@ -869,6 +888,7 @@ void PNGAPI
png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
{ {
png_debug1(1, "in %s storage function", "tIME"); png_debug1(1, "in %s storage function", "tIME");
if (png_ptr == NULL || info_ptr == NULL || if (png_ptr == NULL || info_ptr == NULL ||
(png_ptr->mode & PNG_WROTE_tIME)) (png_ptr->mode & PNG_WROTE_tIME))
return; return;
@ -884,6 +904,7 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
png_bytep trans, int num_trans, png_color_16p trans_values) png_bytep trans, int num_trans, png_color_16p trans_values)
{ {
png_debug1(1, "in %s storage function", "tRNS"); png_debug1(1, "in %s storage function", "tRNS");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
@ -1008,7 +1029,7 @@ png_set_sPLT(png_structp png_ptr,
} }
#endif /* PNG_sPLT_SUPPORTED */ #endif /* PNG_sPLT_SUPPORTED */
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
void PNGAPI void PNGAPI
png_set_unknown_chunks(png_structp png_ptr, png_set_unknown_chunks(png_structp png_ptr,
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns) png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
@ -1088,7 +1109,9 @@ png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
{ {
/* This function is deprecated in favor of png_permit_mng_features() /* This function is deprecated in favor of png_permit_mng_features()
and will be removed from libpng-1.3.0 */ and will be removed from libpng-1.3.0 */
png_debug(1, "in png_permit_empty_plte, DEPRECATED."); png_debug(1, "in png_permit_empty_plte, DEPRECATED.");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->mng_features_permitted = (png_byte) png_ptr->mng_features_permitted = (png_byte)
@ -1103,6 +1126,7 @@ png_uint_32 PNGAPI
png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features) png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features)
{ {
png_debug(1, "in png_permit_mng_features"); png_debug(1, "in png_permit_mng_features");
if (png_ptr == NULL) if (png_ptr == NULL)
return (png_uint_32)0; return (png_uint_32)0;
png_ptr->mng_features_permitted = png_ptr->mng_features_permitted =
@ -1164,8 +1188,10 @@ png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr,
png_user_chunk_ptr read_user_chunk_fn) png_user_chunk_ptr read_user_chunk_fn)
{ {
png_debug(1, "in png_set_read_user_chunk_fn"); png_debug(1, "in png_set_read_user_chunk_fn");
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
png_ptr->read_user_chunk_fn = read_user_chunk_fn; png_ptr->read_user_chunk_fn = read_user_chunk_fn;
png_ptr->user_chunk_ptr = user_chunk_ptr; png_ptr->user_chunk_ptr = user_chunk_ptr;
} }

View File

@ -1689,4 +1689,4 @@ main(int argc, char *argv[])
} }
/* Generate a compiler error if there is an old png.h in the search path. */ /* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_0_48 your_png_h_is_not_version_1_0_48; typedef version_1_0_50 your_png_h_is_not_version_1_0_50;

View File

@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file /* pngwutil.c - utilities to write a PNG file
* *
* Last changed in libpng 1.2.39 [August 13, 2009] * Last changed in libpng 1.2.40 [September 10, 2009]
* Copyright (c) 1998-2009 Glenn Randers-Pehrson * Copyright (c) 1998-2009 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_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
png_debug2(0, "Writing %s chunk, length = %lu", chunk_name, png_debug2(0, "Writing %s chunk, length = %lu", chunk_name,
(unsigned long)length); (unsigned long)length);
if (png_ptr == NULL) if (png_ptr == NULL)
return; return;
@ -398,6 +399,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
png_byte buf[13]; /* Buffer to store the IHDR info */ png_byte buf[13]; /* Buffer to store the IHDR info */
png_debug(1, "in png_write_IHDR"); png_debug(1, "in png_write_IHDR");
/* Check that we have valid input data from the application info */ /* Check that we have valid input data from the application info */
switch (color_type) switch (color_type)
{ {
@ -575,6 +577,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
png_byte buf[3]; png_byte buf[3];
png_debug(1, "in png_write_PLTE"); png_debug(1, "in png_write_PLTE");
if (( if ((
#if defined(PNG_MNG_FEATURES_SUPPORTED) #if defined(PNG_MNG_FEATURES_SUPPORTED)
!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) && !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) &&
@ -634,6 +637,7 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
#ifdef PNG_USE_LOCAL_ARRAYS #ifdef PNG_USE_LOCAL_ARRAYS
PNG_IDAT; PNG_IDAT;
#endif #endif
png_debug(1, "in png_write_IDAT"); png_debug(1, "in png_write_IDAT");
/* Optimize the CMF field in the zlib stream. */ /* Optimize the CMF field in the zlib stream. */
@ -688,7 +692,9 @@ png_write_IEND(png_structp png_ptr)
#ifdef PNG_USE_LOCAL_ARRAYS #ifdef PNG_USE_LOCAL_ARRAYS
PNG_IEND; PNG_IEND;
#endif #endif
png_debug(1, "in png_write_IEND"); png_debug(1, "in png_write_IEND");
png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL, png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL,
(png_size_t)0); (png_size_t)0);
png_ptr->mode |= PNG_HAVE_IEND; png_ptr->mode |= PNG_HAVE_IEND;
@ -707,6 +713,7 @@ png_write_gAMA(png_structp png_ptr, double file_gamma)
png_byte buf[4]; png_byte buf[4];
png_debug(1, "in png_write_gAMA"); png_debug(1, "in png_write_gAMA");
/* file_gamma is saved in 1/100,000ths */ /* file_gamma is saved in 1/100,000ths */
igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5); igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5);
png_save_uint_32(buf, igamma); png_save_uint_32(buf, igamma);
@ -723,6 +730,7 @@ png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)
png_byte buf[4]; png_byte buf[4];
png_debug(1, "in png_write_gAMA"); png_debug(1, "in png_write_gAMA");
/* file_gamma is saved in 1/100,000ths */ /* file_gamma is saved in 1/100,000ths */
png_save_uint_32(buf, (png_uint_32)file_gamma); png_save_uint_32(buf, (png_uint_32)file_gamma);
png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4); png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);
@ -741,6 +749,7 @@ png_write_sRGB(png_structp png_ptr, int srgb_intent)
png_byte buf[1]; png_byte buf[1];
png_debug(1, "in png_write_sRGB"); png_debug(1, "in png_write_sRGB");
if (srgb_intent >= PNG_sRGB_INTENT_LAST) if (srgb_intent >= PNG_sRGB_INTENT_LAST)
png_warning(png_ptr, png_warning(png_ptr,
"Invalid sRGB rendering intent specified"); "Invalid sRGB rendering intent specified");
@ -849,6 +858,7 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
#endif #endif
png_debug(1, "in png_write_sPLT"); png_debug(1, "in png_write_sPLT");
if ((name_len = png_check_keyword(png_ptr,spalette->name, &new_name))==0) if ((name_len = png_check_keyword(png_ptr,spalette->name, &new_name))==0)
return; return;
@ -922,6 +932,7 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
png_size_t size; png_size_t size;
png_debug(1, "in png_write_sBIT"); png_debug(1, "in png_write_sBIT");
/* Make sure we don't depend upon the order of PNG_COLOR_8 */ /* Make sure we don't depend upon the order of PNG_COLOR_8 */
if (color_type & PNG_COLOR_MASK_COLOR) if (color_type & PNG_COLOR_MASK_COLOR)
{ {
@ -1029,6 +1040,7 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
png_byte buf[32]; png_byte buf[32];
png_debug(1, "in png_write_cHRM"); png_debug(1, "in png_write_cHRM");
/* Each value is saved in 1/100,000ths */ /* Each value is saved in 1/100,000ths */
#if !defined(PNG_NO_CHECK_cHRM) #if !defined(PNG_NO_CHECK_cHRM)
if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y, if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y,
@ -1065,6 +1077,7 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran,
png_byte buf[6]; png_byte buf[6];
png_debug(1, "in png_write_tRNS"); png_debug(1, "in png_write_tRNS");
if (color_type == PNG_COLOR_TYPE_PALETTE) if (color_type == PNG_COLOR_TYPE_PALETTE)
{ {
if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette) if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette)
@ -1120,6 +1133,7 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
png_byte buf[6]; png_byte buf[6];
png_debug(1, "in png_write_bKGD"); png_debug(1, "in png_write_bKGD");
if (color_type == PNG_COLOR_TYPE_PALETTE) if (color_type == PNG_COLOR_TYPE_PALETTE)
{ {
if ( if (
@ -1174,6 +1188,7 @@ png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)
png_byte buf[3]; png_byte buf[3];
png_debug(1, "in png_write_hIST"); png_debug(1, "in png_write_hIST");
if (num_hist > (int)png_ptr->num_palette) if (num_hist > (int)png_ptr->num_palette)
{ {
png_debug2(3, "num_hist = %d, num_palette = %d", num_hist, png_debug2(3, "num_hist = %d, num_palette = %d", num_hist,
@ -1214,6 +1229,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
int kwarn=0; int kwarn=0;
png_debug(1, "in png_check_keyword"); png_debug(1, "in png_check_keyword");
*new_key = NULL; *new_key = NULL;
if (key == NULL || (key_len = png_strlen(key)) == 0) if (key == NULL || (key_len = png_strlen(key)) == 0)
@ -1337,6 +1353,7 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
png_charp new_key; png_charp new_key;
png_debug(1, "in png_write_tEXt"); png_debug(1, "in png_write_tEXt");
if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0) if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0)
return; return;
@ -1525,6 +1542,7 @@ png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
png_byte buf[9]; png_byte buf[9];
png_debug(1, "in png_write_oFFs"); png_debug(1, "in png_write_oFFs");
if (unit_type >= PNG_OFFSET_LAST) if (unit_type >= PNG_OFFSET_LAST)
png_warning(png_ptr, "Unrecognized unit type for oFFs chunk"); png_warning(png_ptr, "Unrecognized unit type for oFFs chunk");
@ -1551,6 +1569,7 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
int i; int i;
png_debug1(1, "in png_write_pCAL (%d parameters)", nparams); png_debug1(1, "in png_write_pCAL (%d parameters)", nparams);
if (type >= PNG_EQUATION_LAST) if (type >= PNG_EQUATION_LAST)
png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); png_warning(png_ptr, "Unrecognized equation type for pCAL chunk");
@ -1684,6 +1703,7 @@ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
png_byte buf[9]; png_byte buf[9];
png_debug(1, "in png_write_pHYs"); png_debug(1, "in png_write_pHYs");
if (unit_type >= PNG_RESOLUTION_LAST) if (unit_type >= PNG_RESOLUTION_LAST)
png_warning(png_ptr, "Unrecognized unit type for pHYs chunk"); png_warning(png_ptr, "Unrecognized unit type for pHYs chunk");
@ -1708,6 +1728,7 @@ png_write_tIME(png_structp png_ptr, png_timep mod_time)
png_byte buf[7]; png_byte buf[7];
png_debug(1, "in png_write_tIME"); png_debug(1, "in png_write_tIME");
if (mod_time->month > 12 || mod_time->month < 1 || if (mod_time->month > 12 || mod_time->month < 1 ||
mod_time->day > 31 || mod_time->day < 1 || mod_time->day > 31 || mod_time->day < 1 ||
mod_time->hour > 23 || mod_time->second > 60) mod_time->hour > 23 || mod_time->second > 60)
@ -1752,6 +1773,7 @@ png_write_start_row(png_structp png_ptr)
png_size_t buf_size; png_size_t buf_size;
png_debug(1, "in png_write_start_row"); png_debug(1, "in png_write_start_row");
buf_size = (png_size_t)(PNG_ROWBYTES( buf_size = (png_size_t)(PNG_ROWBYTES(
png_ptr->usr_channels*png_ptr->usr_bit_depth, png_ptr->width) + 1); png_ptr->usr_channels*png_ptr->usr_bit_depth, png_ptr->width) + 1);
@ -1852,6 +1874,7 @@ png_write_finish_row(png_structp png_ptr)
int ret; int ret;
png_debug(1, "in png_write_finish_row"); png_debug(1, "in png_write_finish_row");
/* Next row */ /* Next row */
png_ptr->row_number++; png_ptr->row_number++;
@ -1961,6 +1984,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
#endif #endif
png_debug(1, "in png_do_write_interlace"); png_debug(1, "in png_do_write_interlace");
/* We don't have to do anything on the last pass (6) */ /* We don't have to do anything on the last pass (6) */
#if defined(PNG_USELESS_TESTS_SUPPORTED) #if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL && pass < 6) if (row != NULL && row_info != NULL && pass < 6)
@ -2133,8 +2157,6 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
png_debug(1, "in png_write_find_filter"); png_debug(1, "in png_write_find_filter");
png_debug(1, "in png_write_find_filter");
/* Find out how many bytes offset each pixel is */ /* Find out how many bytes offset each pixel is */
bpp = (row_info->pixel_depth + 7) >> 3; bpp = (row_info->pixel_depth + 7) >> 3;
@ -2744,6 +2766,7 @@ void /* PRIVATE */
png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row)
{ {
png_debug(1, "in png_write_filtered_row"); png_debug(1, "in png_write_filtered_row");
png_debug1(2, "filter = %d", filtered_row[0]); png_debug1(2, "filter = %d", filtered_row[0]);
/* Set up the zlib input buffer */ /* Set up the zlib input buffer */

View File

@ -1,5 +1,5 @@
project(PNG C)
project(PNG) cmake_minimum_required(VERSION 2.4.3)
# Copyright (C) 2007 Glenn Randers-Pehrson # Copyright (C) 2007 Glenn Randers-Pehrson
@ -9,12 +9,16 @@ project(PNG)
set(PNGLIB_MAJOR 1) set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 0) set(PNGLIB_MINOR 0)
set(PNGLIB_RELEASE 48) set(PNGLIB_RELEASE 50)
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})
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
# needed packages # needed packages
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
if(NOT WIN32) if(NOT WIN32)
find_library(M_LIBRARY find_library(M_LIBRARY
NAMES m NAMES m
@ -23,24 +27,33 @@ if(NOT WIN32)
if(NOT M_LIBRARY) if(NOT M_LIBRARY)
message(STATUS message(STATUS
"math library 'libm' not found - floating point support disabled") "math library 'libm' not found - floating point support disabled")
endif(NOT M_LIBRARY) endif()
else(NOT WIN32) else()
# not needed on windows # not needed on windows
set(M_LIBRARY "") set(M_LIBRARY "")
endif(NOT WIN32) endif()
# COMMAND LINE OPTIONS # COMMAND LINE OPTIONS
option(PNG_SHARED "Build shared lib" YES) if(DEFINED PNG_SHARED)
option(PNG_STATIC "Build static lib" YES) option(PNG_SHARED "Build shared lib" ${PNG_SHARED})
else()
option(PNG_SHARED "Build shared lib" ON)
endif()
if(DEFINED PNG_STATIC)
option(PNG_STATIC "Build static lib" ${PNG_STATIC})
else()
option(PNG_STATIC "Build static lib" ON)
endif()
if(MINGW) if(MINGW)
option(PNG_TESTS "Build pngtest" NO) option(PNG_TESTS "Build pngtest" NO)
else(MINGW) else(MINGW)
option(PNG_TESTS "Build pngtest" YES) option(PNG_TESTS "Build pngtest" YES)
endif(MINGW) endif(MINGW)
option(PNG_NO_CONSOLE_IO "FIXME" YES) option(PNG_NO_CONSOLE_IO "FIXME" YES)
option(PNG_NO_STDIO "FIXME" YES) option(PNG_NO_STDIO "FIXME" YES)
option(PNG_DEBUG "Build with debug output" YES) option(PNG_DEBUG "Build with debug output" NO)
option(PNGARG "FIXME" YES) option(PNGARG "FIXME" YES)
#TODO: #TODO:
# PNG_CONSOLE_IO_SUPPORTED # PNG_CONSOLE_IO_SUPPORTED
@ -57,20 +70,16 @@ if(NOT WIN32)
set(png_asm_tmp "OFF") set(png_asm_tmp "OFF")
endif("uname_output" MATCHES "^.*i[1-9]86.*$") endif("uname_output" MATCHES "^.*i[1-9]86.*$")
endif(uname_executable) endif(uname_executable)
else(NOT WIN32) else()
# this env var is normally only set on win64 # this env var is normally only set on win64
SET(TEXT "ProgramFiles(x86)") SET(TEXT "ProgramFiles(x86)")
if("$ENV{${TEXT}}" STREQUAL "") if("$ENV{${TEXT}}" STREQUAL "")
set(png_asm_tmp "ON") set(png_asm_tmp "ON")
endif("$ENV{${TEXT}}" STREQUAL "") endif("$ENV{${TEXT}}" STREQUAL "")
endif(NOT WIN32) endif()
# SET LIBNAME # SET LIBNAME
# msvc does not append 'lib' - do it here to have consistent name set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
if(MSVC)
set(PNG_LIB_NAME lib)
endif(MSVC)
set(PNG_LIB_NAME ${PNG_LIB_NAME}png${PNGLIB_MAJOR}${PNGLIB_MINOR})
# to distinguish between debug and release lib # to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d") set(CMAKE_DEBUG_POSTFIX "d")
@ -104,54 +113,67 @@ if(MSVC)
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE) add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC) endif(MSVC)
add_definitions(-DZLIB_DLL) if(PNG_SHARED OR NOT MSVC)
#if building msvc static this has NOT do be defined
add_definitions(-DZLIB_DLL)
endif()
add_definitions(-DLIBPNG_NO_MMX) add_definitions(-DLIBPNG_NO_MMX)
add_definitions(-DPNG_NO_MMX_CODE) add_definitions(-DPNG_NO_MMX_CODE)
if(PNG_CONSOLE_IO_SUPPORTED) if(PNG_CONSOLE_IO_SUPPORTED)
add_definitions(-DPNG_CONSOLE_IO_SUPPORTED) add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
endif(PNG_CONSOLE_IO_SUPPORTED) endif()
if(PNG_NO_CONSOLE_IO) if(PNG_NO_CONSOLE_IO)
add_definitions(-DPNG_NO_CONSOLE_IO) add_definitions(-DPNG_NO_CONSOLE_IO)
endif(PNG_NO_CONSOLE_IO) endif()
if(PNG_NO_STDIO) if(PNG_NO_STDIO)
add_definitions(-DPNG_NO_STDIO) add_definitions(-DPNG_NO_STDIO)
endif(PNG_NO_STDIO) endif()
if(PNG_DEBUG) if(PNG_DEBUG)
add_definitions(-DPNG_DEBUG) add_definitions(-DPNG_DEBUG)
endif(PNG_DEBUG) endif()
if(NOT M_LIBRARY AND NOT WIN32) if(NOT M_LIBRARY AND NOT WIN32)
add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED) add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
endif(NOT M_LIBRARY AND NOT WIN32) endif()
# NOW BUILD OUR TARGET # NOW BUILD OUR TARGET
include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR}) include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
if(PNG_SHARED) if(PNG_SHARED)
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources}) add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY}) target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif(PNG_SHARED) endif()
if(PNG_STATIC) if(PNG_STATIC)
# does not work without changing name # does not work without changing name
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static) set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources}) add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
endif(PNG_STATIC) if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
endif()
endif()
if(PNG_SHARED AND WIN32) if(PNG_SHARED AND WIN32)
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
endif(PNG_SHARED AND WIN32) endif()
if(PNG_TESTS) if(PNG_TESTS AND PNG_SHARED)
# does not work with msvc due to png_lib_ver issue # does not work with msvc due to png_lib_ver issue
add_executable(pngtest ${pngtest_sources}) add_executable(pngtest ${pngtest_sources})
target_link_libraries(pngtest ${PNG_LIB_NAME}) target_link_libraries(pngtest ${PNG_LIB_NAME})
# add_test(pngtest ${PNG_SOURCE_DIR}/pngtest.png) # add_test(pngtest ${PNG_SOURCE_DIR}/pngtest.png)
endif(PNG_TESTS) endif()
# CREATE PKGCONFIG FILES # CREATE PKGCONFIG FILES
@ -171,30 +193,49 @@ configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
${PNG_BINARY_DIR}/${PNGLIB_NAME}-config) ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
# SET UP LINKS # SET UP LINKS
set_target_properties(${PNG_LIB_NAME} PROPERTIES if(PNG_SHARED)
# VERSION 0.${PNGLIB_RELEASE}.1.0.48 set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 0.${PNGLIB_RELEASE}.1.0.50
VERSION 0.${PNGLIB_RELEASE}.0 VERSION 0.${PNGLIB_RELEASE}.0
SOVERSION 0 SOVERSION 0
CLEAN_DIRECT_OUTPUT 1) CLEAN_DIRECT_OUTPUT 1)
if(NOT WIN32) endif()
# that's uncool on win32 - it overwrites our static import lib...
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
OUTPUT_NAME ${PNG_LIB_NAME}
CLEAN_DIRECT_OUTPUT 1)
endif(NOT WIN32)
# INSTALL
install_targets(/lib ${PNG_LIB_NAME})
if(PNG_STATIC) if(PNG_STATIC)
install_targets(/lib ${PNG_LIB_NAME_STATIC}) if(NOT WIN32)
endif(PNG_STATIC) # that's uncool on win32 - it overwrites our static import lib...
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
OUTPUT_NAME ${PNG_LIB_NAME}
CLEAN_DIRECT_OUTPUT 1)
endif()
endif()
# INSTALL
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
if(PNG_SHARED)
install(TARGETS ${PNG_LIB_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
endif()
if(PNG_STATIC)
install(TARGETS ${PNG_LIB_NAME_STATIC}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
endif()
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES png.h pngconf.h DESTINATION include) install(FILES png.h pngconf.h DESTINATION include)
install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME}) install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3) endif()
install(FILES png.5 DESTINATION man/man5) if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig) install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin) install(FILES png.5 DESTINATION man/man5)
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig) install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin) install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
endif()
# what's with libpng.txt and all the extra files? # what's with libpng.txt and all the extra files?

View File

@ -11,7 +11,7 @@
# Modeled after libxml-config. # Modeled after libxml-config.
version=1.0.48 version=1.0.50
prefix="" prefix=""
libdir="" libdir=""
libs="" libs=""

View File

@ -5,6 +5,6 @@ includedir=@includedir@/libpng10
Name: libpng Name: libpng
Description: Loads and saves PNG files Description: Loads and saves PNG files
Version: 1.0.48 Version: 1.0.50
Libs: -L${libdir} -lpng10 Libs: -L${libdir} -lpng10
Cflags: -I${includedir} Cflags: -I${includedir}

View File

@ -11,7 +11,7 @@
# Library name: # Library name:
LIBNAME=libpng10 LIBNAME=libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -11,7 +11,7 @@
# Library name: # Library name:
LIBNAME=libpng10 LIBNAME=libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -23,7 +23,7 @@ LN_SF = ln -f -s
LIBNAME=libpng10 LIBNAME=libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local prefix=/usr/local

View File

@ -11,7 +11,7 @@
# Library name: # Library name:
LIBNAME=libpng10 LIBNAME=libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -77,7 +77,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
CYGDLL = 10 CYGDLL = 10
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(CYGDLL).dll SHAREDLIB=cygpng$(CYGDLL).dll

View File

@ -22,7 +22,7 @@ ZLIBINC=../zlib
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 10 PNGMAJ = 10
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -8,7 +8,7 @@
# Library name: # Library name:
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng10 LIBNAME = libpng10

View File

@ -16,7 +16,7 @@
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -17,7 +17,7 @@
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -21,7 +21,7 @@ ZLIBINC=/opt/zlib/include
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -11,7 +11,7 @@
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -21,7 +21,7 @@ ZLIBINC=/opt/zlib/include
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -10,7 +10,7 @@
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -77,7 +77,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
MINGDLL = 10 MINGDLL = 10
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=libpng$(MINGDLL).dll SHAREDLIB=libpng$(MINGDLL).dll

View File

@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng10
LIB= png10 LIB= png10
SHLIB_MAJOR= 0 SHLIB_MAJOR= 0
SHLIB_MINOR= 1.0.48 SHLIB_MINOR= 1.0.50
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

View File

@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng
LIB= png LIB= png
SHLIB_MAJOR= 3 SHLIB_MAJOR= 3
SHLIB_MINOR= 1.0.48 SHLIB_MINOR= 1.0.50
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

View File

@ -10,7 +10,7 @@
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0 SHLIB_MAJOR= 0
SHLIB_MINOR= 1.0.48 SHLIB_MINOR= 1.0.50
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 \

View File

@ -12,7 +12,7 @@
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -9,7 +9,7 @@
# Library name: # Library name:
LIBNAME=libpng10 LIBNAME=libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -9,7 +9,7 @@
# Library name: # Library name:
LIBNAME=libpng10 LIBNAME=libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -11,7 +11,7 @@
# Library name: # Library name:
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng10 LIBNAME = libpng10

View File

@ -11,7 +11,7 @@
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -11,7 +11,7 @@
# Library name: # Library name:
LIBNAME = libpng10 LIBNAME = libpng10
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.0.48 PNGMIN = 1.0.50
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:

View File

@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2 ; PNG.LIB module definition file for OS/2
;---------------------------------------- ;----------------------------------------
; Version 1.0.48 ; Version 1.0.50
LIBRARY PNG LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2" DESCRIPTION "PNG image compression library for OS/2"

View File

@ -5,7 +5,7 @@
LIBRARY LIBRARY
EXPORTS EXPORTS
;Version 1.0.48 ;Version 1.0.50
png_build_grayscale_palette @1 png_build_grayscale_palette @1
png_check_sig @2 png_check_sig @2
png_chunk_error @3 png_chunk_error @3