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

49
CHANGES
View File

@ -10,7 +10,7 @@ version 0.3
split up pngwrite.c to several files split up pngwrite.c to several files
added pnglib.txt added pnglib.txt
added example.c added example.c
cleaned up writer, adding a few new tranformations cleaned up writer, adding a few new transformations
fixed some bugs in writer fixed some bugs in writer
interfaced with zlib 0.5 interfaced with zlib 0.5
added K&R support added K&R support
@ -22,7 +22,7 @@ version 0.4
created png_color_16 and png_color_8 to handle color needs created png_color_16 and png_color_8 to handle color needs
cleaned up color type defines cleaned up color type defines
fixed various bugs fixed various bugs
made various names more consistant made various names more consistent
interfaced with zlib 0.71 interfaced with zlib 0.71
cleaned up zTXt reader and writer (using zlib's Reset functions) cleaned up zTXt reader and writer (using zlib's Reset functions)
split transformations into pngrtran.c and pngwtran.c 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 added "packswap" transformation, which changes the endianness of
packed-pixel bytes (Kevin Bracey) packed-pixel bytes (Kevin Bracey)
added "strip_alpha" transformation, which removes the alpha channel of 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 added "swap_alpha" transformation, which puts the alpha channel in front
of the color bytes instead of after of the color bytes instead of after
removed all implicit variable tests which assume NULL == 0 (I think) 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 more chunk types tested in pngtest.c
renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be
png_set_<chunk>. We now have corresponding png_get_<chunk> 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 the application from the internal organization of png_info_struct
(good for shared library implementations). (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 Updated scripts/makevms.com and added makevms.com to contrib/gregbook
and contrib/pngminus (Martin Zinser) and contrib/pngminus (Martin Zinser)
version 1.0.5c [November 26, 1999] 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 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 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 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 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. Added png_set_add_alpha() that updates color type.
version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004] 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. 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] version 1.0.17 and 1.2.7 [September 12, 2004]
Added makefile.hp64 Added makefile.hp64
Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin 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). Added projects/visualc7 (Simon-pierre).
version 1.2.8rc5 [November 29, 2004] version 1.2.8rc5 [November 29, 2004]
Fixed new typo in scripts/pngw32.rc Fixed new typo in scripts/pngw32.rc
version 1.2.8 [December 3, 2004] version 1.2.8 [December 3, 2004]
Removed projects/visualc7, added projects/visualc71. Removed projects/visualc7, added projects/visualc71.
Send comments/corrections/commendations to version 1.2.9beta1 [February 21, 2006]
png-implement at ccrc.wustl.edu (subscription required; write to
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message) 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 or to glennrp at users.sourceforge.net
Glenn R-P 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 Before installing libpng, you must first install zlib. zlib
can usually be found wherever you got libpng. zlib can be 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. 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.2.8" or "lpng109" and "zlib-1.1.3" might be called "libpng-1.2.9beta1" or "lpng109" and "zlib-1.2.1"
or "zlib113") 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:
@ -23,14 +23,13 @@ Your directory structure should look like this:
*.c *.c
contrib contrib
gregbook gregbook
msvctest
pngminus pngminus
pngsuite pngsuite
visupng visupng
projects projects
beos beos
borland c5builder (Borland)
msvc visualc6 (msvc)
netware.txt netware.txt
wince.txt wince.txt
scripts 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 distribution of libpng. It is available in both tar.gz (UNIX style line
endings) and zip (DOS style line endings) formats. 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 If you are building libpng with MSVC, you can enter the
the libpng\wince directory as instructed in the projects\wince.txt file, and 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 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, 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 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 include
makefile.std => Generic UNIX makefile (cc, creates static libpng.a) 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.elf => Linux/ELF makefile symbol versioning,
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8, 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) 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
@ -73,23 +79,27 @@ include
ftp://ftp.cs.wisc.edu/ghost) ftp://ftp.cs.wisc.edu/ghost)
makefile.aix => AIX/gcc makefile makefile.aix => AIX/gcc makefile
makefile.cygwin => Cygwin/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.dec => DEC Alpha UNIX makefile
makefile.hpgcc => FreeBSD makefile makefile.freebsd => FreeBSD makefile
makefile.hpgcc => HPUX makefile using gcc makefile.hpgcc => HPUX makefile using gcc
makefile.hpux => HPUX (10.20 and 11.00) makefile 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.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or 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.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.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, 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.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8) makefile.solaris => Solaris 2.X makefile (gcc,
makefile.so9 => Solaris 9 makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8) 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.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
@ -102,7 +112,6 @@ include
makefile.beos => BEOS makefile for X86 makefile.beos => BEOS makefile for X86
makefile.bor => Borland makefile (uses bcc) makefile.bor => Borland makefile (uses bcc)
makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) 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.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile makefile.msc => Microsoft C makefile
@ -115,7 +124,6 @@ include
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script makevms.com => VMS build script
descrip.mms => VMS makefile for MMS or MMK 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 SCOPTIONS.ppc => Used with smakefile.ppc
Copy the file (or files) that you need from the 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 Then read pngconf.h to see if you want to make any configuration
changes. changes.
Then just run "make test" which will create the libpng library in Then just run "make" which will create the libpng library in
this directory and run a quick test that reads the "pngtest.png" this directory and "make test" which will run a quick test that reads
file and writes a "pngout.png" file that should be identical to it. the "pngtest.png" file and writes a "pngout.png" file that should be
Look for "9782 zero samples" in the output of the test. For more identical to it. Look for "9782 zero samples" in the output of the
confidence, you can run another test by typing "pngtest pngnow.png" test. For more confidence, you can run another test by typing
and looking for "289 zero samples" in the output. Also, you can "pngtest pngnow.png" and looking for "289 zero samples" in the output.
run "pngtest -m *.png" in the "contrib/pngsuite" directory and compare Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
your output with the result shown in contrib/pngsuite/README. your output with the result shown in contrib/pngsuite/README.
Most of the makefiles will allow you to run "make install" to 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 Some also allow you to run "make test-installed" after you have
run "make install". 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 Further information can be found in the README and libpng.txt
files, in the individual makefiles, in png.h, in the README files in files, in the individual makefiles, in png.h, and the manual pages
subdirectories of the LIB directory, and the manual pages libpng.3 and png.5. libpng.3 and png.5.
Using the ./configure script -- 16 December 2002. 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 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 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 If you modify libpng you may insert additional notices immediately following
this sentence. this sentence.
libpng version 1.2.6, December 3, 2004, is libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are
Copyright (c) 2004 Glenn Randers-Pehrson, and is Copyright (c) 2005 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
@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
December 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 \ pngwtran.c pngmem.c pngerror.c pngpread.c \
png.h pngconf.h png.h pngconf.h
libpng_la_SOURCES = $(libpng12_la_SOURCES) libpng_la_SOURCES = $(libpng12_la_SOURCES)
libpng12_la_LDFLAGS = -export-dynamic -version-info $(LIBPNG12_VERSION_INFO) libpng12_la_LDFLAGS = -no-undefined -export-dynamic -version-info \
libpng_la_LDFLAGS = -export-dynamic -version-info $(LIBPNG3_VERSION_INFO) $(LIBPNG12_VERSION_INFO)
libpng_la_LDFLAGS = -no-undefined -export-dynamic -version-info \
$(LIBPNG3_VERSION_INFO)
#distribute headers in /usr/include/libpng/* #distribute headers in /usr/include/libpng/*
pkginclude_HEADERS= png.h pngconf.h pkginclude_HEADERS= png.h pngconf.h
@ -24,7 +26,8 @@ pkginclude_HEADERS= png.h pngconf.h
#extra source distribution files. #extra source distribution files.
EXTRA_DIST= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ EXTRA_DIST= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ 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}/projects/wince.txt ${srcdir}/projects/netware.txt \
${srcdir}/scripts/* \ ${srcdir}/scripts/* \
${srcdir}/contrib/gregbook/* \ ${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 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.
@ -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 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. based in a large way on Guy's and Andreas' earlier work), and the PNG group.
glennrp at users.sourceforge.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
png-implement at ccrc.wustl.edu (subscription required; write to (subscription required; visit
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message). 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 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 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 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 libpng12.so.0.1.2.8) gcc, creates libpng12.so.0.1.2.9beta1)
makefile.linux => Linux/ELF makefile 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 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) 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
@ -215,12 +216,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 libpng12.so.0.1.2.8) (gcc, creates libpng12.so.0.1.2.9beta1)
makefile.sunos => Sun makefile makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X 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 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.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:
========================= =========================
December 3, 2004 February 21, 2006
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.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. 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

20
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.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>. # Report bugs to <png-implement@ccrc.wustl.edu>.
# #
@ -427,8 +427,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='libpng' PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng' PACKAGE_TARNAME='libpng'
PACKAGE_VERSION='1.2.8-automake' PACKAGE_VERSION='1.2.9beta1-automake'
PACKAGE_STRING='libpng 1.2.8-automake' PACKAGE_STRING='libpng 1.2.9beta1-automake'
PACKAGE_BUGREPORT='png-implement@ccrc.wustl.edu' PACKAGE_BUGREPORT='png-implement@ccrc.wustl.edu'
ac_unique_file="pngget.c" 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. # 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.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]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1008,7 +1008,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.2.8-automake:";; short | recursive ) echo "Configuration of libpng 1.2.9beta1-automake:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1106,7 +1106,7 @@ fi
test -n "$ac_init_help" && exit 0 test -n "$ac_init_help" && exit 0
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
libpng configure 1.2.8-automake libpng configure 1.2.9beta1-automake
generated by GNU Autoconf 2.57 generated by GNU Autoconf 2.57
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 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 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.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 generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@ $ $0 $@
@ -1721,7 +1721,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=libpng PACKAGE=libpng
VERSION=1.2.8-automake VERSION=1.2.9beta1-automake
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -9673,7 +9673,7 @@ _ASBOX
} >&5 } >&5
cat >&5 <<_CSEOF 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 generated by GNU Autoconf 2.57. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -9736,7 +9736,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ 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, configured by $0, generated by GNU Autoconf 2.57,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" 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. # 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) AC_INIT([libpng], PNGPKG_VERSION, png-implement@ccrc.wustl.edu)
AM_INIT_AUTOMAKE([libpng], PNGPKG_VERSION) AM_INIT_AUTOMAKE([libpng], PNGPKG_VERSION)
AC_CONFIG_SRCDIR([pngget.c]) 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 .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.8 libpng \- Portable Network Graphics (PNG) Reference Library 1.2.9beta1
.SH SYNOPSIS .SH SYNOPSIS
\fI\fB \fI\fB
@ -781,10 +781,10 @@ 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.2.8 - December 3, 2004 libpng version 1.2.9beta1 - February 21, 2006
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-2004 Glenn Randers-Pehrson Copyright (c) 1998-2005 Glenn Randers-Pehrson
For conditions of distribution and use, see copyright For conditions of distribution and use, see copyright
notice in png.h. notice in png.h.
@ -2029,8 +2029,8 @@ the second parameter NULL.
.SS Finishing a sequential read .SS Finishing a sequential read
After you are finished reading the image through either the high- or After you are finished reading the image through the
low-level interfaces, you can finish reading the file. If you are low-level interface, you can finish reading the file. If you are
interested in comments or time, which may be stored either before or 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 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 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 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 into the libpng code. The library now has mechanisms for storing
and writing chunks of unknown type; you can even declare callbacks 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 library code itself needs to know about interactions between your
chunk and existing `intrinsic' chunks. chunk and existing `intrinsic' chunks.
@ -3685,13 +3685,13 @@ application:
.SH IX. Y2K Compliance in libpng .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 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.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. 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
@ -3844,6 +3844,7 @@ the first widely used release:
1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 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.0.18 10 10018 12.so.0.1.0.18
1.2.8 13 10208 12.so.0.1.2.8 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 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
@ -3899,14 +3900,17 @@ 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.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. 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).
Supported by the PNG development group Supported by the PNG development group
.br .br
png-implement at ccrc.wustl.edu (subscription required; write to png-mng-implement at lists.sf.net
majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message). (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: .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 If you modify libpng you may insert additional notices immediately following
this sentence. this sentence.
libpng version 1.2.6, December 3, 2004, is libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are
Copyright (c) 2004 Glenn Randers-Pehrson, and is Copyright (c) 2005 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
@ -4016,7 +4020,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
December 3, 2004 February 21, 2006
.\" end of man page .\" end of man page

View File

@ -1,9 +1,9 @@
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.2.8 - December 3, 2004 libpng version 1.2.9beta1 - February 21, 2006
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-2004 Glenn Randers-Pehrson Copyright (c) 1998-2005 Glenn Randers-Pehrson
For conditions of distribution and use, see copyright For conditions of distribution and use, see copyright
notice in png.h. notice in png.h.
@ -1248,8 +1248,8 @@ the second parameter NULL.
Finishing a sequential read Finishing a sequential read
After you are finished reading the image through either the high- or After you are finished reading the image through the
low-level interfaces, you can finish reading the file. If you are low-level interface, you can finish reading the file. If you are
interested in comments or time, which may be stored either before or 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 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 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 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 into the libpng code. The library now has mechanisms for storing
and writing chunks of unknown type; you can even declare callbacks 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 library code itself needs to know about interactions between your
chunk and existing `intrinsic' chunks. chunk and existing `intrinsic' chunks.
@ -2904,13 +2904,13 @@ application:
IX. Y2K Compliance in libpng 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 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.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. 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 LIBPNGPF 3 "December 3, 2004" .TH LIBPNGPF 3 "February 21, 2006"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.8 libpng \- Portable Network Graphics (PNG) Reference Library 1.2.9beta1
(private functions) (private functions)
.SH SYNOPSIS .SH SYNOPSIS
\fB\fB#include <png.h>\fP\fP \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 .SH NAME
png \- Portable Network Graphics (PNG) format png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION .SH DESCRIPTION
@ -58,7 +58,7 @@ Thomas Boutell and others (png-list).
.SH COPYRIGHT NOTICE .SH COPYRIGHT NOTICE
.LP .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. for conditions of use and distribution.
.LP .LP
The PNG Specification (Second Edition) is The PNG Specification (Second Edition) is

33
png.c
View File

@ -1,9 +1,9 @@
/* png.c - location for general purpose libpng functions /* 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 * 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.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.)
*/ */
@ -13,7 +13,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_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 /* Version information for C files. This had better match the version
* string defined in png.h. */ * 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 */ /* png_libpng_ver was changed to a function in version 1.0.5c */
const char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING; 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 */ /* png_sig was changed to a function in version 1.0.5c */
/* Place to hold the signature string for a PNG file. */ /* 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}; 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 */ /* Invoke global declarations for constant strings for known chunk types */
PNG_IHDR; PNG_IHDR;
@ -49,6 +52,7 @@ PNG_tIME;
PNG_tRNS; PNG_tRNS;
PNG_zTXt; PNG_zTXt;
#ifdef PNG_READ_SUPPORTED
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* start of interlace block */ /* 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[] const int FARDATA png_pass_dsp_mask[]
= {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_USE_GLOBAL_ARRAYS */ #endif /* PNG_USE_GLOBAL_ARRAYS */
/* Tells libpng that we have already handled the first "num_bytes" bytes /* 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. * or write any of the magic bytes before it starts on the IHDR.
*/ */
#ifdef PNG_READ_SUPPORTED
void PNGAPI void PNGAPI
png_set_sig_bytes(png_structp png_ptr, int num_bytes) 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) if (num_to_check > 8)
num_to_check = 8; num_to_check = 8;
else if (num_to_check < 1) else if (num_to_check < 1)
return (0); return (-1);
if (start > 7) if (start > 7)
return (0); return (-1);
if (start + num_to_check > 8) if (start + num_to_check > 8)
num_to_check = 8 - start; 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))); 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 /* (Obsolete) function to check signature bytes. It does not allow one
* to check a partial signature. This function might be removed in the * 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. * 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)); 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. */ /* Function to allocate memory for zlib and clear it to 0. */
#ifdef PNG_1_0_X #ifdef PNG_1_0_X
voidpf PNGAPI 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)); 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 /* This function returns a pointer to the io_ptr associated with the user
* functions. The application should free any memory associated with this * 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); return (png_ptr->io_ptr);
} }
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#if !defined(PNG_NO_STDIO) #if !defined(PNG_NO_STDIO)
/* Initialize the default input/output functions for the PNG file. If you /* 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() * 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"); return ((png_bytep)"\211\120\116\107\015\012\032\012");
} }
#endif #endif
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
png_charp PNGAPI png_charp PNGAPI
png_get_copyright(png_structp png_ptr) png_get_copyright(png_structp png_ptr)
{ {
if (&png_ptr != NULL) /* silence compiler warning about unused 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\ return ((png_charp) "\n libpng version 1.2.9beta1 - February 21, 2006\n\
Copyright (c) 1998-2004 Glenn Randers-Pehrson\n\ Copyright (c) 1998-2006 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");
return ((png_charp) ""); return ((png_charp) "");
@ -722,6 +735,7 @@ png_get_header_version(png_structp png_ptr)
return ((png_charp) ""); return ((png_charp) "");
} }
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
int PNGAPI int PNGAPI
png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name) 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)); return (inflateReset(&png_ptr->zstream));
} }
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
/* This function was added to libpng-1.0.7 */ /* This function was added to libpng-1.0.7 */
png_uint_32 PNGAPI 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_1_0_X)
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */ /* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
@ -814,7 +830,9 @@ png_mmx_support(void)
} }
#endif #endif
#endif /* PNG_1_0_X */ #endif /* PNG_1_0_X */
#endif /* PNG_READ_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#ifdef PNG_SIZE_T #ifdef PNG_SIZE_T
/* Added at libpng version 1.2.6 */ /* Added at libpng version 1.2.6 */
PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)); 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); return ((png_size_t)size);
} }
#endif /* PNG_SIZE_T */ #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 /* png.h - header file for PNG reference library
* *
* libpng version 1.2.8 - December 3, 2004 * libpng version 1.2.9beta1 - February 21, 2006
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2005 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.)
* *
* 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.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. * See also "Contributing Authors", below.
* *
* Note about libpng version numbers: * Note about libpng version numbers:
@ -111,6 +111,7 @@
* 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 * 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.0.18 10 10018 12.so.0.1.0.18
* 1.2.8 13 10208 12.so.0.1.2.8 * 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 * 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
@ -140,8 +141,8 @@
* If you modify libpng you may insert additional notices immediately following * If you modify libpng you may insert additional notices immediately following
* this sentence. * this sentence.
* *
* libpng versions 1.2.6, August 15, 2004, through 1.2.8, December 3, 2004, are * libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are
* Copyright (c) 2004 Glenn Randers-Pehrson, and are * Copyright (c) 2005 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:
* *
@ -252,13 +253,13 @@
* Y2K compliance in libpng: * Y2K compliance in libpng:
* ========================= * =========================
* *
* December 3, 2004 * February 21, 2006
* *
* 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.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. * 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
@ -314,9 +315,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.2.8" #define PNG_LIBPNG_VER_STRING "1.2.9beta1"
#define PNG_HEADER_VERSION_STRING \ #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_SONUM 0
#define PNG_LIBPNG_VER_DLLNUM 13 #define PNG_LIBPNG_VER_DLLNUM 13
@ -324,11 +325,11 @@
/* 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 2 #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 /* 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: */
#define PNG_LIBPNG_VER_BUILD 0 #define PNG_LIBPNG_VER_BUILD 1
/* Release Status */ /* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1 #define PNG_LIBPNG_BUILD_ALPHA 1
@ -345,14 +346,14 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */ 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. /* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros. * We must not include leading zeros.
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only * 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.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 10208 /* 1.2.8 */ #define PNG_LIBPNG_VER 10209 /* 1.2.9 */
#ifndef PNG_VERSION_INFO_ONLY #ifndef PNG_VERSION_INFO_ONLY
/* include the compression library's header */ /* include the compression library's header */
@ -376,14 +377,14 @@
*/ */
#if defined(PNG_USER_PRIVATEBUILD) #if defined(PNG_USER_PRIVATEBUILD)
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \ # define PNG_LIBPNG_BUILD_TYPE \
PNG_LIBPNG_BUILD_PRIVATE (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
#else #else
# if defined(PNG_LIBPNG_SPECIALBUILD) # if defined(PNG_LIBPNG_SPECIALBUILD)
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \ # define PNG_LIBPNG_BUILD_TYPE \
PNG_LIBPNG_BUILD_SPECIAL (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
# else # else
# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE # define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
# endif # endif
#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_31_MAX ((png_uint_32)0x7fffffffL)
#define PNG_UINT_32_MAX ((png_uint_32)(-1)) #define PNG_UINT_32_MAX ((png_uint_32)(-1))
#define PNG_SIZE_MAX ((png_size_t)(-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. */ /* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
#define PNG_MAX_UINT PNG_UINT_31_MAX #define PNG_MAX_UINT PNG_UINT_31_MAX
#endif
/* These describe the color_type field in png_info. */ /* These describe the color_type field in png_info. */
/* color type masks */ /* 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 /* 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_2_8; typedef png_structp version_1_2_9beta1;
typedef png_struct FAR * FAR * png_structpp; 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 */ #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 /* 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 * shouldn't be used unless you are writing code to add or replace some
* functionality in libpng. More information about most functions can * 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]; PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5];
#endif /* PNG_USE_GLOBAL_ARRAYS */ #endif /* PNG_USE_GLOBAL_ARRAYS */
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
/* 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));
/* Initialize png_ptr struct for reading, and allocate any other memory. /* Initialize png_ptr struct for reading, and allocate any other memory.
* (old interface - DEPRECATED - use png_create_read_struct instead). * (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 #undef png_read_init
#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \ #define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
PNG_LIBPNG_VER_STRING, png_sizeof(png_struct)); PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));
#endif
extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr, 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)); 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, 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_const_charp user_png_ver, png_size_t png_struct_size, png_size_t
png_info_size)); png_info_size));
#endif
/* Initialize png_ptr struct for writing, and allocate any other memory. /* Initialize png_ptr struct for writing, and allocate any other memory.
* (old interface - DEPRECATED - use png_create_write_struct instead). * (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)); PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
#endif #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)
PNG_EXTERN void png_save_int_32 PNGARG((png_bytep buf, png_int_32 i));
#endif
/* 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.
*/
PNG_EXTERN void png_save_uint_16 PNGARG((png_bytep buf, unsigned int i));
/* simple function to write the signature */ /* simple function to write the signature */
PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)); PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));

View File

@ -1,9 +1,9 @@
/* pngconf.h - machine configurable file for libpng /* pngconf.h - machine configurable file for libpng
* *
* 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 * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2005 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.)
*/ */
@ -453,18 +453,22 @@
*/ */
/* The size of the png_text structure changed in libpng-1.0.6 when /* The size of the png_text structure changed in libpng-1.0.6 when
* iTXt is supported. It is turned off by default, to support old apps * iTXt support was added. iTXt support was turned off by default through
* that malloc the png_text structure instead of calling png_set_text() * libpng-1.2.x, to support old apps that malloc the png_text structure
* and letting libpng malloc it. It will be turned on by default in * instead of calling png_set_text() and letting libpng malloc it. It
* libpng-1.3.0. * was turned on by default in libpng-1.3.0.
*/ */
#ifndef PNG_iTXt_SUPPORTED #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
# define PNG_NO_iTXt_SUPPORTED
#endif
#if !defined(PNG_NO_iTXt_SUPPORTED)
# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt) # if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
# define PNG_NO_READ_iTXt # define PNG_READ_iTXt
# endif # endif
# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt) # if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
# define PNG_NO_WRITE_iTXt # define PNG_WRITE_iTXt
# endif # endif
#endif #endif
@ -585,11 +589,13 @@
# endif # endif
#endif #endif
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
/* Deprecated, will be removed from version 2.0.0. /* Deprecated, will be removed from version 2.0.0.
Use PNG_MNG_FEATURES_SUPPORTED instead. */ Use PNG_MNG_FEATURES_SUPPORTED instead. */
#ifndef PNG_NO_READ_EMPTY_PLTE #ifndef PNG_NO_READ_EMPTY_PLTE
# define PNG_READ_EMPTY_PLTE_SUPPORTED # define PNG_READ_EMPTY_PLTE_SUPPORTED
#endif #endif
#endif
#endif /* PNG_READ_SUPPORTED */ #endif /* PNG_READ_SUPPORTED */
@ -633,11 +639,15 @@
# endif # endif
#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
!defined(PNG_WRITE_INTERLACING_SUPPORTED)
#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant #define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
encoders, but can cause trouble encoders, but can cause trouble
if left undefined */ if left undefined */
#endif
#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
!defined(PNG_WRITE_WEIGHTED_FILTER) && \
defined(PNG_FLOATING_POINT_SUPPORTED) defined(PNG_FLOATING_POINT_SUPPORTED)
# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
#endif #endif
@ -646,10 +656,12 @@
# define PNG_WRITE_FLUSH_SUPPORTED # define PNG_WRITE_FLUSH_SUPPORTED
#endif #endif
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */ /* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
#ifndef PNG_NO_WRITE_EMPTY_PLTE #ifndef PNG_NO_WRITE_EMPTY_PLTE
# define PNG_WRITE_EMPTY_PLTE_SUPPORTED # define PNG_WRITE_EMPTY_PLTE_SUPPORTED
#endif #endif
#endif
#endif /* PNG_WRITE_SUPPORTED */ #endif /* PNG_WRITE_SUPPORTED */

View File

@ -1,9 +1,9 @@
/* pngerror.c - stub functions for i/o and memory allocation /* pngerror.c - stub functions for i/o and memory allocation
* *
* 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 * 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.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.)
* *
@ -16,6 +16,7 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
static void /* PRIVATE */ static void /* PRIVATE */
png_default_error PNGARG((png_structp png_ptr, png_default_error PNGARG((png_structp png_ptr,
png_const_charp error_message)); png_const_charp error_message));
@ -293,3 +294,4 @@ png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
} }
} }
#endif #endif
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View File

@ -6,9 +6,9 @@
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm * and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
* for Intel's performance analysis of the MMX vs. non-MMX code. * for Intel's performance analysis of the MMX vs. non-MMX code.
* *
* 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 * 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
* Copyright (c) 1998, Intel Corporation * Copyright (c) 1998, Intel Corporation
* *
* Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998. * Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998.

View File

@ -1,9 +1,9 @@
/* pngget.c - retrieval of values from info struct /* pngget.c - retrieval of values from info struct
* *
* libpng 1.2.8 - December 3, 2004 * libpng 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/ */
@ -11,6 +11,8 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
png_uint_32 PNGAPI png_uint_32 PNGAPI
png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag) png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
{ {
@ -932,3 +934,4 @@ png_get_user_height_max (png_structp png_ptr)
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
#endif /* ?PNG_1_0_X */ #endif /* ?PNG_1_0_X */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View File

@ -1,9 +1,9 @@
/* pngmem.c - stub functions for memory allocation /* pngmem.c - stub functions for memory allocation
* *
* 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 * 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.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.)
* *
@ -17,6 +17,8 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Borland DOS special memory handler */ /* Borland DOS special memory handler */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
/* if you change this, be sure to change the one in png.h also */ /* if you change this, be sure to change the one in png.h also */
@ -593,3 +595,4 @@ png_get_mem_ptr(png_structp png_ptr)
return ((png_voidp)png_ptr->mem_ptr); return ((png_voidp)png_ptr->mem_ptr);
} }
#endif /* PNG_USER_MEM_SUPPORTED */ #endif /* PNG_USER_MEM_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View File

@ -1,9 +1,9 @@
/* pngpread.c - read a png file in push mode /* pngpread.c - read a png file in push mode
* *
* 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 * 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.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,9 +1,9 @@
/* pngread.c - read a PNG file /* pngread.c - read a PNG file
* *
* libpng 1.2.8 - December 3, 2004 * libpng 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@ -14,6 +14,8 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED)
/* Create a PNG structure for reading, and allocate any memory needed. */ /* Create a PNG structure for reading, and allocate any memory needed. */
png_structp PNGAPI png_structp PNGAPI
png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr, png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
@ -169,10 +171,10 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
return (png_ptr); return (png_ptr);
} }
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
/* Initialize PNG structure for reading, and allocate any memory needed. /* Initialize PNG structure for reading, and allocate any memory needed.
This interface is deprecated in favour of the png_create_read_struct(), This interface is deprecated in favour of the png_create_read_struct(),
and it will eventually disappear. */ and it will disappear as of libpng-1.3.0. */
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
#undef png_read_init #undef png_read_init
void PNGAPI void PNGAPI
png_read_init(png_structp png_ptr) png_read_init(png_structp png_ptr)
@ -180,7 +182,6 @@ png_read_init(png_structp png_ptr)
/* We only come here via pre-1.0.7-compiled applications */ /* We only come here via pre-1.0.7-compiled applications */
png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0); png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
} }
#endif
void PNGAPI void PNGAPI
png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver, png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
@ -224,6 +225,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
} }
png_read_init_3(&png_ptr, user_png_ver, png_struct_size); png_read_init_3(&png_ptr, user_png_ver, png_struct_size);
} }
#endif /* PNG_1_0_X || PNG_1_2_X */
void PNGAPI void PNGAPI
png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver, png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
@ -806,7 +808,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
* not called png_set_interlace_handling(), the display_row buffer will * not called png_set_interlace_handling(), the display_row buffer will
* be ignored, so pass NULL to it. * be ignored, so pass NULL to it.
* *
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.8 * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.9beta1
*/ */
void PNGAPI void PNGAPI
@ -856,7 +858,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
* only call this function once. If you desire to have an image for * only call this function once. If you desire to have an image for
* each pass of a interlaced image, use png_read_rows() instead. * each pass of a interlaced image, use png_read_rows() instead.
* *
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.8 * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.9beta1
*/ */
void PNGAPI void PNGAPI
png_read_image(png_structp png_ptr, png_bytepp image) png_read_image(png_structp png_ptr, png_bytepp image)
@ -1452,5 +1454,6 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* quiet compiler warnings */ return; /* quiet compiler warnings */ return;
} }
#endif #endif /* PNG_INFO_IMAGE_SUPPORTED */
#endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ #endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */
#endif /* PNG_READ_SUPPORTED */

View File

@ -1,9 +1,9 @@
/* pngrio.c - functions for data input /* pngrio.c - functions for data input
* *
* libpng 1.2.8 - December 3, 2004 * libpng 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
* *
@ -18,6 +18,8 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED)
/* Read the data from whatever input you are using. The default routine /* Read the data from whatever input you are using. The default routine
reads from a file pointer. Note that this routine sometimes gets called reads from a file pointer. Note that this routine sometimes gets called
with very small lengths, so you should implement some kind of simple with very small lengths, so you should implement some kind of simple
@ -159,3 +161,4 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
png_ptr->output_flush_fn = NULL; png_ptr->output_flush_fn = NULL;
#endif #endif
} }
#endif /* PNG_READ_SUPPORTED */

View File

@ -1,9 +1,9 @@
/* pngrtran.c - transforms the data in a row for PNG readers /* pngrtran.c - transforms the data in a row for PNG readers
* *
* 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 * 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.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.)
* *
@ -16,6 +16,8 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED)
/* Set the action on getting a CRC error for an ancillary or critical chunk. */ /* Set the action on getting a CRC error for an ancillary or critical chunk. */
void PNGAPI void PNGAPI
png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
@ -780,7 +782,8 @@ png_init_read_transformations(png_structp png_ptr)
png_ptr->transformations &= (~PNG_GAMMA); png_ptr->transformations &= (~PNG_GAMMA);
} }
if (png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) if ((png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) &&
png_ptr->gamma != 0.0)
{ {
png_build_gamma_table(png_ptr); png_build_gamma_table(png_ptr);
#if defined(PNG_READ_BACKGROUND_SUPPORTED) #if defined(PNG_READ_BACKGROUND_SUPPORTED)
@ -3906,210 +3909,208 @@ void /* PRIVATE */
png_build_gamma_table(png_structp png_ptr) png_build_gamma_table(png_structp png_ptr)
{ {
png_debug(1, "in png_build_gamma_table\n"); png_debug(1, "in png_build_gamma_table\n");
if(png_ptr->gamma != 0.0)
if (png_ptr->bit_depth <= 8)
{ {
if (png_ptr->bit_depth <= 8) int i;
{ double g;
int i;
double g;
if (png_ptr->screen_gamma > .000001) if (png_ptr->screen_gamma > .000001)
g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
else else
g = 1.0; g = 1.0;
png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr, png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr,
(png_uint_32)256); (png_uint_32)256);
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
{ {
png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0, png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0,
g) * 255.0 + .5); g) * 255.0 + .5);
} }
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ #if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY)) if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY))
{ {
g = 1.0 / (png_ptr->gamma); g = 1.0 / (png_ptr->gamma);
png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr, png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr,
(png_uint_32)256); (png_uint_32)256);
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
{ {
png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0, png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0,
g) * 255.0 + .5); g) * 255.0 + .5);
} }
png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr, png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr,
(png_uint_32)256); (png_uint_32)256);
if(png_ptr->screen_gamma > 0.000001) if(png_ptr->screen_gamma > 0.000001)
g = 1.0 / png_ptr->screen_gamma; g = 1.0 / png_ptr->screen_gamma;
else else
g = png_ptr->gamma; /* probably doing rgb_to_gray */ g = png_ptr->gamma; /* probably doing rgb_to_gray */
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
{ {
png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0, png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0,
g) * 255.0 + .5); g) * 255.0 + .5);
} }
} }
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ #endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
} }
else else
{ {
double g; double g;
int i, j, shift, num; int i, j, shift, num;
int sig_bit; int sig_bit;
png_uint_32 ig; png_uint_32 ig;
if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
{ {
sig_bit = (int)png_ptr->sig_bit.red; sig_bit = (int)png_ptr->sig_bit.red;
if ((int)png_ptr->sig_bit.green > sig_bit) if ((int)png_ptr->sig_bit.green > sig_bit)
sig_bit = png_ptr->sig_bit.green; sig_bit = png_ptr->sig_bit.green;
if ((int)png_ptr->sig_bit.blue > sig_bit) if ((int)png_ptr->sig_bit.blue > sig_bit)
sig_bit = png_ptr->sig_bit.blue; sig_bit = png_ptr->sig_bit.blue;
} }
else else
{ {
sig_bit = (int)png_ptr->sig_bit.gray; sig_bit = (int)png_ptr->sig_bit.gray;
} }
if (sig_bit > 0) if (sig_bit > 0)
shift = 16 - sig_bit; shift = 16 - sig_bit;
else else
shift = 0; shift = 0;
if (png_ptr->transformations & PNG_16_TO_8) if (png_ptr->transformations & PNG_16_TO_8)
{ {
if (shift < (16 - PNG_MAX_GAMMA_8)) if (shift < (16 - PNG_MAX_GAMMA_8))
shift = (16 - PNG_MAX_GAMMA_8); shift = (16 - PNG_MAX_GAMMA_8);
} }
if (shift > 8) if (shift > 8)
shift = 8; shift = 8;
if (shift < 0) if (shift < 0)
shift = 0; shift = 0;
png_ptr->gamma_shift = (png_byte)shift; png_ptr->gamma_shift = (png_byte)shift;
num = (1 << (8 - shift)); num = (1 << (8 - shift));
if (png_ptr->screen_gamma > .000001) if (png_ptr->screen_gamma > .000001)
g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
else else
g = 1.0; g = 1.0;
png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr, png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr,
(png_uint_32)(num * png_sizeof (png_uint_16p))); (png_uint_32)(num * png_sizeof (png_uint_16p)));
if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))
{ {
double fin, fout; double fin, fout;
png_uint_32 last, max; png_uint_32 last, max;
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
{ {
png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
(png_uint_32)(256 * png_sizeof (png_uint_16))); (png_uint_32)(256 * png_sizeof (png_uint_16)));
} }
g = 1.0 / g; g = 1.0 / g;
last = 0; last = 0;
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
{ {
fout = ((double)i + 0.5) / 256.0; fout = ((double)i + 0.5) / 256.0;
fin = pow(fout, g); fin = pow(fout, g);
max = (png_uint_32)(fin * (double)((png_uint_32)num << 8)); max = (png_uint_32)(fin * (double)((png_uint_32)num << 8));
while (last <= max) while (last <= max)
{ {
png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
[(int)(last >> (8 - shift))] = (png_uint_16)( [(int)(last >> (8 - shift))] = (png_uint_16)(
(png_uint_16)i | ((png_uint_16)i << 8)); (png_uint_16)i | ((png_uint_16)i << 8));
last++; last++;
} }
} }
while (last < ((png_uint_32)num << 8)) while (last < ((png_uint_32)num << 8))
{ {
png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
[(int)(last >> (8 - shift))] = (png_uint_16)65535L; [(int)(last >> (8 - shift))] = (png_uint_16)65535L;
last++; last++;
} }
} }
else else
{ {
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
{ {
png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
(png_uint_32)(256 * png_sizeof (png_uint_16))); (png_uint_32)(256 * png_sizeof (png_uint_16)));
ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4); ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4);
for (j = 0; j < 256; j++) for (j = 0; j < 256; j++)
{ {
png_ptr->gamma_16_table[i][j] = png_ptr->gamma_16_table[i][j] =
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
65535.0, g) * 65535.0 + .5); 65535.0, g) * 65535.0 + .5);
} }
} }
} }
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ #if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY)) if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))
{ {
g = 1.0 / (png_ptr->gamma); g = 1.0 / (png_ptr->gamma);
png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr, png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr,
(png_uint_32)(num * png_sizeof (png_uint_16p ))); (png_uint_32)(num * png_sizeof (png_uint_16p )));
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
{ {
png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr, png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr,
(png_uint_32)(256 * png_sizeof (png_uint_16))); (png_uint_32)(256 * png_sizeof (png_uint_16)));
ig = (((png_uint_32)i * ig = (((png_uint_32)i *
(png_uint_32)png_gamma_shift[shift]) >> 4); (png_uint_32)png_gamma_shift[shift]) >> 4);
for (j = 0; j < 256; j++) for (j = 0; j < 256; j++)
{ {
png_ptr->gamma_16_to_1[i][j] = png_ptr->gamma_16_to_1[i][j] =
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
65535.0, g) * 65535.0 + .5); 65535.0, g) * 65535.0 + .5);
} }
} }
if(png_ptr->screen_gamma > 0.000001) if(png_ptr->screen_gamma > 0.000001)
g = 1.0 / png_ptr->screen_gamma; g = 1.0 / png_ptr->screen_gamma;
else else
g = png_ptr->gamma; /* probably doing rgb_to_gray */ g = png_ptr->gamma; /* probably doing rgb_to_gray */
png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr, png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr,
(png_uint_32)(num * png_sizeof (png_uint_16p))); (png_uint_32)(num * png_sizeof (png_uint_16p)));
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
{ {
png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr, png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr,
(png_uint_32)(256 * png_sizeof (png_uint_16))); (png_uint_32)(256 * png_sizeof (png_uint_16)));
ig = (((png_uint_32)i * ig = (((png_uint_32)i *
(png_uint_32)png_gamma_shift[shift]) >> 4); (png_uint_32)png_gamma_shift[shift]) >> 4);
for (j = 0; j < 256; j++) for (j = 0; j < 256; j++)
{ {
png_ptr->gamma_16_from_1[i][j] = png_ptr->gamma_16_from_1[i][j] =
(png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
65535.0, g) * 65535.0 + .5); 65535.0, g) * 65535.0 + .5);
} }
} }
} }
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ #endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
} }
}
} }
#endif #endif
/* To do: install integer version of png_build_gamma_table here */ /* To do: install integer version of png_build_gamma_table here */
@ -4175,3 +4176,4 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
} }
} }
#endif /* PNG_MNG_FEATURES_SUPPORTED */ #endif /* PNG_MNG_FEATURES_SUPPORTED */
#endif /* PNG_READ_SUPPORTED */

View File

@ -1,8 +1,8 @@
/* pngrutil.c - utilities to read a PNG file /* pngrutil.c - utilities to read a PNG file
* *
* 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 * 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.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.)
* *
@ -13,6 +13,8 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED)
#if defined(_WIN32_WCE) #if defined(_WIN32_WCE)
/* strtod() function is not supported on WindowsCE */ /* strtod() function is not supported on WindowsCE */
# ifdef PNG_FLOATING_POINT_SUPPORTED # ifdef PNG_FLOATING_POINT_SUPPORTED
@ -37,7 +39,7 @@ __inline double strtod(const char *nptr, char **endptr)
# endif # endif
#endif #endif
png_uint_32 /* PRIVATE */ png_uint_32 PNGAPI
png_get_uint_31(png_structp png_ptr, png_bytep buf) png_get_uint_31(png_structp png_ptr, png_bytep buf)
{ {
png_uint_32 i = png_get_uint_32(buf); png_uint_32 i = png_get_uint_32(buf);
@ -47,7 +49,7 @@ png_get_uint_31(png_structp png_ptr, png_bytep buf)
} }
#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED #ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ /* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
png_uint_32 /* PRIVATE */ png_uint_32 PNGAPI
png_get_uint_32(png_bytep buf) png_get_uint_32(png_bytep buf)
{ {
png_uint_32 i = ((png_uint_32)(*buf) << 24) + png_uint_32 i = ((png_uint_32)(*buf) << 24) +
@ -62,7 +64,7 @@ png_get_uint_32(png_bytep buf)
/* Grab a signed 32-bit integer from a buffer in big-endian format. The /* Grab a signed 32-bit integer from a buffer in big-endian format. The
* data is stored in the PNG file in two's complement format, and it is * data is stored in the PNG file in two's complement format, and it is
* assumed that the machine format for signed integers is the same. */ * assumed that the machine format for signed integers is the same. */
png_int_32 /* PRIVATE */ png_int_32 PNGAPI
png_get_int_32(png_bytep buf) png_get_int_32(png_bytep buf)
{ {
png_int_32 i = ((png_int_32)(*buf) << 24) + png_int_32 i = ((png_int_32)(*buf) << 24) +
@ -75,7 +77,7 @@ png_get_int_32(png_bytep buf)
#endif /* PNG_READ_pCAL_SUPPORTED */ #endif /* PNG_READ_pCAL_SUPPORTED */
/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ /* Grab an unsigned 16-bit integer from a buffer in big-endian format. */
png_uint_16 /* PRIVATE */ png_uint_16 PNGAPI
png_get_uint_16(png_bytep buf) png_get_uint_16(png_bytep buf)
{ {
png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) + png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) +
@ -1160,7 +1162,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return; return;
} }
new_palette.nentries = (png_uint_32) (data_length / entry_size); new_palette.nentries = (png_int_32) ( data_length / entry_size);
if ((png_uint_32) new_palette.nentries > (png_uint_32) (PNG_SIZE_MAX / if ((png_uint_32) new_palette.nentries > (png_uint_32) (PNG_SIZE_MAX /
png_sizeof(png_sPLT_entry))) png_sizeof(png_sPLT_entry)))
{ {
@ -2170,7 +2172,8 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
} }
#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) #if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) if ((png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) ||
(png_ptr->read_user_chunk_fn != NULL))
{ {
png_unknown_chunk chunk; png_unknown_chunk chunk;
@ -3122,3 +3125,4 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_ptr->flags |= PNG_FLAG_ROW_INIT; png_ptr->flags |= PNG_FLAG_ROW_INIT;
} }
#endif /* PNG_READ_SUPPORTED */

View File

@ -1,9 +1,9 @@
/* pngset.c - storage of image information into info struct /* pngset.c - storage of image information into info struct
* *
* libpng 1.2.8 - December 3, 2004 * libpng 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 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.)
* *
@ -16,6 +16,8 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#if defined(PNG_bKGD_SUPPORTED) #if defined(PNG_bKGD_SUPPORTED)
void PNGAPI 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)
@ -100,6 +102,7 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
"Ignoring attempt to set negative chromaticity value"); "Ignoring attempt to set negative chromaticity value");
return; return;
} }
#ifdef PNG_FLOATING_POINT_SUPPORTED
if (white_x > (double) PNG_UINT_31_MAX || if (white_x > (double) PNG_UINT_31_MAX ||
white_y > (double) PNG_UINT_31_MAX || white_y > (double) PNG_UINT_31_MAX ||
red_x > (double) PNG_UINT_31_MAX || red_x > (double) PNG_UINT_31_MAX ||
@ -108,6 +111,16 @@ png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
green_y > (double) PNG_UINT_31_MAX || green_y > (double) PNG_UINT_31_MAX ||
blue_x > (double) PNG_UINT_31_MAX || blue_x > (double) PNG_UINT_31_MAX ||
blue_y > (double) PNG_UINT_31_MAX) blue_y > (double) PNG_UINT_31_MAX)
#else
if (white_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
white_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
red_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
red_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
green_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
green_y > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
blue_x > (png_fixed_point) PNG_UINT_31_MAX/100000L ||
blue_y > (png_fixed_point) PNG_UINT_31_MAX/100000L)
#endif
{ {
png_warning(png_ptr, png_warning(png_ptr,
"Ignoring attempt to set chromaticity value exceeding 21474.83"); "Ignoring attempt to set chromaticity value exceeding 21474.83");
@ -209,19 +222,21 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
png_debug1(1, "in %s storage function\n", "hIST"); png_debug1(1, "in %s storage function\n", "hIST");
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
if (info_ptr->num_palette == 0) if (info_ptr->num_palette <= 0 || info_ptr->num_palette
> PNG_MAX_PALETTE_LENGTH)
{ {
png_warning(png_ptr, png_warning(png_ptr,
"Palette size 0, hIST allocation skipped."); "Invalid palette size, hIST allocation skipped.");
return; return;
} }
#ifdef PNG_FREE_ME_SUPPORTED #ifdef PNG_FREE_ME_SUPPORTED
png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
#endif #endif
/* Changed from info->num_palette to 256 in version 1.2.1 */ /* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in version
1.2.1 */
png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr, png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,
(png_uint_32)(256 * png_sizeof (png_uint_16))); (png_uint_32)(PNG_MAX_PALETTE_LENGTH * png_sizeof (png_uint_16)));
if (png_ptr->hist == NULL) if (png_ptr->hist == NULL)
{ {
png_warning(png_ptr, "Insufficient memory for hIST chunk data."); png_warning(png_ptr, "Insufficient memory for hIST chunk data.");
@ -517,6 +532,17 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
if (png_ptr == NULL || info_ptr == NULL) if (png_ptr == NULL || info_ptr == NULL)
return; return;
if (num_palette < 0 || num_palette > PNG_MAX_PALETTE_LENGTH)
{
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
png_error(png_ptr, "Invalid palette length");
else
{
png_warning(png_ptr, "Invalid palette length");
return;
}
}
/* /*
* It may not actually be necessary to set png_ptr->palette here; * It may not actually be necessary to set png_ptr->palette here;
* we do it for backward compatibility with the way the png_handle_tRNS * we do it for backward compatibility with the way the png_handle_tRNS
@ -526,11 +552,13 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0); png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);
#endif #endif
/* Changed in libpng-1.2.1 to allocate 256 instead of num_palette entries, /* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead
of num_palette entries,
in case of an invalid PNG file that has too-large sample values. */ in case of an invalid PNG file that has too-large sample values. */
png_ptr->palette = (png_colorp)png_malloc(png_ptr, png_ptr->palette = (png_colorp)png_malloc(png_ptr,
256 * png_sizeof(png_color)); PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));
png_memset(png_ptr->palette, 0, 256 * png_sizeof(png_color)); png_memset(png_ptr->palette, 0, PNG_MAX_PALETTE_LENGTH *
png_sizeof(png_color));
png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof (png_color)); png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof (png_color));
info_ptr->palette = png_ptr->palette; info_ptr->palette = png_ptr->palette;
info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;
@ -890,10 +918,11 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_FREE_ME_SUPPORTED #ifdef PNG_FREE_ME_SUPPORTED
png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
#endif #endif
/* Changed from num_trans to 256 in version 1.2.1 */ /* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */
png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr, png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr,
(png_uint_32)256); (png_uint_32)PNG_MAX_PALETTE_LENGTH);
png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans); if (num_trans <= PNG_MAX_PALETTE_LENGTH)
png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans);
#ifdef PNG_FREE_ME_SUPPORTED #ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_TRNS; info_ptr->free_me |= PNG_FREE_TRNS;
#else #else
@ -1217,3 +1246,4 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
#endif /* ?PNG_1_0_X */ #endif /* ?PNG_1_0_X */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View File

@ -1,9 +1,9 @@
/* pngtest.c - a simple test program to test libpng /* pngtest.c - a simple test program to test libpng
* *
* libpng 1.2.8 - December 3, 2004 * libpng 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 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.)
* *
@ -1551,4 +1551,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_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;

View File

@ -1,9 +1,9 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers) /* pngtrans.c - transforms the data in a row (used by both readers and writers)
* *
* libpng 1.2.8 - December 3, 2004 * libpng 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/ */
@ -11,6 +11,7 @@
#define PNG_INTERNAL #define PNG_INTERNAL
#include "png.h" #include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* turn on BGR-to-RGB mapping */ /* turn on BGR-to-RGB mapping */
void PNGAPI void PNGAPI
@ -648,3 +649,4 @@ png_get_user_transform_ptr(png_structp png_ptr)
return (NULL); return (NULL);
#endif #endif
} }
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View File

@ -2,9 +2,9 @@
* *
* For Intel x86 CPU and Microsoft Visual C++ compiler * For Intel x86 CPU and Microsoft Visual C++ compiler
* *
* 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 * 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
* Copyright (c) 1998, Intel Corporation * Copyright (c) 1998, Intel Corporation
* *
* Contributed by Nirav Chhatrapati, Intel Corporation, 1998 * Contributed by Nirav Chhatrapati, Intel Corporation, 1998

View File

@ -1,9 +1,9 @@
/* pngwio.c - functions for data output /* pngwio.c - functions for data output
* *
* libpng 1.2.8 - December 3, 2004 * libpng 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 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,9 +1,9 @@
/* pngwrite.c - general routines to write a PNG file /* pngwrite.c - general routines to write a PNG file
* *
* libpng 1.2.8 - December 3, 2004 * libpng 1.2.9beta1 - February 21, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 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.)
*/ */
@ -554,6 +554,8 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
} }
/* Initialize png_ptr structure, and allocate any memory needed */ /* Initialize png_ptr structure, and allocate any memory needed */
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
/* Deprecated. */
#undef png_write_init #undef png_write_init
void PNGAPI void PNGAPI
png_write_init(png_structp png_ptr) png_write_init(png_structp png_ptr)
@ -604,6 +606,7 @@ png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
} }
png_write_init_3(&png_ptr, user_png_ver, png_struct_size); png_write_init_3(&png_ptr, user_png_ver, png_struct_size);
} }
#endif /* PNG_1_0_X || PNG_1_2_X */
void PNGAPI void PNGAPI

View File

@ -1,9 +1,9 @@
/* pngwtran.c - transforms the data in a row for PNG writers /* pngwtran.c - transforms the data in a row for PNG writers
* *
* 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 * 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.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.)
*/ */
@ -60,14 +60,14 @@ png_do_write_transformations(png_structp png_ptr)
png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1, png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
&(png_ptr->shift)); &(png_ptr->shift));
#endif #endif
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
if (png_ptr->transformations & PNG_INVERT_ALPHA)
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) #if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
if (png_ptr->transformations & PNG_SWAP_ALPHA) if (png_ptr->transformations & PNG_SWAP_ALPHA)
png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif #endif
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
if (png_ptr->transformations & PNG_INVERT_ALPHA)
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_BGR_SUPPORTED) #if defined(PNG_WRITE_BGR_SUPPORTED)
if (png_ptr->transformations & PNG_BGR) if (png_ptr->transformations & PNG_BGR)
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
@ -439,9 +439,12 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
png_uint_32 row_width = row_info->width; png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++) for (i = 0, sp = dp = row; i < row_width; i++)
{ {
/* does nothing
*(dp++) = *(sp++); *(dp++) = *(sp++);
*(dp++) = *(sp++); *(dp++) = *(sp++);
*(dp++) = *(sp++); *(dp++) = *(sp++);
*/
sp+=3; dp = sp;
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
} }
} }
@ -454,12 +457,15 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
for (i = 0, sp = dp = row; i < row_width; i++) for (i = 0, sp = dp = row; i < row_width; i++)
{ {
/* does nothing
*(dp++) = *(sp++); *(dp++) = *(sp++);
*(dp++) = *(sp++); *(dp++) = *(sp++);
*(dp++) = *(sp++); *(dp++) = *(sp++);
*(dp++) = *(sp++); *(dp++) = *(sp++);
*(dp++) = *(sp++); *(dp++) = *(sp++);
*(dp++) = *(sp++); *(dp++) = *(sp++);
*/
sp+=6; dp = sp;
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
} }
@ -489,8 +495,11 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
for (i = 0, sp = dp = row; i < row_width; i++) for (i = 0, sp = dp = row; i < row_width; i++)
{ {
/* does nothing
*(dp++) = *(sp++); *(dp++) = *(sp++);
*(dp++) = *(sp++); *(dp++) = *(sp++);
*/
sp+=2; dp = sp;
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
*(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++));
} }

View File

@ -1,9 +1,9 @@
/* pngwutil.c - utilities to write a PNG file /* pngwutil.c - utilities to write a PNG file
* *
* 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 * 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.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.)
*/ */
@ -16,7 +16,7 @@
* with unsigned numbers for convenience, although one supported * with unsigned numbers for convenience, although one supported
* ancillary chunk uses signed (two's complement) numbers. * ancillary chunk uses signed (two's complement) numbers.
*/ */
void /* PRIVATE */ void PNGAPI
png_save_uint_32(png_bytep buf, png_uint_32 i) png_save_uint_32(png_bytep buf, png_uint_32 i)
{ {
buf[0] = (png_byte)((i >> 24) & 0xff); buf[0] = (png_byte)((i >> 24) & 0xff);
@ -30,7 +30,7 @@ png_save_uint_32(png_bytep buf, png_uint_32 i)
* complement format. If this isn't the case, then this routine needs to * complement format. If this isn't the case, then this routine needs to
* be modified to write data in two's complement format. * be modified to write data in two's complement format.
*/ */
void /* PRIVATE */ void PNGAPI
png_save_int_32(png_bytep buf, png_int_32 i) png_save_int_32(png_bytep buf, png_int_32 i)
{ {
buf[0] = (png_byte)((i >> 24) & 0xff); buf[0] = (png_byte)((i >> 24) & 0xff);
@ -44,7 +44,7 @@ png_save_int_32(png_bytep buf, png_int_32 i)
* The parameter is declared unsigned int, not png_uint_16, * The parameter is declared unsigned int, not png_uint_16,
* just to avoid potential problems on pre-ANSI C compilers. * just to avoid potential problems on pre-ANSI C compilers.
*/ */
void /* PRIVATE */ void PNGAPI
png_save_uint_16(png_bytep buf, unsigned int i) png_save_uint_16(png_bytep buf, unsigned int i)
{ {
buf[0] = (png_byte)((i >> 8) & 0xff); buf[0] = (png_byte)((i >> 8) & 0xff);
@ -161,9 +161,11 @@ png_text_compress(png_structp png_ptr,
{ {
int ret; int ret;
comp->num_output_ptr = comp->max_output_ptr = 0; comp->num_output_ptr = 0;
comp->max_output_ptr = 0;
comp->output_ptr = NULL; comp->output_ptr = NULL;
comp->input = NULL; comp->input = NULL;
comp->input_len = 0;
/* we may just want to pass the text right through */ /* we may just want to pass the text right through */
if (compression == PNG_TEXT_COMPRESSION_NONE) if (compression == PNG_TEXT_COMPRESSION_NONE)
@ -730,6 +732,13 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
compression_state comp; compression_state comp;
png_debug(1, "in png_write_iCCP\n"); png_debug(1, "in png_write_iCCP\n");
comp.num_output_ptr = 0;
comp.max_output_ptr = 0;
comp.output_ptr = NULL;
comp.input = NULL;
comp.input_len = 0;
if (name == NULL || (name_len = png_check_keyword(png_ptr, name, if (name == NULL || (name_len = png_check_keyword(png_ptr, name,
&new_name)) == 0) &new_name)) == 0)
{ {
@ -1344,6 +1353,12 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
png_debug(1, "in png_write_zTXt\n"); png_debug(1, "in png_write_zTXt\n");
comp.num_output_ptr = 0;
comp.max_output_ptr = 0;
comp.output_ptr = NULL;
comp.input = NULL;
comp.input_len = 0;
if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
{ {
png_warning(png_ptr, "Empty keyword in zTXt chunk"); png_warning(png_ptr, "Empty keyword in zTXt chunk");
@ -1397,6 +1412,11 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
png_debug(1, "in png_write_iTXt\n"); png_debug(1, "in png_write_iTXt\n");
comp.num_output_ptr = 0;
comp.max_output_ptr = 0;
comp.output_ptr = NULL;
comp.input = NULL;
if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0)
{ {
png_warning(png_ptr, "Empty keyword in iTXt chunk"); png_warning(png_ptr, "Empty keyword in iTXt chunk");
@ -1559,7 +1579,7 @@ png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
#endif #endif
png_size_t total_len; png_size_t total_len;
char wbuf[32], hbuf[32]; char wbuf[32], hbuf[32];
png_byte bunit = unit; png_byte bunit = (png_byte)unit;
png_debug(1, "in png_write_sCAL\n"); png_debug(1, "in png_write_sCAL\n");

View File

@ -8,7 +8,7 @@
# Modeled after libxml-config. # Modeled after libxml-config.
version=1.2.8 version=1.2.9beta1
prefix="" prefix=""
libdir="" libdir=""
libs="" libs=""

View File

@ -6,6 +6,6 @@ includedir=${exec_prefix}/include
Name: libpng12 Name: libpng12
Description: Loads and saves PNG files Description: Loads and saves PNG files
Version: 1.2.8 Version: 1.2.9beta1
Libs: -L${libdir} -lpng12 -lz -lm Libs: -L${libdir} -lpng12 -lz -lm
Cflags: -I${includedir}/libpng12 Cflags: -I${includedir}/libpng12

View File

@ -33,7 +33,7 @@ RANLIB=echo
LIBNAME=libpng12 LIBNAME=libpng12
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include INCPATH=$(prefix)/include
@ -111,9 +111,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJS) libpng.so.0.$(PNGMIN): $(OBJS)
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.0 \
-o libpng.so.3.$(PNGMIN) $(OBJSDLL) -o libpng.so.0.$(PNGMIN) $(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
@ -138,20 +138,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -f -s $(LIBNAME).a libpng.a) (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGVER)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGVER)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -f -s libpng.so.3 libpng.so; \ ln -f -s libpng.so.0 libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -207,7 +207,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -33,7 +33,7 @@ RANLIB=echo
LIBNAME=libpng12 LIBNAME=libpng12
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include INCPATH=$(prefix)/include
@ -111,9 +111,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJSDLL) libpng.so.0.$(PNGMIN): $(OBJSDLL)
$(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \ $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.0 \
-o libpng.so.3.$(PNGMIN) $(OBJSDLL) -o libpng.so.0.$(PNGMIN) $(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
@ -138,21 +138,21 @@ install-static: install-headers libpng.a
(cd $(DL); ln -f -s $(LIBNAME).a libpng.a) (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ).$(PNGVER)* -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ).$(PNGVER)*
-@/bin/rm -f $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGVER)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGVER)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -f -s libpng.so.3 libpng.so; \ ln -f -s libpng.so.0 libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -208,7 +208,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -18,7 +18,7 @@ RM = rm -f
LIBNAME=libpng12 LIBNAME=libpng12
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local prefix=/usr/local

View File

@ -17,14 +17,14 @@ CC=bcc32
LD=bcc32 LD=bcc32
LIB=tlib LIB=tlib
#TARGET_CPU=6 # -3 = 386, -4 = 486, -5 = Pentium etc.
# 3 = 386, 4 = 486, 5 = Pentium etc.
!ifndef TARGET_CPU !ifndef TARGET_CPU
TARGET_CPU=5 #TARGET_CPU=-6
!endif !endif
# Use this if you don't want Borland's fancy exception handling # Use this if you don't want Borland's fancy exception handling
NOEHLIB=noeh32.lib # (Caution: doesn't work with CBuilderX)
#NOEHLIB=noeh32.lib
!ifdef DEBUG !ifdef DEBUG
CDEBUG=-v CDEBUG=-v
@ -40,14 +40,14 @@ CDEBUG=$(CDEBUG) -N
LDEBUG=$(LDEBUG) -N LDEBUG=$(LDEBUG) -N
!endif !endif
# -X- turn on dependency generation in the object file
# -w set all warnings on
# -O2 optimize for speed # -O2 optimize for speed
# -Z global optimization # -d merge duplicate strings
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(CDEBUG) # -k- turn off standard stack frame
# -w display all warnings
CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
# -M generate map file # -M generate map file
LDFLAGS=-M -L$(ZLIB_DIR) $(LDEBUG) LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
## Variables ## Variables
@ -138,14 +138,15 @@ $(LIBOBJS), libpng
| |
# Clean up anything else you want # Cleanup
clean: clean:
-del *.obj -del *.obj
-del *.exe -del $(LIBNAME)
-del *.lib -del pngtest.exe
-del *.lst -del *.lst
-del *.map -del *.map
-del *.tds -del *.tds
-del pngout.png
# End of makefile for libpng # End of makefile for libpng

View File

@ -12,7 +12,7 @@ ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include ZLIBINC=/usr/local/include
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
ALIGN= ALIGN=
@ -93,9 +93,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(CC) -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o \ $(CC) -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o \
$(LIBNAME).so.$(PNGVER) $(OBJSDLL) $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJSDLL) libpng.so.0.$(PNGMIN): $(OBJSDLL)
$(CC) -nostart -Wl,-soname,libpng.so.3 -o \ $(CC) -nostart -Wl,-soname,libpng.so.0 -o \
libpng.so.3.$(PNGMIN) $(OBJSDLL) libpng.so.0.$(PNGMIN) $(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so pngtest: pngtest.o $(LIBNAME).so
$(CC) -L$(ZLIBLIB) -lz -lpng12 -o pngtest pngtest.o $(CC) -L$(ZLIBLIB) -lz -lpng12 -o pngtest pngtest.o
@ -120,20 +120,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -sf $(LIBNAME).a libpng.a) (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -sf libpng.so.3 libpng.so; \ ln -sf libpng.so.0 libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -187,7 +187,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtesti \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtesti \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
# DO NOT DELETE THIS LINE -- make depend depends on it. # DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -79,7 +79,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12 LIBNAME = libpng12
PNGMAJ = 0 PNGMAJ = 0
CYGDLL = 12 CYGDLL = 12
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(CYGDLL).dll SHAREDLIB=cygpng$(CYGDLL).dll
@ -176,7 +176,7 @@ $(STATLIB): $(OBJS)
ar rc $@ $(OBJS) ar rc $@ $(OBJS)
$(RANLIB) $@ $(RANLIB) $@
$(SHAREDDEF): scripts/png32ms.def $(SHAREDDEF): scripts/pngw32.def
cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \ cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
sed -e 's/\([^;]*\);/;/' > $@ sed -e 's/\([^;]*\);/;/' > $@

View File

@ -23,7 +23,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
RANLIB=ranlib RANLIB=ranlib
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12 LIBNAME = libpng12

View File

@ -32,7 +32,7 @@ ZLIBLIB=../zlib
ZLIBINC=../zlib ZLIBINC=../zlib
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12 LIBNAME = libpng12
@ -76,9 +76,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJS)
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
-soname $(LIBNAME).so.$(PNGMAJ) -soname $(LIBNAME).so.$(PNGMAJ)
libpng.so.3.$(PNGMIN): $(OBJS) libpng.so.0.$(PNGMIN): $(OBJS)
$(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
-soname libpng.so.3 -soname libpng.so.0
pngtest: pngtest.o libpng.a pngtest: pngtest.o libpng.a
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
@ -103,20 +103,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -sf $(LIBNAME).a libpng.a) (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -f -s libpng.so.3 libpng.so; \ ln -f -s libpng.so.0 libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -172,7 +172,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
# DO NOT DELETE THIS LINE -- make depend depends on it. # DO NOT DELETE THIS LINE -- make depend depends on it.

View File

@ -1,249 +0,0 @@
# makefile for libpng.a and libpng12.so on Linux ELF with gcc
# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson
# Copyright (C) 1996, 1997 Andreas Dilger
# For conditions of distribution and use, see copyright notice in png.h
LIBNAME = libpng12
PNGMAJ = 0
PNGMIN = 1.2.8
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc
# where "make install" puts libpng12.a, libpng12.so*,
# libpng12/png.h and libpng12/pngconf.h
# Prefix must be a full pathname.
prefix=/usr/local
# Where the zlib library and include files are located.
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
ZLIBLIB=../zlib
ZLIBINC=../zlib
ALIGN=
# for i386:
#ALIGN=-malign-loops=2 -malign-functions=2
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
RANLIB=ranlib
#RANLIB=echo
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
MANPATH=$(prefix)/man
BINPATH=$(prefix)/bin
# override DESTDIR= on the make install command line to easily support
# installing into a temporary location. Example:
#
# make install DESTDIR=/tmp/build/libpng
#
# If you're going to install into a temporary location
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
# you execute make install.
DESTDIR=
DB=$(DESTDIR)$(BINPATH)
DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH)
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
.c.pic.o:
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
libpng.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@
libpng.pc:
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
libpng.syms: png.h pngconf.h
$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS png.h |\
awk -F '[\t [\]();]' 'BEGIN{print "{global:"}\
{ for (i=1;i+2<=NF;++i)\
if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
print $$(i+1) ";";\
for (i=1;i+1<=NF;++i)\
if ($$(i)=="PNG_DATA_EXPORT")\
print $$(i+1) ";";}\
END{print "local: *; };"}' >$@.new
rm -f $@
mv $@.new $@
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
echo libs=\"-lpng12 -lz -lm\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
$(LIBNAME).so.$(PNGVER): $(OBJSDLL) libpng.syms
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
-Wl,-version-script,libpng.syms \
-o $(LIBNAME).so.$(PNGVER) \
$(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJSDLL) libpng.syms
$(CC) -shared -Wl,-soname,libpng.so.3 \
-Wl,-version-script,libpng.syms \
-o libpng.so.3.$(PNGMIN) \
$(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
pngtest-static: pngtest.o libpng.a
$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
test: pngtest pngtest-static
@echo ""
@echo " Running pngtest dynamically linked with $(LIBNAME).so:"
@echo ""
./pngtest
@echo ""
@echo " Running pngtest statically linked with libpng.a:"
@echo ""
./pngtest-static
install-headers: png.h pngconf.h
-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
cp png.h pngconf.h $(DI)/$(LIBNAME)
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
-@/bin/rm -f $(DI)/libpng
(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
install-static: install-headers libpng.a
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
cp libpng.a $(DL)/$(LIBNAME).a
chmod 644 $(DL)/$(LIBNAME).a
-@/bin/rm -f $(DL)/libpng.a
(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
(cd $(DL); \
ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \
ln -sf libpng.so.3 libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
-@/bin/rm -f $(DM)/man3/libpng.3
-@/bin/rm -f $(DM)/man3/libpngpf.3
cp libpng.3 $(DM)/man3
cp libpngpf.3 $(DM)/man3
-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
-@/bin/rm -f $(DM)/man5/png.5
cp png.5 $(DM)/man5
install-config: libpng-config
-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
-@/bin/rm -f $(DB)/libpng-config
-@/bin/rm -f $(DB)/$(LIBNAME)-config
cp libpng-config $(DB)/$(LIBNAME)-config
chmod 755 $(DB)/$(LIBNAME)-config
(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
# If you installed in $(DESTDIR), test-installed won't work until you
# move the library to its final location. Use test-dd to test it
# before then.
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \
`$(BINPATH)/libpng12-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/libpng12-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) -I$(ZLIBINC) \
`$(BINPATH)/libpng12-config --cflags` pngtest.c \
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/libpng12-config --ldflags`
./pngtesti pngtest.png
clean:
/bin/rm -f *.o libpng.a libpng.syms pngtest pngout.png libpng-config \
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
libpng.so.3.$(PNGMIN) \
libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
writelock:
chmod a-w *.[ch35] $(DOCS) scripts/*
# DO NOT DELETE THIS LINE -- make depend depends on it.
png.o png.pic.o: png.h pngconf.h
pngerror.o pngerror.pic.o: png.h pngconf.h
pngrio.o pngrio.pic.o: png.h pngconf.h
pngwio.o pngwio.pic.o: png.h pngconf.h
pngmem.o pngmem.pic.o: png.h pngconf.h
pngset.o pngset.pic.o: png.h pngconf.h
pngget.o pngget.pic.o: png.h pngconf.h
pngread.o pngread.pic.o: png.h pngconf.h
pngrtran.o pngrtran.pic.o: png.h pngconf.h
pngrutil.o pngrutil.pic.o: png.h pngconf.h
pngtrans.o pngtrans.pic.o: png.h pngconf.h
pngwrite.o pngwrite.pic.o: png.h pngconf.h
pngwtran.o pngwtran.pic.o: png.h pngconf.h
pngwutil.o pngwutil.pic.o: png.h pngconf.h
pngpread.o pngpread.pic.o: png.h pngconf.h
pngtest.o: png.h pngconf.h

View File

@ -15,7 +15,7 @@
LIBNAME = libpng12 LIBNAME = libpng12
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc CC=gcc
@ -129,9 +129,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-o $(LIBNAME).so.$(PNGVER) \ -o $(LIBNAME).so.$(PNGVER) \
$(OBJSDLL) $(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJSDLL) libpng.so.0.$(PNGMIN): $(OBJSDLL)
$(CC) -shared -Wl,-soname,libpng.so.3 \ $(CC) -shared -Wl,-soname,libpng.so.0 \
-o libpng.so.3.$(PNGMIN) \ -o libpng.so.0.$(PNGMIN) \
$(OBJSDLL) $(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so pngtest: pngtest.o $(LIBNAME).so
@ -167,20 +167,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -sf $(LIBNAME).a libpng.a) (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -sf libpng.so.3 libpng.so; \ ln -sf libpng.so.0 libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -234,7 +234,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -27,7 +27,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib RANLIB=ranlib
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12 LIBNAME = libpng12

View File

@ -41,7 +41,7 @@ RANLIB=ranlib
#RANLIB=echo #RANLIB=echo
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12 LIBNAME = libpng12

View File

@ -24,7 +24,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib RANLIB=ranlib
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12 LIBNAME = libpng12

View File

@ -5,7 +5,7 @@
LIBNAME = libpng12 LIBNAME = libpng12
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc CC=gcc
@ -101,9 +101,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
-o $(LIBNAME).so.$(PNGVER) \ -o $(LIBNAME).so.$(PNGVER) \
$(OBJSDLL) $(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJSDLL) libpng.so.0.$(PNGMIN): $(OBJSDLL)
$(CC) -shared -Wl,-soname,libpng.so.3 \ $(CC) -shared -Wl,-soname,libpng.so.0 \
-o libpng.so.3.$(PNGMIN) \ -o libpng.so.0.$(PNGMIN) \
$(OBJSDLL) $(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so pngtest: pngtest.o $(LIBNAME).so
@ -139,20 +139,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -sf $(LIBNAME).a libpng.a) (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -sf libpng.so.3 libpng.so; \ ln -sf libpng.so.0 libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -206,7 +206,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
LIB= png12 LIB= png12
SHLIB_MAJOR= 0 SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.8 SHLIB_MINOR= 1.2.9beta1
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ SRCS= pnggccrd.c 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

@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng
LIB= png LIB= png
SHLIB_MAJOR= 3 SHLIB_MAJOR= 3
SHLIB_MINOR= 1.2.8 SHLIB_MINOR= 1.2.9beta1
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ SRCS= pnggccrd.c 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

@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0 SHLIB_MAJOR= 0
SHLIB_MINOR= 1.2.8 SHLIB_MINOR= 1.2.9beta1
LIB= png LIB= png
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \ SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \

View File

@ -24,7 +24,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
RANLIB=echo RANLIB=echo
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12 LIBNAME = libpng12
@ -88,8 +88,8 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(CC) -G -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \ $(CC) -G -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
$(OBJSDLL) $(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJSDLL) libpng.so.0.$(PNGMIN): $(OBJSDLL)
$(CC) -G -Wl,-h,libpng.so.3 -o libpng.so.3.$(PNGMIN) \ $(CC) -G -Wl,-h,libpng.so.0 -o libpng.so.0.$(PNGMIN) \
$(OBJSDLL) $(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so pngtest: pngtest.o $(LIBNAME).so
@ -117,20 +117,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -f -s $(LIBNAME).a libpng.a) (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -f -s libpng.so.3 libpng.so; \ ln -f -s libpng.so.0 libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -184,7 +184,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -18,7 +18,7 @@ ZLIBINC=../zlib
LIBNAME=libpng12 LIBNAME=libpng12
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
CC=gcc CC=gcc
@ -31,7 +31,7 @@ CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \
-set_version sgi$(PNGMAJ).0 -set_version sgi$(PNGMAJ).0
LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \ LDLEGACY=cc $(ABI) -shared -soname libpng.so.0 \
-set_version sgi$3.0 -set_version sgi$3.0
# See "man dso" for info about shared objects # See "man dso" for info about shared objects
@ -96,7 +96,7 @@ $(LIBNAME).so.$(PNGVER): $(OBJS)
$(LDSHARED) -o $@ $(OBJS) $(LDSHARED) -o $@ $(OBJS)
rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
libpng.so.3.$(PNGMIN): $(OBJS) libpng.so.0.$(PNGMIN): $(OBJS)
$(LDLEGACY) -o $@ $(OBJS) $(LDLEGACY) -o $@ $(OBJS)
pngtest: pngtest.o libpng.a pngtest: pngtest.o libpng.a
@ -124,20 +124,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -sf $(LIBNAME).a libpng.a) (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -sf libpng.so.3 libpng.so; \ ln -sf libpng.so.0 libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -195,7 +195,7 @@ test-installed:
clean: clean:
rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
so_locations so_locations
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -5,7 +5,7 @@
LIBNAME=libpng12 LIBNAME=libpng12
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Where make install puts libpng.a, libpng12.so, and libpng12/png.h # Where make install puts libpng.a, libpng12.so, and libpng12/png.h
@ -36,7 +36,7 @@ LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \
-set_version sgi$(PNGMAJ).0 -set_version sgi$(PNGMAJ).0
LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \ LDLEGACY=cc $(ABI) -shared -soname libpng.so.0 \
-set_version sgi$3.0 -set_version sgi$3.0
# See "man dso" for info about shared objects # See "man dso" for info about shared objects
@ -102,7 +102,7 @@ $(LIBNAME).so.$(PNGVER): $(OBJS)
$(LDSHARED) -o $@ $(OBJS) $(LDSHARED) -o $@ $(OBJS)
rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)
libpng.so.3.$(PNGMIN): $(OBJS) libpng.so.0.$(PNGMIN): $(OBJS)
$(LDLEGACY) -o $@ $(OBJS) $(LDLEGACY) -o $@ $(OBJS)
pngtest: pngtest.o libpng.a pngtest: pngtest.o libpng.a
@ -130,20 +130,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -sf $(LIBNAME).a libpng.a) (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -sf libpng.so.3 libpng.so; \ ln -sf libpng.so.0 libpng.so; \
ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -201,7 +201,7 @@ test-installed:
clean: clean:
rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
so_locations so_locations
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -34,7 +34,7 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
RANLIB=echo RANLIB=echo
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12 LIBNAME = libpng12
@ -110,9 +110,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJS) libpng.so.0.$(PNGMIN): $(OBJS)
$(LD) -G -h libpng.so.3 \ $(LD) -G -h libpng.so.0 \
-o libpng.so.3.$(PNGMIN) $(OBJSDLL) -o libpng.so.0.$(PNGMIN) $(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
@ -137,20 +137,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -f -s $(LIBNAME).a libpng.a) (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -f -s libpng.so.3 libpng.so; \ ln -f -s libpng.so.0 libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -206,7 +206,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -30,7 +30,7 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm
RANLIB=echo RANLIB=echo
PNGMAJ = 0 PNGMAJ = 0
PNGMIN = 1.2.8 PNGMIN = 1.2.9beta1
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12 LIBNAME = libpng12
@ -107,9 +107,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \
-o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL)
libpng.so.3.$(PNGMIN): $(OBJS) libpng.so.0.$(PNGMIN): $(OBJS)
$(LD) -G -h libpng.so.3 \ $(LD) -G -h libpng.so.0 \
-o libpng.so.3.$(PNGMIN) $(OBJSDLL) -o libpng.so.0.$(PNGMIN) $(OBJSDLL)
pngtest: pngtest.o $(LIBNAME).so pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
@ -134,20 +134,20 @@ install-static: install-headers libpng.a
(cd $(DL); ln -f -s $(LIBNAME).a libpng.a) (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
libpng.so.3.$(PNGMIN) libpng.so.0.$(PNGMIN)
-@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ) -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
-@/bin/rm -f $(DL)/libpng.so -@/bin/rm -f $(DL)/libpng.so
-@/bin/rm -f $(DL)/libpng.so.3 -@/bin/rm -f $(DL)/libpng.so.0
-@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)*
cp $(LIBNAME).so.$(PNGVER) $(DL) cp $(LIBNAME).so.$(PNGVER) $(DL)
cp libpng.so.3.$(PNGMIN) $(DL) cp libpng.so.0.$(PNGMIN) $(DL)
chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
chmod 755 $(DL)/libpng.so.3.$(PNGMIN) chmod 755 $(DL)/libpng.so.0.$(PNGMIN)
(cd $(DL); \ (cd $(DL); \
ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \
ln -f -s libpng.so.3 libpng.so; \ ln -f -s libpng.so.0 libpng.so; \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \
ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)) ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ))
-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
@ -203,7 +203,7 @@ test-installed:
clean: clean:
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \
libpng.so.3.$(PNGMIN) \ libpng.so.0.$(PNGMIN) \
libpng.pc libpng.pc
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO

View File

@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2 ; PNG.LIB module definition file for OS/2
;---------------------------------------- ;----------------------------------------
; Version 1.2.8 ; Version 1.2.9beta1
LIBRARY PNG LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2" DESCRIPTION "PNG image compression library for OS/2"
@ -213,6 +213,15 @@ EXPORTS
; Added at version 1.2.7 ; Added at version 1.2.7
png_set_add_alpha png_set_add_alpha
; Added at version 1.2.9
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
; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS ; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
png_libpng_ver png_libpng_ver
png_pass_start png_pass_start

View File

@ -5,7 +5,7 @@
LIBRARY LIBRARY
EXPORTS EXPORTS
;Version 1.2.8 ;Version 1.2.9beta1
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
@ -184,7 +184,7 @@ EXPORTS
png_convert_to_rfc1123 @172 png_convert_to_rfc1123 @172
png_set_invalid @173 png_set_invalid @173
; Added at version 1.0.12 ; Added at version 1.0.12
; For compatiblity with 1.0.7-1.0.11 ; For compatibility with 1.0.7-1.0.11
png_info_init @174 png_info_init @174
png_read_init_3 @175 png_read_init_3 @175
png_write_init_3 @176 png_write_init_3 @176