Imported from libpng-1.2.9beta1.tar

This commit is contained in:
Glenn Randers-Pehrson 2006-02-20 22:09:05 -06:00
parent 917648ecb9
commit 9c3ab68145
76 changed files with 798 additions and 835 deletions

View File

@ -1,32 +1,38 @@
Libpng 1.2.8 - December 3, 2004
Libpng 1.2.9beta1 - February 21, 2006
This is a public release of libpng, intended for use in production codes.
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
Changes since the last public release (1.2.7):
Changes since the last public release (1.2.8):
Fixed bug in png_text_compress() that would fail to complete a large block.
Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during
strip alpha operation in png_do_strip_filler().
Added PNG_1_2_X definition in pngconf.h
#ifdef out png_info_init in png.c and png_read_init in pngread.c (as of 1.3.0)
Reduce color_type to a nonalpha type after strip alpha operation in
png_do_strip_filler().
Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM
Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin).
Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin).
Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection
of data type in deflate (Cosmin).
Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of
PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING.
Despammed mailing addresses by masking "@" with "at".
Added scripts/makefile.elf with supporting code in pngconf.h for symbol
versioning (John Bowler).
Added projects/visualc71 (Simon-pierre).
version 1.2.9beta1 [February 21, 2006]
Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints
Revised man page and libpng.txt to make it clear that one should not call
png_read_end or png_write_end after png_read_png or png_write_png.
Updated references to png-mng-implement mailing list.
Fixed an incorrect typecast in pngrutil.c
Added PNG_READ_SUPPORTED conditionals for making a write-only library.
Added PNG_NO_WRITE_INTERLACING_SUPPORTED conditional.
Optimized alpha-inversion loops in pngwtran.c
Moved test for nonzero gamma outside of png_build_gamma_table() in pngrtran.c
Make sure num_trans is <= 256 before copying data in png_set_tRNS().
Make sure num_palette is <= 256 before copying data in png_set_PLTE().
Interchanged order of write_swap_alpha and write_invert_alpha transforms.
Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin).
Optimized zlib window flag (CINFO) in contrib/pngsuite/*.png (Cosmin).
Updated scripts/makefile.bc32 for Borland C++ 5.6 (Cosmin).
Fixed inconsistency in definition of png_default_read_data()
Exported png_get_uint_32, png_save_uint_32, png_get_uint_16, png_save_uint_16,
png_get_int_32, png_save_int_32, png_get_uint_31 (Cosmin).
Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin).
Updated scripts/pngos2.def, scripts/pngw32.def (Cosmin).
Added type cast (png_byte) in png_write_sCAL() (Cosmin).
Fixed scripts/makefile.cygwin (Cosmin).
Send comments/corrections/commendations to
png-implement at ccrc.wustl.edu (subscription required; write to
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message)
or to glennrp at users.sourceforge.net
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
Glenn R-P

49
CHANGES
View File

@ -10,7 +10,7 @@ version 0.3
split up pngwrite.c to several files
added pnglib.txt
added example.c
cleaned up writer, adding a few new tranformations
cleaned up writer, adding a few new transformations
fixed some bugs in writer
interfaced with zlib 0.5
added K&R support
@ -22,7 +22,7 @@ version 0.4
created png_color_16 and png_color_8 to handle color needs
cleaned up color type defines
fixed various bugs
made various names more consistant
made various names more consistent
interfaced with zlib 0.71
cleaned up zTXt reader and writer (using zlib's Reset functions)
split transformations into pngrtran.c and pngwtran.c
@ -151,7 +151,7 @@ version 0.95 [March, 1997]
added "packswap" transformation, which changes the endianness of
packed-pixel bytes (Kevin Bracey)
added "strip_alpha" transformation, which removes the alpha channel of
input images without using it (not neccesarily a good idea)
input images without using it (not necessarily a good idea)
added "swap_alpha" transformation, which puts the alpha channel in front
of the color bytes instead of after
removed all implicit variable tests which assume NULL == 0 (I think)
@ -172,7 +172,7 @@ version 0.95 [March, 1997]
more chunk types tested in pngtest.c
renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be
png_set_<chunk>. We now have corresponding png_get_<chunk>
functions in pngget.c to get infomation in info_ptr. This isolates
functions in pngget.c to get information in info_ptr. This isolates
the application from the internal organization of png_info_struct
(good for shared library implementations).
@ -522,9 +522,9 @@ version 1.0.5b [November 23, 1999]
Updated scripts/makevms.com and added makevms.com to contrib/gregbook
and contrib/pngminus (Martin Zinser)
version 1.0.5c [November 26, 1999]
Moved png_get_header_version from png.h to png.c, to accomodate ansi2knr.
Moved png_get_header_version from png.h to png.c, to accommodate ansi2knr.
Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to
accomodate making DLL's: Moved usr_png_ver from global variable to function
accommodate making DLL's: Moved usr_png_ver from global variable to function
png_get_header_ver() in png.c. Moved png_sig to png_sig_bytes in png.c and
eliminated use of png_sig in pngwutil.c. Moved the various png_CHNK arrays
into pngtypes.h. Eliminated use of global png_pass arrays. Declared the
@ -1361,6 +1361,7 @@ version 1.2.7beta2 [August 28, 2004]
Added png_set_add_alpha() that updates color type.
version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004]
Revised png_set_strip_filler() to not remove alpha if color_type has alpha.
version 1.0.17 and 1.2.7 [September 12, 2004]
Added makefile.hp64
Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin
@ -1408,12 +1409,42 @@ version 1.2.8rc4 [November 29, 2004]
Added projects/visualc7 (Simon-pierre).
version 1.2.8rc5 [November 29, 2004]
Fixed new typo in scripts/pngw32.rc
version 1.2.8 [December 3, 2004]
Removed projects/visualc7, added projects/visualc71.
Send comments/corrections/commendations to
png-implement at ccrc.wustl.edu (subscription required; write to
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message)
version 1.2.9beta1 [February 21, 2006]
Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints
Revised man page and libpng.txt to make it clear that one should not call
png_read_end or png_write_end after png_read_png or png_write_png.
Updated references to png-mng-implement mailing list.
Fixed an incorrect typecast in pngrutil.c
Added PNG_READ_SUPPORTED conditionals for making a write-only library.
Added PNG_NO_WRITE_INTERLACING_SUPPORTED conditional.
Optimized alpha-inversion loops in pngwtran.c
Moved test for nonzero gamma outside of png_build_gamma_table() in pngrtran.c
Make sure num_trans is <= 256 before copying data in png_set_tRNS().
Make sure num_palette is <= 256 before copying data in png_set_PLTE().
Interchanged order of write_swap_alpha and write_invert_alpha transforms.
Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin).
Optimized zlib window flag (CINFO) in contrib/pngsuite/*.png (Cosmin).
Updated scripts/makefile.bc32 for Borland C++ 5.6 (Cosmin).
Fixed inconsistency in definition of png_default_read_data()
Exported png_get_uint_32, png_save_uint_32, png_get_uint_16, png_save_uint_16,
png_get_int_32, png_save_int_32, png_get_uint_31 (Cosmin).
Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin).
Updated scripts/pngos2.def, scripts/pngw32.def (Cosmin).
Added type cast (png_byte) in png_write_sCAL() (Cosmin).
Fixed scripts/makefile.cygwin (Cosmin).
version 1.3.0beta1 [future]
Enable iTXt support (changes png_struct, thus requires so-number change).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe)
or to glennrp at users.sourceforge.net
Glenn R-P

81
INSTALL
View File

@ -1,5 +1,5 @@
Installing libpng version 1.2.8 - %DATE%
Installing libpng version 1.2.9beta1 - February 21, 2006
Before installing libpng, you must first install zlib. zlib
can usually be found wherever you got libpng. zlib can be
@ -10,8 +10,8 @@ zlib.h and zconf.h include files that correspond to the
version of zlib that's installed.
You can rename the directories that you downloaded (they
might be called "libpng-1.2.8" or "lpng109" and "zlib-1.1.3"
or "zlib113") so that you have directories called "zlib" and "libpng".
might be called "libpng-1.2.9beta1" or "lpng109" and "zlib-1.2.1"
or "zlib121") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@ -23,14 +23,13 @@ Your directory structure should look like this:
*.c
contrib
gregbook
msvctest
pngminus
pngsuite
visupng
projects
beos
borland
msvc
c5builder (Borland)
visualc6 (msvc)
netware.txt
wince.txt
scripts
@ -48,13 +47,16 @@ If the line endings in the files look funny, you may wish to get the other
distribution of libpng. It is available in both tar.gz (UNIX style line
endings) and zip (DOS style line endings) formats.
If you are building libpng with MSVC, you can enter the libpng\msvc directory
and follow the instructions in msvc\README.txt.
You can build libpng for WindowsCE by entering the downloading and installing
the libpng\wince directory as instructed in the projects\wince.txt file, and
If you are building libpng with MSVC, you can enter the
libpng projects\visualc6 directory and follow the instructions in
projects\visualc6\README.txt.
You can build libpng for WindowsCE by downloading and installing
the projects\wince directory as instructed in the projects\wince.txt file, and
then following the instructions in the README* files. Similarly, you can
build libpng for Netware as instructed in projects\netware.txt.
build libpng for Netware or Beos as instructed in projects\netware.txt
or projects\beos.
Else enter the zlib directory and follow the instructions in zlib/README,
then come back here and choose the appropriate makefile.sys in the scripts
@ -64,8 +66,12 @@ The files that are presently available in the scripts directory
include
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.linux => Linux/ELF makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8,
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng12.so.0.1.2.9beta1)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.9beta1)
makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.9beta1,
uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@ -73,23 +79,27 @@ include
ftp://ftp.cs.wisc.edu/ghost)
makefile.aix => AIX/gcc makefile
makefile.cygwin => Cygwin/gcc makefile
makefile.darwin => Darwin makefile
makefile.darwin => Darwin makefile, can use on MacosX
makefile.dec => DEC Alpha UNIX makefile
makefile.hpgcc => FreeBSD makefile
makefile.freebsd => FreeBSD makefile
makefile.hpgcc => HPUX makefile using gcc
makefile.hpux => HPUX (10.20 and 11.00) makefile
makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
makefile.macosx => MACOS X Makefile
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so.
makefile.ne%SONUM%bsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng%SONUM%.so
makefile.ne12bsd => NetBSD/cc makefile, uses PNGGCCRD,
makes libpng12.so
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8)
makefile.sggcc => Silicon Graphics (gcc,
creates libpng12.so.0.1.2.9beta1)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8)
makefile.so9 => Solaris 9 makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8)
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng12.so.0.1.2.9beta1)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng12.so.0.1.2.9beta1)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
@ -102,7 +112,6 @@ include
makefile.beos => BEOS makefile for X86
makefile.bor => Borland makefile (uses bcc)
makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
makefile.bd32 => To make a png32bd.dll with Borland C++ 4.5
makefile.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile
@ -115,7 +124,6 @@ include
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
descrip.mms => VMS makefile for MMS or MMK
pngdef.pas => Defines for a png32bd.dll with Borland C++ 4.5
SCOPTIONS.ppc => Used with smakefile.ppc
Copy the file (or files) that you need from the
@ -130,13 +138,13 @@ target directories to match your preferences.
Then read pngconf.h to see if you want to make any configuration
changes.
Then just run "make test" which will create the libpng library in
this directory and run a quick test that reads the "pngtest.png"
file and writes a "pngout.png" file that should be identical to it.
Look for "9782 zero samples" in the output of the test. For more
confidence, you can run another test by typing "pngtest pngnow.png"
and looking for "289 zero samples" in the output. Also, you can
run "pngtest -m *.png" in the "contrib/pngsuite" directory and compare
Then just run "make" which will create the libpng library in
this directory and "make test" which will run a quick test that reads
the "pngtest.png" file and writes a "pngout.png" file that should be
identical to it. Look for "9782 zero samples" in the output of the
test. For more confidence, you can run another test by typing
"pngtest pngnow.png" and looking for "289 zero samples" in the output.
Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
your output with the result shown in contrib/pngsuite/README.
Most of the makefiles will allow you to run "make install" to
@ -145,9 +153,20 @@ do that, run "make install" in the zlib directory first if necessary).
Some also allow you to run "make test-installed" after you have
run "make install".
If you encounter a compiler error message complaining about the
lines
__png.h__ already includes setjmp.h;
__dont__ include it again.;
This means you have compiled another module that includes setjmp.h,
which is hazardous because the two modules might not include exactly
the same setjmp.h. If you are sure that you know what you are doing
and that they are exactly the same, then you can comment out or
delete the two lines. Better yet, use the cexcept interface
instead, as demonstrated in contrib/visupng of the libpng distribution.
Further information can be found in the README and libpng.txt
files, in the individual makefiles, in png.h, in the README files in
subdirectories of the LIB directory, and the manual pages libpng.3 and png.5.
files, in the individual makefiles, in png.h, and the manual pages
libpng.3 and png.5.
Using the ./configure script -- 16 December 2002.

20
INSTALL.a Normal file
View File

@ -0,0 +1,20 @@
Using the ./configure script -- 16 December 2002.
=================================================
The ./configure script should work compatibly with what scripts/makefile.*
did, however there are some options you need to add to configure explicitly,
which previously was done semi-automatically (if you didn't edit
scripts/makefile.* yourself, that is)
CFLAGS="-Wall -O3 -funroll-loops \
-malign-loops=2 -malign-functions=2" ./configure --prefix=/usr/include \
--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include
You can alternatively specify --includedir=/usr/include, /usr/local/include,
/usr/include/png12, or whatever.

View File

@ -1,5 +1,5 @@
Known bugs in libpng version 1.2.8
Known bugs in libpng version 1.2.9beta1
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
reading interlaced PNG files, when assembler code is enabled but running

View File

@ -8,8 +8,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng version 1.2.6, December 3, 2004, is
Copyright (c) 2004 Glenn Randers-Pehrson, and is
libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are
Copyright (c) 2005 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
December 3, 2004
February 21, 2006

View File

@ -15,8 +15,10 @@ libpng12_la_SOURCES = png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngwtran.c pngmem.c pngerror.c pngpread.c \
png.h pngconf.h
libpng_la_SOURCES = $(libpng12_la_SOURCES)
libpng12_la_LDFLAGS = -export-dynamic -version-info $(LIBPNG12_VERSION_INFO)
libpng_la_LDFLAGS = -export-dynamic -version-info $(LIBPNG3_VERSION_INFO)
libpng12_la_LDFLAGS = -no-undefined -export-dynamic -version-info \
$(LIBPNG12_VERSION_INFO)
libpng_la_LDFLAGS = -no-undefined -export-dynamic -version-info \
$(LIBPNG3_VERSION_INFO)
#distribute headers in /usr/include/libpng/*
pkginclude_HEADERS= png.h pngconf.h
@ -24,7 +26,8 @@ pkginclude_HEADERS= png.h pngconf.h
#extra source distribution files.
EXTRA_DIST= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
${srcdir}/projects/cbuilder5/* ${srcdir}/projects/beos/* ${srcdir}/projects/visualc6/* \
${srcdir}/projects/cbuilder5/* ${srcdir}/projects/beos/* \
${srcdir}/projects/visualc6/* ${srcdir}/projects/visualc71 \
${srcdir}/projects/wince.txt ${srcdir}/projects/netware.txt \
${srcdir}/scripts/* \
${srcdir}/contrib/gregbook/* \

21
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.2.8 - December 3, 2004 (shared library 12.0)
README for libpng version 1.2.9beta1 - February 21, 2006 (shared library 12.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@ -103,9 +103,10 @@ fix. Please mention "libpng" somewhere in the subject line. Thanks.
This release was created and will be supported by myself (of course
based in a large way on Guy's and Andreas' earlier work), and the PNG group.
glennrp at users.sourceforge.net
png-implement at ccrc.wustl.edu (subscription required; write to
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
You can't reach Guy, the original libpng author, at the addresses
given in previous versions of this document. He and Andreas will read mail
@ -189,11 +190,11 @@ Files in this distribution:
descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng12.so.0.1.2.8)
gcc, creates libpng12.so.0.1.2.9beta1)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.8)
(gcc, creates libpng12.so.0.1.2.9beta1)
makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.8,
(gcc, creates libpng12.so.0.1.2.9beta1,
uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@ -215,12 +216,12 @@ Files in this distribution:
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
(gcc, creates libpng12.so.0.1.2.8)
(gcc, creates libpng12.so.0.1.2.9beta1)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng12.so.0.1.2.8)
(gcc, creates libpng12.so.0.1.2.9beta1)
makefile.so9 => Solaris 9 makefile
(gcc, creates libpng12.so.0.1.2.8)
(gcc, creates libpng12.so.0.1.2.9beta1)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc

View File

@ -1,13 +1,13 @@
Y2K compliance in libpng:
=========================
December 3, 2004
February 21, 2006
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.2.8 are Y2K compliant. It is my belief that earlier
upward through 1.2.9beta1 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer

20
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for libpng 1.2.8-automake.
# Generated by GNU Autoconf 2.57 for libpng 1.2.9beta1-automake.
#
# Report bugs to <png-implement@ccrc.wustl.edu>.
#
@ -427,8 +427,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng'
PACKAGE_VERSION='1.2.8-automake'
PACKAGE_STRING='libpng 1.2.8-automake'
PACKAGE_VERSION='1.2.9beta1-automake'
PACKAGE_STRING='libpng 1.2.9beta1-automake'
PACKAGE_BUGREPORT='png-implement@ccrc.wustl.edu'
ac_unique_file="pngget.c"
@ -938,7 +938,7 @@ if test "$ac_init_help" = "long"; then
# 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.
cat <<_ACEOF
\`configure' configures libpng 1.2.8-automake to adapt to many kinds of systems.
\`configure' configures libpng 1.2.9beta1-automake to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1008,7 +1008,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libpng 1.2.8-automake:";;
short | recursive ) echo "Configuration of libpng 1.2.9beta1-automake:";;
esac
cat <<\_ACEOF
@ -1106,7 +1106,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
libpng configure 1.2.8-automake
libpng configure 1.2.9beta1-automake
generated by GNU Autoconf 2.57
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
@ -1121,7 +1121,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libpng $as_me 1.2.8-automake, which was
It was created by libpng $as_me 1.2.9beta1-automake, which was
generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
@ -1721,7 +1721,7 @@ fi
# Define the identity of the package.
PACKAGE=libpng
VERSION=1.2.8-automake
VERSION=1.2.9beta1-automake
cat >>confdefs.h <<_ACEOF
@ -9673,7 +9673,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by libpng $as_me 1.2.8-automake, which was
This file was extended by libpng $as_me 1.2.9beta1-automake, which was
generated by GNU Autoconf 2.57. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -9736,7 +9736,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
libpng config.status 1.2.8-automake
libpng config.status 1.2.9beta1-automake
configured by $0, generated by GNU Autoconf 2.57,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
m4_define(PNGPKG_VERSION,[1.2.8-automake])
m4_define(PNGPKG_VERSION,[1.2.9beta1-automake])
AC_INIT([libpng], PNGPKG_VERSION, png-implement@ccrc.wustl.edu)
AM_INIT_AUTOMAKE([libpng], PNGPKG_VERSION)
AC_CONFIG_SRCDIR([pngget.c])

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -1,6 +1,6 @@
.TH LIBPNG 3 "December 3, 2004"
.TH LIBPNG 3 "February 21, 2006"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.8
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.9beta1
.SH SYNOPSIS
\fI\fB
@ -781,10 +781,10 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng version 1.2.8 - December 3, 2004
libpng version 1.2.9beta1 - February 21, 2006
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2004 Glenn Randers-Pehrson
Copyright (c) 1998-2005 Glenn Randers-Pehrson
For conditions of distribution and use, see copyright
notice in png.h.
@ -2029,8 +2029,8 @@ the second parameter NULL.
.SS Finishing a sequential read
After you are finished reading the image through either the high- or
low-level interfaces, you can finish reading the file. If you are
After you are finished reading the image through the
low-level interface, you can finish reading the file. If you are
interested in comments or time, which may be stored either before or
after the image data, you should pass the separate png_info struct if
you want to keep the comments from before and after the image
@ -3240,7 +3240,7 @@ to use the "cexcept" facility (see http://cexcept.sourceforge.net).
If you need to read or write custom chunks, you may need to get deeper
into the libpng code. The library now has mechanisms for storing
and writing chunks of unknown type; you can even declare callbacks
for custom chunks. Hoewver, this may not be good enough if the
for custom chunks. However, this may not be good enough if the
library code itself needs to know about interactions between your
chunk and existing `intrinsic' chunks.
@ -3685,13 +3685,13 @@ application:
.SH IX. Y2K Compliance in libpng
December 3, 2004
February 21, 2006
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.2.8 are Y2K compliant. It is my belief that earlier
upward through 1.2.9beta1 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@ -3844,6 +3844,7 @@ the first widely used release:
1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
1.0.18 10 10018 12.so.0.1.0.18
1.2.8 13 10208 12.so.0.1.2.8
1.3.0beta1 14 10300 13.so.0.1.3.0beta1
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@ -3899,14 +3900,17 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.2.8 - December 3, 2004:
Libpng version 1.2.9beta1 - February 21, 2006:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
Supported by the PNG development group
.br
png-implement at ccrc.wustl.edu (subscription required; write to
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message).
png-mng-implement at lists.sf.net
(subscription required; visit
png-implement at ccrc.wustl.edu (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe).
.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
@ -3917,8 +3921,8 @@ included in the libpng distribution, the latter shall prevail.)
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng version 1.2.6, December 3, 2004, is
Copyright (c) 2004 Glenn Randers-Pehrson, and is
libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are
Copyright (c) 2005 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@ -4016,7 +4020,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
December 3, 2004
February 21, 2006
.\" end of man page

View File

@ -1,9 +1,9 @@
libpng.txt - A description on how to use and modify libpng
libpng version 1.2.8 - December 3, 2004
libpng version 1.2.9beta1 - February 21, 2006
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2004 Glenn Randers-Pehrson
Copyright (c) 1998-2005 Glenn Randers-Pehrson
For conditions of distribution and use, see copyright
notice in png.h.
@ -1248,8 +1248,8 @@ the second parameter NULL.
Finishing a sequential read
After you are finished reading the image through either the high- or
low-level interfaces, you can finish reading the file. If you are
After you are finished reading the image through the
low-level interface, you can finish reading the file. If you are
interested in comments or time, which may be stored either before or
after the image data, you should pass the separate png_info struct if
you want to keep the comments from before and after the image
@ -2459,7 +2459,7 @@ Custom chunks
If you need to read or write custom chunks, you may need to get deeper
into the libpng code. The library now has mechanisms for storing
and writing chunks of unknown type; you can even declare callbacks
for custom chunks. Hoewver, this may not be good enough if the
for custom chunks. However, this may not be good enough if the
library code itself needs to know about interactions between your
chunk and existing `intrinsic' chunks.
@ -2904,13 +2904,13 @@ application:
IX. Y2K Compliance in libpng
December 3, 2004
February 21, 2006
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.2.8 are Y2K compliant. It is my belief that earlier
upward through 1.2.9beta1 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that

View File

@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "December 3, 2004"
.TH LIBPNGPF 3 "February 21, 2006"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.8
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.9beta1
(private functions)
.SH SYNOPSIS
\fB\fB#include <png.h>\fP\fP

4
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "December 3, 2004"
.TH PNG 5 "February 21, 2006"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
@ -58,7 +58,7 @@ Thomas Boutell and others (png-list).
.SH COPYRIGHT NOTICE
.LP
This man page is Copyright (c) 1998-2004 Glenn Randers-Pehrson. See png.h
This man page is Copyright (c) 1998-2005 Glenn Randers-Pehrson. See png.h
for conditions of use and distribution.
.LP
The PNG Specification (Second Edition) is

33
png.c
View File

@ -1,9 +1,9 @@
/* png.c - location for general purpose libpng functions
*
* libpng version 1.2.8 - December 3, 2004
* libpng version 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
@ -13,7 +13,7 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_2_8 Your_png_h_is_not_version_1_2_8;
typedef version_1_2_9beta1 Your_png_h_is_not_version_1_2_9beta1;
/* Version information for C files. This had better match the version
* string defined in png.h. */
@ -22,9 +22,12 @@ typedef version_1_2_8 Your_png_h_is_not_version_1_2_8;
/* png_libpng_ver was changed to a function in version 1.0.5c */
const char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
#ifdef PNG_READ_SUPPORTED
/* png_sig was changed to a function in version 1.0.5c */
/* Place to hold the signature string for a PNG file. */
const png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
#endif /* PNG_READ_SUPPORTED */
/* Invoke global declarations for constant strings for known chunk types */
PNG_IHDR;
@ -49,6 +52,7 @@ PNG_tIME;
PNG_tRNS;
PNG_zTXt;
#ifdef PNG_READ_SUPPORTED
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* start of interlace block */
@ -80,6 +84,7 @@ const int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
const int FARDATA png_pass_dsp_mask[]
= {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_USE_GLOBAL_ARRAYS */
/* Tells libpng that we have already handled the first "num_bytes" bytes
@ -88,6 +93,7 @@ const int FARDATA png_pass_dsp_mask[]
* or write any of the magic bytes before it starts on the IHDR.
*/
#ifdef PNG_READ_SUPPORTED
void PNGAPI
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
{
@ -113,10 +119,10 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
if (num_to_check > 8)
num_to_check = 8;
else if (num_to_check < 1)
return (0);
return (-1);
if (start > 7)
return (0);
return (-1);
if (start + num_to_check > 8)
num_to_check = 8 - start;
@ -124,6 +130,7 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));
}
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
/* (Obsolete) function to check signature bytes. It does not allow one
* to check a partial signature. This function might be removed in the
* future - use png_sig_cmp(). Returns true (nonzero) if the file is a PNG.
@ -133,7 +140,10 @@ png_check_sig(png_bytep sig, int num)
{
return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));
}
#endif
#endif /* PNG_READ_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Function to allocate memory for zlib and clear it to 0. */
#ifdef PNG_1_0_X
voidpf PNGAPI
@ -592,6 +602,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
png_info_init_3(&info_ptr, png_sizeof(png_info));
}
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
/* This function returns a pointer to the io_ptr associated with the user
* functions. The application should free any memory associated with this
@ -603,6 +614,7 @@ png_get_io_ptr(png_structp png_ptr)
return (png_ptr->io_ptr);
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#if !defined(PNG_NO_STDIO)
/* Initialize the default input/output functions for the PNG file. If you
* use your own read or write routines, you can call either png_set_read_fn()
@ -675,13 +687,14 @@ png_sig_bytes(void)
return ((png_bytep)"\211\120\116\107\015\012\032\012");
}
#endif
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
png_charp PNGAPI
png_get_copyright(png_structp png_ptr)
{
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
return ((png_charp) "\n libpng version 1.2.8 - December 3, 2004\n\
Copyright (c) 1998-2004 Glenn Randers-Pehrson\n\
return ((png_charp) "\n libpng version 1.2.9beta1 - February 21, 2006\n\
Copyright (c) 1998-2006 Glenn Randers-Pehrson\n\
Copyright (c) 1996-1997 Andreas Dilger\n\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
return ((png_charp) "");
@ -722,6 +735,7 @@ png_get_header_version(png_structp png_ptr)
return ((png_charp) "");
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
int PNGAPI
png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
@ -745,6 +759,7 @@ png_reset_zstream(png_structp png_ptr)
{
return (inflateReset(&png_ptr->zstream));
}
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
/* This function was added to libpng-1.0.7 */
png_uint_32 PNGAPI
@ -755,6 +770,7 @@ png_access_version_number(void)
}
#if defined(PNG_READ_SUPPORTED)
#if !defined(PNG_1_0_X)
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
@ -814,7 +830,9 @@ png_mmx_support(void)
}
#endif
#endif /* PNG_1_0_X */
#endif /* PNG_READ_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#ifdef PNG_SIZE_T
/* Added at libpng version 1.2.6 */
PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
@ -826,3 +844,4 @@ png_convert_size(size_t size)
return ((png_size_t)size);
}
#endif /* PNG_SIZE_T */
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */

125
png.h
View File

@ -1,14 +1,14 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.2.8 - December 3, 2004
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
* libpng version 1.2.9beta1 - February 21, 2006
* Copyright (c) 1998-2005 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
* Authors and maintainers:
* 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.97, January 1998, through 1.2.8 - December 3, 2004: Glenn
* libpng versions 0.97, January 1998, through 1.2.9beta1 - February 21, 2006: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -111,6 +111,7 @@
* 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5
* 1.0.18 10 10018 12.so.0.1.0.18
* 1.2.8 13 10208 12.so.0.1.2.8
* 1.3.0beta1 14 10300 13.so.0.1.3.0beta1
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@ -140,8 +141,8 @@
* If you modify libpng you may insert additional notices immediately following
* this sentence.
*
* libpng versions 1.2.6, August 15, 2004, through 1.2.8, December 3, 2004, are
* Copyright (c) 2004 Glenn Randers-Pehrson, and are
* libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are
* Copyright (c) 2005 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
*
@ -252,13 +253,13 @@
* Y2K compliance in libpng:
* =========================
*
* December 3, 2004
* February 21, 2006
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.2.8 are Y2K compliant. It is my belief that earlier
* upward through 1.2.9beta1 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@ -314,9 +315,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.2.8"
#define PNG_LIBPNG_VER_STRING "1.2.9beta1"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.2.8 - December 3, 2004 (header)\n"
" libpng version 1.2.9beta1 - February 21, 2006 (header)\n"
#define PNG_LIBPNG_VER_SONUM 0
#define PNG_LIBPNG_VER_DLLNUM 13
@ -324,11 +325,11 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 2
#define PNG_LIBPNG_VER_RELEASE 8
#define PNG_LIBPNG_VER_RELEASE 9
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
#define PNG_LIBPNG_VER_BUILD 0
#define PNG_LIBPNG_VER_BUILD 1
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@ -345,14 +346,14 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
* 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 */
#define PNG_LIBPNG_VER 10208 /* 1.2.8 */
#define PNG_LIBPNG_VER 10209 /* 1.2.9 */
#ifndef PNG_VERSION_INFO_ONLY
/* include the compression library's header */
@ -376,14 +377,14 @@
*/
#if defined(PNG_USER_PRIVATEBUILD)
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \
PNG_LIBPNG_BUILD_PRIVATE
# define PNG_LIBPNG_BUILD_TYPE \
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
#else
# if defined(PNG_LIBPNG_SPECIALBUILD)
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \
PNG_LIBPNG_BUILD_SPECIAL
# define PNG_LIBPNG_BUILD_TYPE \
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
# else
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE
# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
# endif
#endif
@ -894,8 +895,10 @@ typedef png_info FAR * FAR * png_infopp;
#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
#define PNG_UINT_32_MAX ((png_uint_32)(-1))
#define PNG_SIZE_MAX ((png_size_t)(-1))
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
/* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
#define PNG_MAX_UINT PNG_UINT_31_MAX
#endif
/* These describe the color_type field in png_info. */
/* color type masks */
@ -1356,7 +1359,7 @@ struct png_struct_def
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef png_structp version_1_2_8;
typedef png_structp version_1_2_9beta1;
typedef png_struct FAR * FAR * png_structpp;
@ -2572,6 +2575,44 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
/* Inline macros to do direct reads of bytes from the input buffer. These
* require that you are using an architecture that uses PNG byte ordering
* (MSB first) and supports unaligned data storage. I think that PowerPC
* in big-endian mode and 680x0 are the only ones that will support this.
* The x86 line of processors definitely do not. The png_get_int_32()
* routine also assumes we are using two's complement format for negative
* values, which is almost certainly true.
*/
#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
# define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
# define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))
# define png_get_int_32(buf) ( *((png_int_32p) (buf)))
#else
extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));
extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));
extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));
#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */
extern PNG_EXPORT(png_uint_32,png_get_uint_31)
PNGARG((png_structp png_ptr, png_bytep buf));
/* No png_get_int_16 -- may be added if there's a real need for it. */
/* Place a 32-bit number into a buffer in PNG byte order (big-endian).
*/
extern PNG_EXPORT(void,png_save_uint_32)
PNGARG((png_bytep buf, png_uint_32 i));
extern PNG_EXPORT(void,png_save_int_32)
PNGARG((png_bytep buf, png_int_32 i));
/* Place a 16-bit number into a buffer in PNG byte order.
* The parameter is declared unsigned int, not png_uint_16,
* just to avoid potential problems on pre-ANSI C compilers.
*/
extern PNG_EXPORT(void,png_save_uint_16)
PNGARG((png_bytep buf, unsigned int i));
/* No png_save_int_16 -- may be added if there's a real need for it. */
/* ************************************************************************* */
/* These next functions are used internally in the code. They generally
* shouldn't be used unless you are writing code to add or replace some
* functionality in libpng. More information about most functions can
@ -2762,31 +2803,7 @@ PNG_EXPORT_VAR (const png_byte FARDATA) png_tRNS[5];
PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5];
#endif /* PNG_USE_GLOBAL_ARRAYS */
/* Inline macros to do direct reads of bytes from the input buffer. These
* require that you are using an architecture that uses PNG byte ordering
* (MSB first) and supports unaligned data storage. I think that PowerPC
* in big-endian mode and 680x0 are the only ones that will support this.
* The x86 line of processors definitely do not. The png_get_int_32()
* routine also assumes we are using two's complement format for negative
* values, which is almost certainly true.
*/
#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)
# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED)
# define png_get_int_32(buf) ( *((png_int_32p) (buf)))
# endif
# define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))
# define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))
#else
# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED)
PNG_EXTERN png_int_32 png_get_int_32 PNGARG((png_bytep buf));
# endif
PNG_EXTERN png_uint_32 png_get_uint_32 PNGARG((png_bytep buf));
PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf));
#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */
PNG_EXTERN png_uint_32 png_get_uint_31 PNGARG((png_structp png_ptr,
png_bytep buf));
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
/* Initialize png_ptr struct for reading, and allocate any other memory.
* (old interface - DEPRECATED - use png_create_read_struct instead).
*/
@ -2794,11 +2811,14 @@ extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr));
#undef png_read_init
#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
#endif
extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
png_const_charp user_png_ver, png_size_t png_struct_size));
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
png_info_size));
#endif
/* Initialize png_ptr struct for writing, and allocate any other memory.
* (old interface - DEPRECATED - use png_create_write_struct instead).
@ -2906,23 +2926,6 @@ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
#endif
/* Place a 32-bit number into a buffer in PNG byte order (big-endian).
* The only currently known PNG chunks that use signed numbers are
* the ancillary extension chunks, oFFs and pCAL.
*/
PNG_EXTERN void png_save_uint_32 PNGARG((png_bytep buf, png_uint_32 i));
#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED)