diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2006-02-20 22:09:05 -0600 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2009-04-06 16:08:23 -0500 |
commit | 9c3ab681455e5dff1b9dd9c38299f1c06afa908b (patch) | |
tree | 9bf3736bba6429da2bb136f231095f97af6eba31 | |
parent | 917648ecb92f45537924b3c46a4a811b956c7023 (diff) | |
download | libpng-9c3ab681455e5dff1b9dd9c38299f1c06afa908b.tar.gz |
Imported from libpng-1.2.9beta1.tarv1.2.9beta1
76 files changed, 798 insertions, 835 deletions
@@ -1,32 +1,38 @@ -Libpng 1.2.8 - December 3, 2004 +Libpng 1.2.9beta1 - February 21, 2006 -This is a public release of libpng, intended for use in production codes. +This is not intended to be a public release. It will be replaced +within a few weeks by a public version or by another test version. -Changes since the last public release (1.2.7): +Changes since the last public release (1.2.8): - Fixed bug in png_text_compress() that would fail to complete a large block. - Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during - strip alpha operation in png_do_strip_filler(). - Added PNG_1_2_X definition in pngconf.h - #ifdef out png_info_init in png.c and png_read_init in pngread.c (as of 1.3.0) - Reduce color_type to a nonalpha type after strip alpha operation in - png_do_strip_filler(). - Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM - Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin). - Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin). - Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection - of data type in deflate (Cosmin). - Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of - PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING. - Despammed mailing addresses by masking "@" with "at". - Added scripts/makefile.elf with supporting code in pngconf.h for symbol - versioning (John Bowler). - Added projects/visualc71 (Simon-pierre). +version 1.2.9beta1 [February 21, 2006] + Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints + Revised man page and libpng.txt to make it clear that one should not call + png_read_end or png_write_end after png_read_png or png_write_png. + Updated references to png-mng-implement mailing list. + Fixed an incorrect typecast in pngrutil.c + Added PNG_READ_SUPPORTED conditionals for making a write-only library. + Added PNG_NO_WRITE_INTERLACING_SUPPORTED conditional. + Optimized alpha-inversion loops in pngwtran.c + Moved test for nonzero gamma outside of png_build_gamma_table() in pngrtran.c + Make sure num_trans is <= 256 before copying data in png_set_tRNS(). + Make sure num_palette is <= 256 before copying data in png_set_PLTE(). + Interchanged order of write_swap_alpha and write_invert_alpha transforms. + Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin). + Optimized zlib window flag (CINFO) in contrib/pngsuite/*.png (Cosmin). + Updated scripts/makefile.bc32 for Borland C++ 5.6 (Cosmin). + Fixed inconsistency in definition of png_default_read_data() + Exported png_get_uint_32, png_save_uint_32, png_get_uint_16, png_save_uint_16, + png_get_int_32, png_save_int_32, png_get_uint_31 (Cosmin). + Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin). + Updated scripts/pngos2.def, scripts/pngw32.def (Cosmin). + Added type cast (png_byte) in png_write_sCAL() (Cosmin). + Fixed scripts/makefile.cygwin (Cosmin). -Send comments/corrections/commendations to -png-implement at ccrc.wustl.edu (subscription required; write to -majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message) -or to glennrp at users.sourceforge.net +Send comments/corrections/commendations to png-mng-implement at lists.sf.net +(subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) or to glennrp at users.sourceforge.net Glenn R-P @@ -10,7 +10,7 @@ version 0.3 split up pngwrite.c to several files added pnglib.txt added example.c - cleaned up writer, adding a few new tranformations + cleaned up writer, adding a few new transformations fixed some bugs in writer interfaced with zlib 0.5 added K&R support @@ -22,7 +22,7 @@ version 0.4 created png_color_16 and png_color_8 to handle color needs cleaned up color type defines fixed various bugs - made various names more consistant + made various names more consistent interfaced with zlib 0.71 cleaned up zTXt reader and writer (using zlib's Reset functions) split transformations into pngrtran.c and pngwtran.c @@ -151,7 +151,7 @@ version 0.95 [March, 1997] added "packswap" transformation, which changes the endianness of packed-pixel bytes (Kevin Bracey) added "strip_alpha" transformation, which removes the alpha channel of - input images without using it (not neccesarily a good idea) + input images without using it (not necessarily a good idea) added "swap_alpha" transformation, which puts the alpha channel in front of the color bytes instead of after removed all implicit variable tests which assume NULL == 0 (I think) @@ -172,7 +172,7 @@ version 0.95 [March, 1997] more chunk types tested in pngtest.c renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be png_set_<chunk>. We now have corresponding png_get_<chunk> - functions in pngget.c to get infomation in info_ptr. This isolates + functions in pngget.c to get information in info_ptr. This isolates the application from the internal organization of png_info_struct (good for shared library implementations). @@ -522,9 +522,9 @@ version 1.0.5b [November 23, 1999] Updated scripts/makevms.com and added makevms.com to contrib/gregbook and contrib/pngminus (Martin Zinser) version 1.0.5c [November 26, 1999] - Moved png_get_header_version from png.h to png.c, to accomodate ansi2knr. + Moved png_get_header_version from png.h to png.c, to accommodate ansi2knr. Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to - accomodate making DLL's: Moved usr_png_ver from global variable to function + accommodate making DLL's: Moved usr_png_ver from global variable to function png_get_header_ver() in png.c. Moved png_sig to png_sig_bytes in png.c and eliminated use of png_sig in pngwutil.c. Moved the various png_CHNK arrays into pngtypes.h. Eliminated use of global png_pass arrays. Declared the @@ -1361,6 +1361,7 @@ version 1.2.7beta2 [August 28, 2004] Added png_set_add_alpha() that updates color type. version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004] Revised png_set_strip_filler() to not remove alpha if color_type has alpha. + version 1.0.17 and 1.2.7 [September 12, 2004] Added makefile.hp64 Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin @@ -1408,12 +1409,42 @@ version 1.2.8rc4 [November 29, 2004] Added projects/visualc7 (Simon-pierre). version 1.2.8rc5 [November 29, 2004] Fixed new typo in scripts/pngw32.rc + version 1.2.8 [December 3, 2004] Removed projects/visualc7, added projects/visualc71. -Send comments/corrections/commendations to -png-implement at ccrc.wustl.edu (subscription required; write to -majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message) +version 1.2.9beta1 [February 21, 2006] + + Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints + Revised man page and libpng.txt to make it clear that one should not call + png_read_end or png_write_end after png_read_png or png_write_png. + Updated references to png-mng-implement mailing list. + Fixed an incorrect typecast in pngrutil.c + Added PNG_READ_SUPPORTED conditionals for making a write-only library. + Added PNG_NO_WRITE_INTERLACING_SUPPORTED conditional. + Optimized alpha-inversion loops in pngwtran.c + Moved test for nonzero gamma outside of png_build_gamma_table() in pngrtran.c + Make sure num_trans is <= 256 before copying data in png_set_tRNS(). + Make sure num_palette is <= 256 before copying data in png_set_PLTE(). + Interchanged order of write_swap_alpha and write_invert_alpha transforms. + Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin). + Optimized zlib window flag (CINFO) in contrib/pngsuite/*.png (Cosmin). + Updated scripts/makefile.bc32 for Borland C++ 5.6 (Cosmin). + Fixed inconsistency in definition of png_default_read_data() + Exported png_get_uint_32, png_save_uint_32, png_get_uint_16, png_save_uint_16, + png_get_int_32, png_save_int_32, png_get_uint_31 (Cosmin). + Added parentheses in the definition of PNG_LIBPNG_BUILD_TYPE (Cosmin). + Updated scripts/pngos2.def, scripts/pngw32.def (Cosmin). + Added type cast (png_byte) in png_write_sCAL() (Cosmin). + Fixed scripts/makefile.cygwin (Cosmin). + +version 1.3.0beta1 [future] + Enable iTXt support (changes png_struct, thus requires so-number change). + +Send comments/corrections/commendations to png-mng-implement at lists.sf.net +(subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) or to glennrp at users.sourceforge.net Glenn R-P @@ -1,5 +1,5 @@ -Installing libpng version 1.2.8 - %DATE% +Installing libpng version 1.2.9beta1 - February 21, 2006 Before installing libpng, you must first install zlib. zlib can usually be found wherever you got libpng. zlib can be @@ -10,8 +10,8 @@ zlib.h and zconf.h include files that correspond to the version of zlib that's installed. You can rename the directories that you downloaded (they -might be called "libpng-1.2.8" or "lpng109" and "zlib-1.1.3" -or "zlib113") so that you have directories called "zlib" and "libpng". +might be called "libpng-1.2.9beta1" or "lpng109" and "zlib-1.2.1" +or "zlib121") so that you have directories called "zlib" and "libpng". Your directory structure should look like this: @@ -23,14 +23,13 @@ Your directory structure should look like this: *.c contrib gregbook - msvctest pngminus pngsuite visupng projects beos - borland - msvc + c5builder (Borland) + visualc6 (msvc) netware.txt wince.txt scripts @@ -48,13 +47,16 @@ If the line endings in the files look funny, you may wish to get the other distribution of libpng. It is available in both tar.gz (UNIX style line endings) and zip (DOS style line endings) formats. -If you are building libpng with MSVC, you can enter the libpng\msvc directory -and follow the instructions in msvc\README.txt. -You can build libpng for WindowsCE by entering the downloading and installing -the libpng\wince directory as instructed in the projects\wince.txt file, and +If you are building libpng with MSVC, you can enter the +libpng projects\visualc6 directory and follow the instructions in +projects\visualc6\README.txt. + +You can build libpng for WindowsCE by downloading and installing +the projects\wince directory as instructed in the projects\wince.txt file, and then following the instructions in the README* files. Similarly, you can -build libpng for Netware as instructed in projects\netware.txt. +build libpng for Netware or Beos as instructed in projects\netware.txt +or projects\beos. Else enter the zlib directory and follow the instructions in zlib/README, then come back here and choose the appropriate makefile.sys in the scripts @@ -64,8 +66,12 @@ The files that are presently available in the scripts directory include makefile.std => Generic UNIX makefile (cc, creates static libpng.a) - makefile.linux => Linux/ELF makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8) - makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8, + makefile.elf => Linux/ELF makefile symbol versioning, + gcc, creates libpng12.so.0.1.2.9beta1) + makefile.linux => Linux/ELF makefile + (gcc, creates libpng12.so.0.1.2.9beta1) + makefile.gcmmx => Linux/ELF makefile + (gcc, creates libpng12.so.0.1.2.9beta1, uses assembler code tuned for Intel MMX platform) makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.knr => Archaic UNIX Makefile that converts files with @@ -73,23 +79,27 @@ include ftp://ftp.cs.wisc.edu/ghost) makefile.aix => AIX/gcc makefile makefile.cygwin => Cygwin/gcc makefile - makefile.darwin => Darwin makefile + makefile.darwin => Darwin makefile, can use on MacosX makefile.dec => DEC Alpha UNIX makefile - makefile.hpgcc => FreeBSD makefile + makefile.freebsd => FreeBSD makefile makefile.hpgcc => HPUX makefile using gcc makefile.hpux => HPUX (10.20 and 11.00) makefile + makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) makefile.intel => Intel C/C++ version 4.0 and later libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later - makefile.macosx => MACOS X Makefile makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so. - makefile.ne%SONUM%bsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng%SONUM%.so + makefile.ne12bsd => NetBSD/cc makefile, uses PNGGCCRD, + makes libpng12.so makefile.openbsd => OpenBSD makefile makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) - makefile.sggcc => Silicon Graphics (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8) + makefile.sggcc => Silicon Graphics (gcc, + creates libpng12.so.0.1.2.9beta1) makefile.sunos => Sun makefile - makefile.solaris => Solaris 2.X makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8) - makefile.so9 => Solaris 9 makefile (gcc, creates libpng%SONAME%.so.%SONUM%.1.2.8) + makefile.solaris => Solaris 2.X makefile (gcc, + creates libpng12.so.0.1.2.9beta1) + makefile.so9 => Solaris 9 makefile (gcc, + creates libpng12.so.0.1.2.9beta1) makefile.32sunu => Sun Ultra 32-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc @@ -102,7 +112,6 @@ include makefile.beos => BEOS makefile for X86 makefile.bor => Borland makefile (uses bcc) makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) - makefile.bd32 => To make a png32bd.dll with Borland C++ 4.5 makefile.tc3 => Turbo C 3.0 makefile makefile.dj2 => DJGPP 2 makefile makefile.msc => Microsoft C makefile @@ -115,7 +124,6 @@ include makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model makevms.com => VMS build script descrip.mms => VMS makefile for MMS or MMK - pngdef.pas => Defines for a png32bd.dll with Borland C++ 4.5 SCOPTIONS.ppc => Used with smakefile.ppc Copy the file (or files) that you need from the @@ -130,13 +138,13 @@ target directories to match your preferences. Then read pngconf.h to see if you want to make any configuration changes. -Then just run "make test" which will create the libpng library in -this directory and run a quick test that reads the "pngtest.png" -file and writes a "pngout.png" file that should be identical to it. -Look for "9782 zero samples" in the output of the test. For more -confidence, you can run another test by typing "pngtest pngnow.png" -and looking for "289 zero samples" in the output. Also, you can -run "pngtest -m *.png" in the "contrib/pngsuite" directory and compare +Then just run "make" which will create the libpng library in +this directory and "make test" which will run a quick test that reads +the "pngtest.png" file and writes a "pngout.png" file that should be +identical to it. Look for "9782 zero samples" in the output of the +test. For more confidence, you can run another test by typing +"pngtest pngnow.png" and looking for "289 zero samples" in the output. +Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare your output with the result shown in contrib/pngsuite/README. Most of the makefiles will allow you to run "make install" to @@ -145,9 +153,20 @@ do that, run "make install" in the zlib directory first if necessary). Some also allow you to run "make test-installed" after you have run "make install". +If you encounter a compiler error message complaining about the +lines + __png.h__ already includes setjmp.h; + __dont__ include it again.; +This means you have compiled another module that includes setjmp.h, +which is hazardous because the two modules might not include exactly +the same setjmp.h. If you are sure that you know what you are doing +and that they are exactly the same, then you can comment out or +delete the two lines. Better yet, use the cexcept interface +instead, as demonstrated in contrib/visupng of the libpng distribution. + Further information can be found in the README and libpng.txt -files, in the individual makefiles, in png.h, in the README files in -subdirectories of the LIB directory, and the manual pages libpng.3 and png.5. +files, in the individual makefiles, in png.h, and the manual pages +libpng.3 and png.5. Using the ./configure script -- 16 December 2002. diff --git a/INSTALL.a b/INSTALL.a new file mode 100644 index 000000000..b0ba189ca --- /dev/null +++ b/INSTALL.a @@ -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. + + @@ -1,5 +1,5 @@ -Known bugs in libpng version 1.2.8 +Known bugs in libpng version 1.2.9beta1 1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when reading interlaced PNG files, when assembler code is enabled but running @@ -8,8 +8,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: If you modify libpng you may insert additional notices immediately following this sentence. -libpng version 1.2.6, December 3, 2004, is -Copyright (c) 2004 Glenn Randers-Pehrson, and is +libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are +Copyright (c) 2005 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -106,4 +106,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -December 3, 2004 +February 21, 2006 diff --git a/Makefile.am b/Makefile.am index 027be0650..9e0c4d421 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,8 +15,10 @@ libpng12_la_SOURCES = png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngwtran.c pngmem.c pngerror.c pngpread.c \ png.h pngconf.h libpng_la_SOURCES = $(libpng12_la_SOURCES) -libpng12_la_LDFLAGS = -export-dynamic -version-info $(LIBPNG12_VERSION_INFO) -libpng_la_LDFLAGS = -export-dynamic -version-info $(LIBPNG3_VERSION_INFO) +libpng12_la_LDFLAGS = -no-undefined -export-dynamic -version-info \ +$(LIBPNG12_VERSION_INFO) +libpng_la_LDFLAGS = -no-undefined -export-dynamic -version-info \ +$(LIBPNG3_VERSION_INFO) #distribute headers in /usr/include/libpng/* pkginclude_HEADERS= png.h pngconf.h @@ -24,7 +26,8 @@ pkginclude_HEADERS= png.h pngconf.h #extra source distribution files. EXTRA_DIST= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ - ${srcdir}/projects/cbuilder5/* ${srcdir}/projects/beos/* ${srcdir}/projects/visualc6/* \ + ${srcdir}/projects/cbuilder5/* ${srcdir}/projects/beos/* \ + ${srcdir}/projects/visualc6/* ${srcdir}/projects/visualc71 \ ${srcdir}/projects/wince.txt ${srcdir}/projects/netware.txt \ ${srcdir}/scripts/* \ ${srcdir}/contrib/gregbook/* \ @@ -1,4 +1,4 @@ -README for libpng version 1.2.8 - December 3, 2004 (shared library 12.0) +README for libpng version 1.2.9beta1 - February 21, 2006 (shared library 12.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. @@ -103,9 +103,10 @@ fix. Please mention "libpng" somewhere in the subject line. Thanks. This release was created and will be supported by myself (of course based in a large way on Guy's and Andreas' earlier work), and the PNG group. -glennrp at users.sourceforge.net -png-implement at ccrc.wustl.edu (subscription required; write to -majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message). +Send comments/corrections/commendations to png-mng-implement at lists.sf.net +(subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) or to glennrp at users.sourceforge.net You can't reach Guy, the original libpng author, at the addresses given in previous versions of this document. He and Andreas will read mail @@ -189,11 +190,11 @@ Files in this distribution: descrip.mms => VMS makefile for MMS or MMK makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.elf => Linux/ELF makefile symbol versioning, - gcc, creates libpng12.so.0.1.2.8) + gcc, creates libpng12.so.0.1.2.9beta1) makefile.linux => Linux/ELF makefile - (gcc, creates libpng12.so.0.1.2.8) + (gcc, creates libpng12.so.0.1.2.9beta1) makefile.gcmmx => Linux/ELF makefile - (gcc, creates libpng12.so.0.1.2.8, + (gcc, creates libpng12.so.0.1.2.9beta1, uses assembler code tuned for Intel MMX platform) makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.knr => Archaic UNIX Makefile that converts files with @@ -215,12 +216,12 @@ Files in this distribution: makefile.openbsd => OpenBSD makefile makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) makefile.sggcc => Silicon Graphics - (gcc, creates libpng12.so.0.1.2.8) + (gcc, creates libpng12.so.0.1.2.9beta1) makefile.sunos => Sun makefile makefile.solaris => Solaris 2.X makefile - (gcc, creates libpng12.so.0.1.2.8) + (gcc, creates libpng12.so.0.1.2.9beta1) makefile.so9 => Solaris 9 makefile - (gcc, creates libpng12.so.0.1.2.8) + (gcc, creates libpng12.so.0.1.2.9beta1) makefile.32sunu => Sun Ultra 32-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc @@ -1,13 +1,13 @@ Y2K compliance in libpng: ========================= - December 3, 2004 + February 21, 2006 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and - upward through 1.2.8 are Y2K compliant. It is my belief that earlier + upward through 1.2.9beta1 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57 for libpng 1.2.8-automake. +# Generated by GNU Autoconf 2.57 for libpng 1.2.9beta1-automake. # # Report bugs to <png-implement@ccrc.wustl.edu>. # @@ -427,8 +427,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libpng' PACKAGE_TARNAME='libpng' -PACKAGE_VERSION='1.2.8-automake' -PACKAGE_STRING='libpng 1.2.8-automake' +PACKAGE_VERSION='1.2.9beta1-automake' +PACKAGE_STRING='libpng 1.2.9beta1-automake' PACKAGE_BUGREPORT='png-implement@ccrc.wustl.edu' ac_unique_file="pngget.c" @@ -938,7 +938,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libpng 1.2.8-automake to adapt to many kinds of systems. +\`configure' configures libpng 1.2.9beta1-automake to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1008,7 +1008,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpng 1.2.8-automake:";; + short | recursive ) echo "Configuration of libpng 1.2.9beta1-automake:";; esac cat <<\_ACEOF @@ -1106,7 +1106,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -libpng configure 1.2.8-automake +libpng configure 1.2.9beta1-automake generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 @@ -1121,7 +1121,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libpng $as_me 1.2.8-automake, which was +It was created by libpng $as_me 1.2.9beta1-automake, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ @@ -1721,7 +1721,7 @@ fi # Define the identity of the package. PACKAGE=libpng - VERSION=1.2.8-automake + VERSION=1.2.9beta1-automake cat >>confdefs.h <<_ACEOF @@ -9673,7 +9673,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by libpng $as_me 1.2.8-automake, which was +This file was extended by libpng $as_me 1.2.9beta1-automake, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9736,7 +9736,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -libpng config.status 1.2.8-automake +libpng config.status 1.2.9beta1-automake configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 0dff105f7..bd3e6cf64 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -m4_define(PNGPKG_VERSION,[1.2.8-automake]) +m4_define(PNGPKG_VERSION,[1.2.9beta1-automake]) AC_INIT([libpng], PNGPKG_VERSION, png-implement@ccrc.wustl.edu) AM_INIT_AUTOMAKE([libpng], PNGPKG_VERSION) AC_CONFIG_SRCDIR([pngget.c]) diff --git a/contrib/pngsuite/basn0g01.png b/contrib/pngsuite/basn0g01.png Binary files differindex 1d722423a..e31e1c7a6 100644 --- a/contrib/pngsuite/basn0g01.png +++ b/contrib/pngsuite/basn0g01.png diff --git a/contrib/pngsuite/basn0g02.png b/contrib/pngsuite/basn0g02.png Binary files differindex 508332418..68809dd8f 100644 --- a/contrib/pngsuite/basn0g02.png +++ b/contrib/pngsuite/basn0g02.png diff --git a/contrib/pngsuite/basn0g04.png b/contrib/pngsuite/basn0g04.png Binary files differindex 0bf368786..6fa089cb8 100644 --- a/contrib/pngsuite/basn0g04.png +++ b/contrib/pngsuite/basn0g04.png diff --git a/contrib/pngsuite/basn0g08.png b/contrib/pngsuite/basn0g08.png Binary files differindex 23c82379a..bf522eef0 100644 --- a/contrib/pngsuite/basn0g08.png +++ b/contrib/pngsuite/basn0g08.png diff --git a/contrib/pngsuite/basn0g16.png b/contrib/pngsuite/basn0g16.png Binary files differindex e7c82f78e..318ebcadf 100644 --- a/contrib/pngsuite/basn0g16.png +++ b/contrib/pngsuite/basn0g16.png diff --git a/contrib/pngsuite/basn2c08.png b/contrib/pngsuite/basn2c08.png Binary files differindex db5ad1586..21d2f91a8 100644 --- a/contrib/pngsuite/basn2c08.png +++ b/contrib/pngsuite/basn2c08.png diff --git a/contrib/pngsuite/basn2c16.png b/contrib/pngsuite/basn2c16.png Binary files differindex 50c1cb91a..1bd4a4d0e 100644 --- a/contrib/pngsuite/basn2c16.png +++ b/contrib/pngsuite/basn2c16.png diff --git a/contrib/pngsuite/basn3p01.png b/contrib/pngsuite/basn3p01.png Binary files differindex b145c2b8e..a21db5977 100644 --- a/contrib/pngsuite/basn3p01.png +++ b/contrib/pngsuite/basn3p01.png diff --git a/contrib/pngsuite/basn3p02.png b/contrib/pngsuite/basn3p02.png Binary files differindex 8985b3d81..1d0ab6197 100644 --- a/contrib/pngsuite/basn3p02.png +++ b/contrib/pngsuite/basn3p02.png diff --git a/contrib/pngsuite/basn3p04.png b/contrib/pngsuite/basn3p04.png Binary files differindex 0fbf9e827..6dc6eac83 100644 --- a/contrib/pngsuite/basn3p04.png +++ b/contrib/pngsuite/basn3p04.png diff --git a/contrib/pngsuite/basn3p08.png b/contrib/pngsuite/basn3p08.png Binary files differindex 0ddad07e5..0e07f483c 100644 --- a/contrib/pngsuite/basn3p08.png +++ b/contrib/pngsuite/basn3p08.png diff --git a/contrib/pngsuite/basn4a08.png b/contrib/pngsuite/basn4a08.png Binary files differindex 3e1305220..3bb0dd06b 100644 --- a/contrib/pngsuite/basn4a08.png +++ b/contrib/pngsuite/basn4a08.png diff --git a/contrib/pngsuite/basn4a16.png b/contrib/pngsuite/basn4a16.png Binary files differindex 8243644d0..6dbee9fbd 100644 --- a/contrib/pngsuite/basn4a16.png +++ b/contrib/pngsuite/basn4a16.png diff --git a/contrib/pngsuite/basn6a08.png b/contrib/pngsuite/basn6a08.png Binary files differindex e60873876..610623085 100644 --- a/contrib/pngsuite/basn6a08.png +++ b/contrib/pngsuite/basn6a08.png diff --git a/contrib/pngsuite/basn6a16.png b/contrib/pngsuite/basn6a16.png Binary files differindex 984a99525..a9bf3cb46 100644 --- a/contrib/pngsuite/basn6a16.png +++ b/contrib/pngsuite/basn6a16.png @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "December 3, 2004" +.TH LIBPNG 3 "February 21, 2006" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.2.8 +libpng \- Portable Network Graphics (PNG) Reference Library 1.2.9beta1 .SH SYNOPSIS \fI\fB @@ -781,10 +781,10 @@ Following is a copy of the libpng.txt file that accompanies libpng. .SH LIBPNG.TXT libpng.txt - A description on how to use and modify libpng - libpng version 1.2.8 - December 3, 2004 + libpng version 1.2.9beta1 - February 21, 2006 Updated and distributed by Glenn Randers-Pehrson <glennrp at users.sourceforge.net> - Copyright (c) 1998-2004 Glenn Randers-Pehrson + Copyright (c) 1998-2005 Glenn Randers-Pehrson For conditions of distribution and use, see copyright notice in png.h. @@ -2029,8 +2029,8 @@ the second parameter NULL. .SS Finishing a sequential read -After you are finished reading the image through either the high- or -low-level interfaces, you can finish reading the file. If you are +After you are finished reading the image through the +low-level interface, you can finish reading the file. If you are interested in comments or time, which may be stored either before or after the image data, you should pass the separate png_info struct if you want to keep the comments from before and after the image @@ -3240,7 +3240,7 @@ to use the "cexcept" facility (see http://cexcept.sourceforge.net). If you need to read or write custom chunks, you may need to get deeper into the libpng code. The library now has mechanisms for storing and writing chunks of unknown type; you can even declare callbacks -for custom chunks. Hoewver, this may not be good enough if the +for custom chunks. However, this may not be good enough if the library code itself needs to know about interactions between your chunk and existing `intrinsic' chunks. @@ -3685,13 +3685,13 @@ application: .SH IX. Y2K Compliance in libpng -December 3, 2004 +February 21, 2006 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.2.8 are Y2K compliant. It is my belief that earlier +upward through 1.2.9beta1 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that @@ -3844,6 +3844,7 @@ the first widely used release: 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 1.0.18 10 10018 12.so.0.1.0.18 1.2.8 13 10208 12.so.0.1.2.8 + 1.3.0beta1 14 10300 13.so.0.1.3.0beta1 Henceforth the source version will match the shared-library minor and patch numbers; the shared-library major version number will be @@ -3899,14 +3900,17 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.2.8 - December 3, 2004: +Libpng version 1.2.9beta1 - February 21, 2006: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). Supported by the PNG development group .br -png-implement at ccrc.wustl.edu (subscription required; write to -majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message). +png-mng-implement at lists.sf.net +(subscription required; visit +png-implement at ccrc.wustl.edu (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe). .SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: @@ -3917,8 +3921,8 @@ included in the libpng distribution, the latter shall prevail.) If you modify libpng you may insert additional notices immediately following this sentence. -libpng version 1.2.6, December 3, 2004, is -Copyright (c) 2004 Glenn Randers-Pehrson, and is +libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are +Copyright (c) 2005 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -4016,7 +4020,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -December 3, 2004 +February 21, 2006 .\" end of man page diff --git a/libpng.txt b/libpng.txt index 9360f33b3..cb478c497 100644 --- a/libpng.txt +++ b/libpng.txt @@ -1,9 +1,9 @@ libpng.txt - A description on how to use and modify libpng - libpng version 1.2.8 - December 3, 2004 + libpng version 1.2.9beta1 - February 21, 2006 Updated and distributed by Glenn Randers-Pehrson <glennrp at users.sourceforge.net> - Copyright (c) 1998-2004 Glenn Randers-Pehrson + Copyright (c) 1998-2005 Glenn Randers-Pehrson For conditions of distribution and use, see copyright notice in png.h. @@ -1248,8 +1248,8 @@ the second parameter NULL. Finishing a sequential read -After you are finished reading the image through either the high- or -low-level interfaces, you can finish reading the file. If you are +After you are finished reading the image through the +low-level interface, you can finish reading the file. If you are interested in comments or time, which may be stored either before or after the image data, you should pass the separate png_info struct if you want to keep the comments from before and after the image @@ -2459,7 +2459,7 @@ Custom chunks If you need to read or write custom chunks, you may need to get deeper into the libpng code. The library now has mechanisms for storing and writing chunks of unknown type; you can even declare callbacks -for custom chunks. Hoewver, this may not be good enough if the +for custom chunks. However, this may not be good enough if the library code itself needs to know about interactions between your chunk and existing `intrinsic' chunks. @@ -2904,13 +2904,13 @@ application: IX. Y2K Compliance in libpng -December 3, 2004 +February 21, 2006 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.2.8 are Y2K compliant. It is my belief that earlier +upward through 1.2.9beta1 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that diff --git a/libpngpf.3 b/libpngpf.3 index d196d70c4..7072ee5ed 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "December 3, 2004" +.TH LIBPNGPF 3 "February 21, 2006" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.2.8 +libpng \- Portable Network Graphics (PNG) Reference Library 1.2.9beta1 (private functions) .SH SYNOPSIS \fB\fB#include <png.h>\fP\fP @@ -1,4 +1,4 @@ -.TH PNG 5 "December 3, 2004" +.TH PNG 5 "February 21, 2006" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION @@ -58,7 +58,7 @@ Thomas Boutell and others (png-list). .SH COPYRIGHT NOTICE .LP -This man page is Copyright (c) 1998-2004 Glenn Randers-Pehrson. See png.h +This man page is Copyright (c) 1998-2005 Glenn Randers-Pehrson. See png.h for conditions of use and distribution. .LP The PNG Specification (Second Edition) is @@ -1,9 +1,9 @@ /* png.c - location for general purpose libpng functions * - * libpng version 1.2.8 - December 3, 2004 + * libpng version 1.2.9beta1 - February 21, 2006 * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ @@ -13,7 +13,7 @@ #include "png.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_2_8 Your_png_h_is_not_version_1_2_8; +typedef version_1_2_9beta1 Your_png_h_is_not_version_1_2_9beta1; /* Version information for C files. This had better match the version * string defined in png.h. */ @@ -22,9 +22,12 @@ typedef version_1_2_8 Your_png_h_is_not_version_1_2_8; /* png_libpng_ver was changed to a function in version 1.0.5c */ const char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING; +#ifdef PNG_READ_SUPPORTED + /* png_sig was changed to a function in version 1.0.5c */ /* Place to hold the signature string for a PNG file. */ const png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; +#endif /* PNG_READ_SUPPORTED */ /* Invoke global declarations for constant strings for known chunk types */ PNG_IHDR; @@ -49,6 +52,7 @@ PNG_tIME; PNG_tRNS; PNG_zTXt; +#ifdef PNG_READ_SUPPORTED /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ /* start of interlace block */ @@ -80,6 +84,7 @@ const int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; const int FARDATA png_pass_dsp_mask[] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; +#endif /* PNG_READ_SUPPORTED */ #endif /* PNG_USE_GLOBAL_ARRAYS */ /* Tells libpng that we have already handled the first "num_bytes" bytes @@ -88,6 +93,7 @@ const int FARDATA png_pass_dsp_mask[] * or write any of the magic bytes before it starts on the IHDR. */ +#ifdef PNG_READ_SUPPORTED void PNGAPI png_set_sig_bytes(png_structp png_ptr, int num_bytes) { @@ -113,10 +119,10 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) if (num_to_check > 8) num_to_check = 8; else if (num_to_check < 1) - return (0); + return (-1); if (start > 7) - return (0); + return (-1); if (start + num_to_check > 8) num_to_check = 8 - start; @@ -124,6 +130,7 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check))); } +#if defined(PNG_1_0_X) || defined(PNG_1_2_X) /* (Obsolete) function to check signature bytes. It does not allow one * to check a partial signature. This function might be removed in the * future - use png_sig_cmp(). Returns true (nonzero) if the file is a PNG. @@ -133,7 +140,10 @@ png_check_sig(png_bytep sig, int num) { return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num)); } +#endif +#endif /* PNG_READ_SUPPORTED */ +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) /* Function to allocate memory for zlib and clear it to 0. */ #ifdef PNG_1_0_X voidpf PNGAPI @@ -592,6 +602,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr) png_info_init_3(&info_ptr, png_sizeof(png_info)); } +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ /* This function returns a pointer to the io_ptr associated with the user * functions. The application should free any memory associated with this @@ -603,6 +614,7 @@ png_get_io_ptr(png_structp png_ptr) return (png_ptr->io_ptr); } +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #if !defined(PNG_NO_STDIO) /* Initialize the default input/output functions for the PNG file. If you * use your own read or write routines, you can call either png_set_read_fn() @@ -675,13 +687,14 @@ png_sig_bytes(void) return ((png_bytep)"\211\120\116\107\015\012\032\012"); } #endif +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ png_charp PNGAPI png_get_copyright(png_structp png_ptr) { if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */ - return ((png_charp) "\n libpng version 1.2.8 - December 3, 2004\n\ - Copyright (c) 1998-2004 Glenn Randers-Pehrson\n\ + return ((png_charp) "\n libpng version 1.2.9beta1 - February 21, 2006\n\ + Copyright (c) 1998-2006 Glenn Randers-Pehrson\n\ Copyright (c) 1996-1997 Andreas Dilger\n\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n"); return ((png_charp) ""); @@ -722,6 +735,7 @@ png_get_header_version(png_structp png_ptr) return ((png_charp) ""); } +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED int PNGAPI png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name) @@ -745,6 +759,7 @@ png_reset_zstream(png_structp png_ptr) { return (inflateReset(&png_ptr->zstream)); } +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ /* This function was added to libpng-1.0.7 */ png_uint_32 PNGAPI @@ -755,6 +770,7 @@ png_access_version_number(void) } +#if defined(PNG_READ_SUPPORTED) #if !defined(PNG_1_0_X) #if defined(PNG_ASSEMBLER_CODE_SUPPORTED) /* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */ @@ -814,7 +830,9 @@ png_mmx_support(void) } #endif #endif /* PNG_1_0_X */ +#endif /* PNG_READ_SUPPORTED */ +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #ifdef PNG_SIZE_T /* Added at libpng version 1.2.6 */ PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)); @@ -826,3 +844,4 @@ png_convert_size(size_t size) return ((png_size_t)size); } #endif /* PNG_SIZE_T */ +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ @@ -1,14 +1,14 @@ /* png.h - header file for PNG reference library * - * libpng version 1.2.8 - December 3, 2004 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * libpng version 1.2.9beta1 - February 21, 2006 + * Copyright (c) 1998-2005 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.2.8 - December 3, 2004: Glenn + * libpng versions 0.97, January 1998, through 1.2.9beta1 - February 21, 2006: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -111,6 +111,7 @@ * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 * 1.0.18 10 10018 12.so.0.1.0.18 * 1.2.8 13 10208 12.so.0.1.2.8 + * 1.3.0beta1 14 10300 13.so.0.1.3.0beta1 * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -140,8 +141,8 @@ * If you modify libpng you may insert additional notices immediately following * this sentence. * - * libpng versions 1.2.6, August 15, 2004, through 1.2.8, December 3, 2004, are - * Copyright (c) 2004 Glenn Randers-Pehrson, and are + * libpng versions 1.2.6, August 15, 2004, through 1.2.9beta1, February 21, 2006, are + * Copyright (c) 2005 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.2.5 * with the following individual added to the list of Contributing Authors: * @@ -252,13 +253,13 @@ * Y2K compliance in libpng: * ========================= * - * December 3, 2004 + * February 21, 2006 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.2.8 are Y2K compliant. It is my belief that earlier + * upward through 1.2.9beta1 are Y2K compliant. It is my belief that earlier * versions were also Y2K compliant. * * Libpng only has three year fields. One is a 2-byte unsigned integer @@ -314,9 +315,9 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.2.8" +#define PNG_LIBPNG_VER_STRING "1.2.9beta1" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.2.8 - December 3, 2004 (header)\n" + " libpng version 1.2.9beta1 - February 21, 2006 (header)\n" #define PNG_LIBPNG_VER_SONUM 0 #define PNG_LIBPNG_VER_DLLNUM 13 @@ -324,11 +325,11 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 2 -#define PNG_LIBPNG_VER_RELEASE 8 +#define PNG_LIBPNG_VER_RELEASE 9 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ -#define PNG_LIBPNG_VER_BUILD 0 +#define PNG_LIBPNG_VER_BUILD 1 /* Release Status */ #define PNG_LIBPNG_BUILD_ALPHA 1 @@ -345,14 +346,14 @@ #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with PNG_LIBPNG_BUILD_PRIVATE */ -#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA /* Careful here. At one time, Guy wanted to use 082, but that would be octal. * We must not include leading zeros. * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10208 /* 1.2.8 */ +#define PNG_LIBPNG_VER 10209 /* 1.2.9 */ #ifndef PNG_VERSION_INFO_ONLY /* include the compression library's header */ @@ -376,14 +377,14 @@ */ #if defined(PNG_USER_PRIVATEBUILD) -# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \ - PNG_LIBPNG_BUILD_PRIVATE +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) #else # if defined(PNG_LIBPNG_SPECIALBUILD) -# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \ - PNG_LIBPNG_BUILD_SPECIAL +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) # else -# define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE +# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) # endif #endif @@ -894,8 +895,10 @@ typedef png_info FAR * FAR * png_infopp; #define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) #define PNG_UINT_32_MAX ((png_uint_32)(-1)) #define PNG_SIZE_MAX ((png_size_t)(-1)) +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) /* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */ #define PNG_MAX_UINT PNG_UINT_31_MAX +#endif /* These describe the color_type field in png_info. */ /* color type masks */ @@ -1356,7 +1359,7 @@ struct png_struct_def /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef png_structp version_1_2_8; +typedef png_structp version_1_2_9beta1; typedef png_struct FAR * FAR * png_structpp; @@ -2572,6 +2575,44 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp #endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ +/* Inline macros to do direct reads of bytes from the input buffer. These + * require that you are using an architecture that uses PNG byte ordering + * (MSB first) and supports unaligned data storage. I think that PowerPC + * in big-endian mode and 680x0 are the only ones that will support this. + * The x86 line of processors definitely do not. The png_get_int_32() + * routine also assumes we are using two's complement format for negative + * values, which is almost certainly true. + */ +#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED) +# define png_get_uint_32(buf) ( *((png_uint_32p) (buf))) +# define png_get_uint_16(buf) ( *((png_uint_16p) (buf))) +# define png_get_int_32(buf) ( *((png_int_32p) (buf))) +#else +extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf)); +extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf)); +extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf)); +#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */ +extern PNG_EXPORT(png_uint_32,png_get_uint_31) + PNGARG((png_structp png_ptr, png_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). + */ +extern PNG_EXPORT(void,png_save_uint_32) + PNGARG((png_bytep buf, png_uint_32 i)); +extern PNG_EXPORT(void,png_save_int_32) + PNGARG((png_bytep buf, png_int_32 i)); + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +extern PNG_EXPORT(void,png_save_uint_16) + PNGARG((png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ + +/* ************************************************************************* */ + /* These next functions are used internally in the code. They generally * shouldn't be used unless you are writing code to add or replace some * functionality in libpng. More information about most functions can @@ -2762,31 +2803,7 @@ PNG_EXPORT_VAR (const png_byte FARDATA) png_tRNS[5]; PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5]; #endif /* PNG_USE_GLOBAL_ARRAYS */ - -/* Inline macros to do direct reads of bytes from the input buffer. These - * require that you are using an architecture that uses PNG byte ordering - * (MSB first) and supports unaligned data storage. I think that PowerPC - * in big-endian mode and 680x0 are the only ones that will support this. - * The x86 line of processors definitely do not. The png_get_int_32() - * routine also assumes we are using two's complement format for negative - * values, which is almost certainly true. - */ -#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED) -# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED) -# define png_get_int_32(buf) ( *((png_int_32p) (buf))) -# endif -# define png_get_uint_32(buf) ( *((png_uint_32p) (buf))) -# define png_get_uint_16(buf) ( *((png_uint_16p) (buf))) -#else -# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED) -PNG_EXTERN png_int_32 png_get_int_32 PNGARG((png_bytep buf)); -# endif -PNG_EXTERN png_uint_32 png_get_uint_32 PNGARG((png_bytep buf)); -PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf)); -#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */ -PNG_EXTERN png_uint_32 png_get_uint_31 PNGARG((png_structp png_ptr, - png_bytep buf)); - +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) /* Initialize png_ptr struct for reading, and allocate any other memory. * (old interface - DEPRECATED - use png_create_read_struct instead). */ @@ -2794,11 +2811,14 @@ extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr)); #undef png_read_init #define png_read_init(png_ptr) png_read_init_3(&png_ptr, \ PNG_LIBPNG_VER_STRING, png_sizeof(png_struct)); +#endif extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr, png_const_charp user_png_ver, png_size_t png_struct_size)); +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr, png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t png_info_size)); +#endif /* Initialize png_ptr struct for writing, and allocate any other memory. * (old interface - DEPRECATED - use png_create_write_struct instead). @@ -2906,23 +2926,6 @@ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); #endif - -/* Place a 32-bit number into a buffer in PNG byte order (big-endian). - * The only currently known PNG chunks that use signed numbers are - * the ancillary extension chunks, oFFs and pCAL. - */ -PNG_EXTERN void png_save_uint_32 PNGARG((png_bytep buf, png_uint_32 i)); - -#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) -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 */ PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)); @@ -1,9 +1,9 @@ /* 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 - * 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.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 - * iTXt is supported. It is turned off by default, to support old apps - * that malloc the png_text structure instead of calling png_set_text() - * and letting libpng malloc it. It will be turned on by default in - * libpng-1.3.0. + * iTXt support was added. iTXt support was turned off by default through + * libpng-1.2.x, to support old apps that malloc the png_text structure + * instead of calling png_set_text() and letting libpng malloc it. It + * 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) -# define PNG_NO_READ_iTXt +# define PNG_READ_iTXt # endif # if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt) -# define PNG_NO_WRITE_iTXt +# define PNG_WRITE_iTXt # endif #endif @@ -585,11 +589,13 @@ # endif #endif +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) /* Deprecated, will be removed from version 2.0.0. Use PNG_MNG_FEATURES_SUPPORTED instead. */ #ifndef PNG_NO_READ_EMPTY_PLTE # define PNG_READ_EMPTY_PLTE_SUPPORTED #endif +#endif #endif /* PNG_READ_SUPPORTED */ @@ -633,11 +639,15 @@ # endif #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 encoders, but can cause trouble if left undefined */ +#endif #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ + !defined(PNG_WRITE_WEIGHTED_FILTER) && \ defined(PNG_FLOATING_POINT_SUPPORTED) # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED #endif @@ -646,10 +656,12 @@ # define PNG_WRITE_FLUSH_SUPPORTED #endif +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) /* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */ #ifndef PNG_NO_WRITE_EMPTY_PLTE # define PNG_WRITE_EMPTY_PLTE_SUPPORTED #endif +#endif #endif /* PNG_WRITE_SUPPORTED */ diff --git a/pngerror.c b/pngerror.c index 6fa401237..bdad7c7c8 100644 --- a/pngerror.c +++ b/pngerror.c @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,6 +16,7 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) static void /* PRIVATE */ png_default_error PNGARG((png_structp png_ptr, 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 /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/pnggccrd.c b/pnggccrd.c index 248e1b3bb..db5e57129 100644 --- a/pnggccrd.c +++ b/pnggccrd.c @@ -6,9 +6,9 @@ * and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm * 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * Copyright (c) 1998, Intel Corporation * * Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998. @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ @@ -11,6 +11,8 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + png_uint_32 PNGAPI 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_1_0_X */ +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -17,6 +17,8 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + /* Borland DOS special memory handler */ #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) /* 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); } #endif /* PNG_USER_MEM_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/pngpread.c b/pngpread.c index 8c35faae4..85ab9635f 100644 --- a/pngpread.c +++ b/pngpread.c @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -14,6 +14,8 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) + /* Create a PNG structure for reading, and allocate any memory needed. */ png_structp PNGAPI 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); } +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) /* Initialize PNG structure for reading, and allocate any memory needed. This interface is deprecated in favour of the png_create_read_struct(), - and it will eventually disappear. */ -#if defined(PNG_1_0_X) || defined (PNG_1_2_X) + and it will disappear as of libpng-1.3.0. */ #undef png_read_init void PNGAPI 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 */ png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0); } -#endif void PNGAPI 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); } +#endif /* PNG_1_0_X || PNG_1_2_X */ void PNGAPI 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 * 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 @@ -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 * 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 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; } -#endif +#endif /* PNG_INFO_IMAGE_SUPPORTED */ #endif /* PNG_NO_SEQUENTIAL_READ_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED */ @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -18,6 +18,8 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) + /* Read the data from whatever input you are using. The default routine reads from a file pointer. Note that this routine sometimes gets called 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; #endif } +#endif /* PNG_READ_SUPPORTED */ diff --git a/pngrtran.c b/pngrtran.c index e1d6e3ce3..c17c0dfc4 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,6 +16,8 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) + /* Set the action on getting a CRC error for an ancillary or critical chunk. */ void PNGAPI 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); } - 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); #if defined(PNG_READ_BACKGROUND_SUPPORTED) @@ -3906,210 +3909,208 @@ void /* PRIVATE */ png_build_gamma_table(png_structp png_ptr) { 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) - g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - else - g = 1.0; + if (png_ptr->screen_gamma > .000001) + g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); + else + g = 1.0; - png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); + png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr, + (png_uint_32)256); - for (i = 0; i < 256; i++) - { - png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } + for (i = 0; i < 256; i++) + { + png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0, + g) * 255.0 + .5); + } #if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY)) - { + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + 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_uint_32)256); + png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr, + (png_uint_32)256); - for (i = 0; i < 256; i++) - { - png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } + for (i = 0; i < 256; i++) + { + png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0, + g) * 255.0 + .5); + } - png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); + png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr, + (png_uint_32)256); - if(png_ptr->screen_gamma > 0.000001) - g = 1.0 / png_ptr->screen_gamma; - else - g = png_ptr->gamma; /* probably doing rgb_to_gray */ + if(png_ptr->screen_gamma > 0.000001) + g = 1.0 / png_ptr->screen_gamma; + else + g = png_ptr->gamma; /* probably doing rgb_to_gray */ - for (i = 0; i < 256; i++) - { - png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); + for (i = 0; i < 256; i++) + { + png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0, + g) * 255.0 + .5); - } - } + } + } #endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ - } - else - { - double g; - int i, j, shift, num; - int sig_bit; - png_uint_32 ig; + } + else + { + double g; + int i, j, shift, num; + int sig_bit; + png_uint_32 ig; - if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit = (int)png_ptr->sig_bit.red; - if ((int)png_ptr->sig_bit.green > sig_bit) - sig_bit = png_ptr->sig_bit.green; - if ((int)png_ptr->sig_bit.blue > sig_bit) - sig_bit = png_ptr->sig_bit.blue; - } - else - { - sig_bit = (int)png_ptr->sig_bit.gray; - } + if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit = (int)png_ptr->sig_bit.red; + if ((int)png_ptr->sig_bit.green > sig_bit) + sig_bit = png_ptr->sig_bit.green; + if ((int)png_ptr->sig_bit.blue > sig_bit) + sig_bit = png_ptr->sig_bit.blue; + } + else + { + sig_bit = (int)png_ptr->sig_bit.gray; + } - if (sig_bit > 0) - shift = 16 - sig_bit; - else - shift = 0; + if (sig_bit > 0) + shift = 16 - sig_bit; + else + shift = 0; - if (png_ptr->transformations & PNG_16_TO_8) - { - if (shift < (16 - PNG_MAX_GAMMA_8)) - shift = (16 - PNG_MAX_GAMMA_8); - } + if (png_ptr->transformations & PNG_16_TO_8) + { + if (shift < (16 - PNG_MAX_GAMMA_8)) + shift = (16 - PNG_MAX_GAMMA_8); + } - if (shift > 8) - shift = 8; - if (shift < 0) - shift = 0; + if (shift > 8) + shift = 8; + if (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) - g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - else - g = 1.0; + if (png_ptr->screen_gamma > .000001) + g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); + else + g = 1.0; - png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr, - (png_uint_32)(num * png_sizeof (png_uint_16p))); + png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr, + (png_uint_32)(num * png_sizeof (png_uint_16p))); - if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) - { - double fin, fout; - png_uint_32 last, max; + if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) + { + double fin, fout; + png_uint_32 last, max; - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * png_sizeof (png_uint_16))); - } + for (i = 0; i < num; i++) + { + png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(256 * png_sizeof (png_uint_16))); + } - g = 1.0 / g; - last = 0; - for (i = 0; i < 256; i++) - { - fout = ((double)i + 0.5) / 256.0; - fin = pow(fout, g); - max = (png_uint_32)(fin * (double)((png_uint_32)num << 8)); - while (last <= max) - { - png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] - [(int)(last >> (8 - shift))] = (png_uint_16)( - (png_uint_16)i | ((png_uint_16)i << 8)); - last++; - } - } - while (last < ((png_uint_32)num << 8)) - { - png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] - [(int)(last >> (8 - shift))] = (png_uint_16)65535L; - last++; - } - } - else - { - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * png_sizeof (png_uint_16))); + g = 1.0 / g; + last = 0; + for (i = 0; i < 256; i++) + { + fout = ((double)i + 0.5) / 256.0; + fin = pow(fout, g); + max = (png_uint_32)(fin * (double)((png_uint_32)num << 8)); + while (last <= max) + { + png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] + [(int)(last >> (8 - shift))] = (png_uint_16)( + (png_uint_16)i | ((png_uint_16)i << 8)); + last++; + } + } + while (last < ((png_uint_32)num << 8)) + { + png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] + [(int)(last >> (8 - shift))] = (png_uint_16)65535L; + last++; + } + } + else + { + for (i = 0; i < num; i++) + { + png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(256 * png_sizeof (png_uint_16))); - ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_table[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - } + ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4); + for (j = 0; j < 256; j++) + { + png_ptr->gamma_16_table[i][j] = + (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / + 65535.0, g) * 65535.0 + .5); + } + } + } #if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY)) - { + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + 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_uint_32)(num * png_sizeof (png_uint_16p ))); + png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr, + (png_uint_32)(num * png_sizeof (png_uint_16p ))); - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * png_sizeof (png_uint_16))); + for (i = 0; i < num; i++) + { + png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(256 * png_sizeof (png_uint_16))); - ig = (((png_uint_32)i * - (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_to_1[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } + ig = (((png_uint_32)i * + (png_uint_32)png_gamma_shift[shift]) >> 4); + for (j = 0; j < 256; j++) + { + png_ptr->gamma_16_to_1[i][j] = + (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / + 65535.0, g) * 65535.0 + .5); + } + } - if(png_ptr->screen_gamma > 0.000001) - g = 1.0 / png_ptr->screen_gamma; - else - g = png_ptr->gamma; /* probably doing rgb_to_gray */ + if(png_ptr->screen_gamma > 0.000001) + g = 1.0 / png_ptr->screen_gamma; + else + g = png_ptr->gamma; /* probably doing rgb_to_gray */ - png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr, - (png_uint_32)(num * png_sizeof (png_uint_16p))); + png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr, + (png_uint_32)(num * png_sizeof (png_uint_16p))); - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * png_sizeof (png_uint_16))); + for (i = 0; i < num; i++) + { + png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(256 * png_sizeof (png_uint_16))); - ig = (((png_uint_32)i * - (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_from_1[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - } + ig = (((png_uint_32)i * + (png_uint_32)png_gamma_shift[shift]) >> 4); + for (j = 0; j < 256; j++) + { + png_ptr->gamma_16_from_1[i][j] = + (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / + 65535.0, g) * 65535.0 + .5); + } + } + } #endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ - } - } + } } #endif /* 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_READ_SUPPORTED */ diff --git a/pngrutil.c b/pngrutil.c index 99e466f18..9c434e0fd 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,8 +1,8 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -13,6 +13,8 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) + #if defined(_WIN32_WCE) /* strtod() function is not supported on WindowsCE */ # ifdef PNG_FLOATING_POINT_SUPPORTED @@ -37,7 +39,7 @@ __inline double strtod(const char *nptr, char **endptr) # endif #endif -png_uint_32 /* PRIVATE */ +png_uint_32 PNGAPI png_get_uint_31(png_structp png_ptr, png_bytep 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 /* 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_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 * 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. */ -png_int_32 /* PRIVATE */ +png_int_32 PNGAPI png_get_int_32(png_bytep buf) { 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 */ /* 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_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; } - 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 / 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 (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; @@ -3122,3 +3125,4 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) png_ptr->flags |= PNG_FLAG_ROW_INIT; } +#endif /* PNG_READ_SUPPORTED */ @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -16,6 +16,8 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + #if defined(PNG_bKGD_SUPPORTED) void PNGAPI 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"); return; } +#ifdef PNG_FLOATING_POINT_SUPPORTED if (white_x > (double) PNG_UINT_31_MAX || white_y > (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 || blue_x > (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, "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"); if (png_ptr == NULL || info_ptr == NULL) 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, - "Palette size 0, hIST allocation skipped."); + "Invalid palette size, hIST allocation skipped."); return; } #ifdef PNG_FREE_ME_SUPPORTED png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); #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_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) { 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) 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; * 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); #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. */ png_ptr->palette = (png_colorp)png_malloc(png_ptr, - 256 * png_sizeof(png_color)); - png_memset(png_ptr->palette, 0, 256 * png_sizeof(png_color)); + PNG_MAX_PALETTE_LENGTH * 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)); info_ptr->palette = png_ptr->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 png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); #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_uint_32)256); - png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans); + (png_uint_32)PNG_MAX_PALETTE_LENGTH); + if (num_trans <= PNG_MAX_PALETTE_LENGTH) + png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans); #ifdef PNG_FREE_ME_SUPPORTED info_ptr->free_me |= PNG_FREE_TRNS; #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_1_0_X */ +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -1551,4 +1551,4 @@ main(int argc, char *argv[]) } /* 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; diff --git a/pngtrans.c b/pngtrans.c index 9003a2109..fcb13cc9f 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ @@ -11,6 +11,7 @@ #define PNG_INTERNAL #include "png.h" +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) /* turn on BGR-to-RGB mapping */ void PNGAPI @@ -648,3 +649,4 @@ png_get_user_transform_ptr(png_structp png_ptr) return (NULL); #endif } +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ @@ -2,9 +2,9 @@ * * 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * Copyright (c) 1998, Intel Corporation * * Contributed by Nirav Chhatrapati, Intel Corporation, 1998 @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/pngwrite.c b/pngwrite.c index 3246fdaaf..11e4e3e10 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ @@ -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 */ +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) +/* Deprecated. */ #undef png_write_init void PNGAPI 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); } +#endif /* PNG_1_0_X || PNG_1_2_X */ void PNGAPI diff --git a/pngwtran.c b/pngwtran.c index f1c8b3e62..5141f7bfd 100644 --- a/pngwtran.c +++ b/pngwtran.c @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ @@ -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_ptr->shift)); #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 (png_ptr->transformations & PNG_SWAP_ALPHA) png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); #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 (png_ptr->transformations & PNG_BGR) 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; for (i = 0, sp = dp = row; i < row_width; i++) { + /* does nothing *(dp++) = *(sp++); *(dp++) = *(sp++); *(dp++) = *(sp++); + */ + sp+=3; dp = 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++) { + /* does nothing *(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++)); } @@ -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++) { + /* does nothing *(dp++) = *(sp++); *(dp++) = *(sp++); + */ + sp+=2; dp = sp; *(dp++) = (png_byte)(255 - *(sp++)); *(dp++) = (png_byte)(255 - *(sp++)); } diff --git a/pngwutil.c b/pngwutil.c index dd7b150b7..a1ccde355 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1,9 +1,9 @@ /* 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 - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2006 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ @@ -16,7 +16,7 @@ * with unsigned numbers for convenience, although one supported * ancillary chunk uses signed (two's complement) numbers. */ -void /* PRIVATE */ +void PNGAPI png_save_uint_32(png_bytep buf, png_uint_32 i) { 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 * 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) { 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, * just to avoid potential problems on pre-ANSI C compilers. */ -void /* PRIVATE */ +void PNGAPI png_save_uint_16(png_bytep buf, unsigned int i) { buf[0] = (png_byte)((i >> 8) & 0xff); @@ -161,9 +161,11 @@ png_text_compress(png_structp png_ptr, { 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->input = NULL; + comp->input_len = 0; /* we may just want to pass the text right through */ 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; 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, &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"); + 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) { 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"); + 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) { 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 png_size_t total_len; char wbuf[32], hbuf[32]; - png_byte bunit = unit; + png_byte bunit = (png_byte)unit; png_debug(1, "in png_write_sCAL\n"); diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in index b2c6a332e..ff3d9b99e 100755 --- a/scripts/libpng-config-head.in +++ b/scripts/libpng-config-head.in @@ -8,7 +8,7 @@ # Modeled after libxml-config. -version=1.2.8 +version=1.2.9beta1 prefix="" libdir="" libs="" diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in index f164c4137..54cc7e220 100644 --- a/scripts/libpng.pc.in +++ b/scripts/libpng.pc.in @@ -6,6 +6,6 @@ includedir=${exec_prefix}/include Name: libpng12 Description: Loads and saves PNG files -Version: 1.2.8 +Version: 1.2.9beta1 Libs: -L${libdir} -lpng12 -lz -lm Cflags: -I${includedir}/libpng12 diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu index a70c1a1ab..7b0506e55 100644 --- a/scripts/makefile.32sunu +++ b/scripts/makefile.32sunu @@ -33,7 +33,7 @@ RANLIB=echo LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) INCPATH=$(prefix)/include @@ -111,9 +111,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL) $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \ -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -libpng.so.3.$(PNGMIN): $(OBJS) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) $(OBJSDLL) +libpng.so.0.$(PNGMIN): $(OBJS) + $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.0 \ + -o libpng.so.0.$(PNGMIN) $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so $(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) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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.$(PNGVER)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGVER)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ + ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -f -s libpng.so.0 libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi @@ -207,7 +207,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu index 4b3360ad3..91de9166e 100644 --- a/scripts/makefile.64sunu +++ b/scripts/makefile.64sunu @@ -33,7 +33,7 @@ RANLIB=echo LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) INCPATH=$(prefix)/include @@ -111,9 +111,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL) $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \ -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) $(OBJSDLL) +libpng.so.0.$(PNGMIN): $(OBJSDLL) + $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.0 \ + -o libpng.so.0.$(PNGMIN) $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so $(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) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(PNGMIN) -@if [ ! -d $(DL) ]; then mkdir $(DL); fi -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ).$(PNGVER)* -@/bin/rm -f $(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.$(PNGVER)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGVER)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ + ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -f -s libpng.so.0 libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi @@ -208,7 +208,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/makefile.aix b/scripts/makefile.aix index 93aec12b6..161dbaccb 100644 --- a/scripts/makefile.aix +++ b/scripts/makefile.aix @@ -18,7 +18,7 @@ RM = rm -f LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) prefix=/usr/local diff --git a/scripts/makefile.bc32 b/scripts/makefile.bc32 index 90b178bc7..04407dd17 100644 --- a/scripts/makefile.bc32 +++ b/scripts/makefile.bc32 @@ -17,14 +17,14 @@ CC=bcc32 LD=bcc32 LIB=tlib -#TARGET_CPU=6 -# 3 = 386, 4 = 486, 5 = Pentium etc. +# -3 = 386, -4 = 486, -5 = Pentium etc. !ifndef TARGET_CPU -TARGET_CPU=5 +#TARGET_CPU=-6 !endif # 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 CDEBUG=-v @@ -40,14 +40,14 @@ CDEBUG=$(CDEBUG) -N LDEBUG=$(LDEBUG) -N !endif -# -X- turn on dependency generation in the object file -# -w set all warnings on # -O2 optimize for speed -# -Z global optimization -CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(CDEBUG) +# -d merge duplicate strings +# -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 -LDFLAGS=-M -L$(ZLIB_DIR) $(LDEBUG) +LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG) ## Variables @@ -138,14 +138,15 @@ $(LIBOBJS), libpng | -# Clean up anything else you want +# Cleanup clean: -del *.obj - -del *.exe - -del *.lib + -del $(LIBNAME) + -del pngtest.exe -del *.lst -del *.map -del *.tds + -del pngout.png # End of makefile for libpng diff --git a/scripts/makefile.beos b/scripts/makefile.beos index 98ace87c5..50bc54b4c 100644 --- a/scripts/makefile.beos +++ b/scripts/makefile.beos @@ -12,7 +12,7 @@ ZLIBLIB=/usr/local/lib ZLIBINC=/usr/local/include PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) ALIGN= @@ -93,9 +93,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL) $(CC) -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o \ $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(CC) -nostart -Wl,-soname,libpng.so.3 -o \ - libpng.so.3.$(PNGMIN) $(OBJSDLL) +libpng.so.0.$(PNGMIN): $(OBJSDLL) + $(CC) -nostart -Wl,-soname,libpng.so.0 -o \ + libpng.so.0.$(PNGMIN) $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so $(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) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ + ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -sf libpng.so.0 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 @@ -187,7 +187,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtesti \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin index 09f92d3ea..226204aa8 100644 --- a/scripts/makefile.cygwin +++ b/scripts/makefile.cygwin @@ -79,7 +79,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ LIBNAME = libpng12 PNGMAJ = 0 CYGDLL = 12 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) SHAREDLIB=cygpng$(CYGDLL).dll @@ -176,7 +176,7 @@ $(STATLIB): $(OBJS) ar rc $@ $(OBJS) $(RANLIB) $@ -$(SHAREDDEF): scripts/png32ms.def +$(SHAREDDEF): scripts/pngw32.def cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \ sed -e 's/\([^;]*\);/;/' > $@ diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin index 1a1f988d2..5d54389c6 100644 --- a/scripts/makefile.darwin +++ b/scripts/makefile.darwin @@ -23,7 +23,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz RANLIB=ranlib PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 diff --git a/scripts/makefile.dec b/scripts/makefile.dec index f8482f98f..1a757fe49 100644 --- a/scripts/makefile.dec +++ b/scripts/makefile.dec @@ -32,7 +32,7 @@ ZLIBLIB=../zlib ZLIBINC=../zlib PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -76,9 +76,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJS) $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ -soname $(LIBNAME).so.$(PNGMAJ) -libpng.so.3.$(PNGMIN): $(OBJS) +libpng.so.0.$(PNGMIN): $(OBJS) $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ - -soname libpng.so.3 + -soname libpng.so.0 pngtest: pngtest.o libpng.a $(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) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ + ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -f -s libpng.so.0 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 @@ -172,7 +172,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/scripts/makefile.elf b/scripts/makefile.elf deleted file mode 100644 index a04b497a0..000000000 --- a/scripts/makefile.elf +++ /dev/null @@ -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 diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx index c46c2218e..5c4ae571a 100644 --- a/scripts/makefile.gcmmx +++ b/scripts/makefile.gcmmx @@ -15,7 +15,7 @@ LIBNAME = libpng12 PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) CC=gcc @@ -129,9 +129,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL) -o $(LIBNAME).so.$(PNGVER) \ $(OBJSDLL) -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(CC) -shared -Wl,-soname,libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) \ +libpng.so.0.$(PNGMIN): $(OBJSDLL) + $(CC) -shared -Wl,-soname,libpng.so.0 \ + -o libpng.so.0.$(PNGMIN) \ $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so @@ -167,20 +167,20 @@ install-static: install-headers libpng.a (cd $(DL); ln -sf $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ + ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -sf libpng.so.0 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 @@ -234,7 +234,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/makefile.hp64 b/scripts/makefile.hp64 index e860e37be..f6e4557a0 100644 --- a/scripts/makefile.hp64 +++ b/scripts/makefile.hp64 @@ -27,7 +27,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm RANLIB=ranlib PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc index d12d6cd69..0c0f732fa 100644 --- a/scripts/makefile.hpgcc +++ b/scripts/makefile.hpgcc @@ -41,7 +41,7 @@ RANLIB=ranlib #RANLIB=echo PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux index 47b5c2632..33692ae25 100644 --- a/scripts/makefile.hpux +++ b/scripts/makefile.hpux @@ -24,7 +24,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm RANLIB=ranlib PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 diff --git a/scripts/makefile.linux b/scripts/makefile.linux index 9ba553b6a..d133832f0 100644 --- a/scripts/makefile.linux +++ b/scripts/makefile.linux @@ -5,7 +5,7 @@ LIBNAME = libpng12 PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) CC=gcc @@ -101,9 +101,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL) -o $(LIBNAME).so.$(PNGVER) \ $(OBJSDLL) -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(CC) -shared -Wl,-soname,libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) \ +libpng.so.0.$(PNGMIN): $(OBJSDLL) + $(CC) -shared -Wl,-soname,libpng.so.0 \ + -o libpng.so.0.$(PNGMIN) \ $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so @@ -139,20 +139,20 @@ install-static: install-headers libpng.a (cd $(DL); ln -sf $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ + ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -sf libpng.so.0 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 @@ -206,7 +206,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd index 17d317bdc..3e043d7ce 100644 --- a/scripts/makefile.ne12bsd +++ b/scripts/makefile.ne12bsd @@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng12 LIB= png12 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 \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd index 52fa3397e..a596b71a2 100644 --- a/scripts/makefile.netbsd +++ b/scripts/makefile.netbsd @@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng LIB= png 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 \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd index 5d401a32d..9ecf96205 100644 --- a/scripts/makefile.openbsd +++ b/scripts/makefile.openbsd @@ -7,7 +7,7 @@ LIBDIR= ${PREFIX}/lib MANDIR= ${PREFIX}/man/cat SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.2.8 +SHLIB_MINOR= 1.2.9beta1 LIB= png SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \ diff --git a/scripts/makefile.sco b/scripts/makefile.sco index f3642317f..eec12961f 100644 --- a/scripts/makefile.sco +++ b/scripts/makefile.sco @@ -24,7 +24,7 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm RANLIB=echo PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -88,8 +88,8 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL) $(CC) -G -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \ $(OBJSDLL) -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(CC) -G -Wl,-h,libpng.so.3 -o libpng.so.3.$(PNGMIN) \ +libpng.so.0.$(PNGMIN): $(OBJSDLL) + $(CC) -G -Wl,-h,libpng.so.0 -o libpng.so.0.$(PNGMIN) \ $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so @@ -117,20 +117,20 @@ install-static: install-headers libpng.a (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ + ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -f -s libpng.so.0 libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi @@ -184,7 +184,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc index 5010daa9d..64ef06e05 100644 --- a/scripts/makefile.sggcc +++ b/scripts/makefile.sggcc @@ -18,7 +18,7 @@ ZLIBINC=../zlib LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) CC=gcc @@ -31,7 +31,7 @@ CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ -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 # See "man dso" for info about shared objects @@ -96,7 +96,7 @@ $(LIBNAME).so.$(PNGVER): $(OBJS) $(LDSHARED) -o $@ $(OBJS) rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) -libpng.so.3.$(PNGMIN): $(OBJS) +libpng.so.0.$(PNGMIN): $(OBJS) $(LDLEGACY) -o $@ $(OBJS) pngtest: pngtest.o libpng.a @@ -124,20 +124,20 @@ install-static: install-headers libpng.a (cd $(DL); ln -sf $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ + ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -sf libpng.so.0 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 @@ -195,7 +195,7 @@ test-installed: clean: rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ so_locations DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi index 584da7cca..418621b6a 100644 --- a/scripts/makefile.sgi +++ b/scripts/makefile.sgi @@ -5,7 +5,7 @@ LIBNAME=libpng12 PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) # 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 LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ -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 # See "man dso" for info about shared objects @@ -102,7 +102,7 @@ $(LIBNAME).so.$(PNGVER): $(OBJS) $(LDSHARED) -o $@ $(OBJS) rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) -libpng.so.3.$(PNGMIN): $(OBJS) +libpng.so.0.$(PNGMIN): $(OBJS) $(LDLEGACY) -o $@ $(OBJS) pngtest: pngtest.o libpng.a @@ -130,20 +130,20 @@ install-static: install-headers libpng.a (cd $(DL); ln -sf $(LIBNAME).a libpng.a) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ + ln -sf libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -sf libpng.so.0 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 @@ -201,7 +201,7 @@ test-installed: clean: rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ so_locations DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/makefile.so9 b/scripts/makefile.so9 index a53a80dfd..75fa4d8a4 100644 --- a/scripts/makefile.so9 +++ b/scripts/makefile.so9 @@ -34,7 +34,7 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm RANLIB=echo PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -110,9 +110,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL) $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -libpng.so.3.$(PNGMIN): $(OBJS) - $(LD) -G -h libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) $(OBJSDLL) +libpng.so.0.$(PNGMIN): $(OBJS) + $(LD) -G -h libpng.so.0 \ + -o libpng.so.0.$(PNGMIN) $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so $(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) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ + ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -f -s libpng.so.0 libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi @@ -206,7 +206,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris index 8e053f8aa..51e01818e 100644 --- a/scripts/makefile.solaris +++ b/scripts/makefile.solaris @@ -30,7 +30,7 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm RANLIB=echo PNGMAJ = 0 -PNGMIN = 1.2.8 +PNGMIN = 1.2.9beta1 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng12 @@ -107,9 +107,9 @@ $(LIBNAME).so.$(PNGVER): $(OBJSDLL) $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) -libpng.so.3.$(PNGMIN): $(OBJS) - $(LD) -G -h libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) $(OBJSDLL) +libpng.so.0.$(PNGMIN): $(OBJS) + $(LD) -G -h libpng.so.0 \ + -o libpng.so.0.$(PNGMIN) $(OBJSDLL) pngtest: pngtest.o $(LIBNAME).so $(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) install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) + libpng.so.0.$(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)* + -@/bin/rm -f $(DL)/libpng.so.0 + -@/bin/rm -f $(DL)/libpng.so.0.$(PNGMIN)* 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)/libpng.so.3.$(PNGMIN) + chmod 755 $(DL)/libpng.so.0.$(PNGMIN) (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ + ln -f -s libpng.so.0.$(PNGMIN) libpng.so.0; \ + ln -f -s libpng.so.0 libpng.so; \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \ ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)) -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi @@ -203,7 +203,7 @@ test-installed: clean: /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ + libpng.so.0.$(PNGMIN) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO diff --git a/scripts/pngos2.def b/scripts/pngos2.def index 9aa61351f..b325ada11 100644 --- a/scripts/pngos2.def +++ b/scripts/pngos2.def @@ -2,7 +2,7 @@ ; PNG.LIB module definition file for OS/2 ;---------------------------------------- -; Version 1.2.8 +; Version 1.2.9beta1 LIBRARY PNG DESCRIPTION "PNG image compression library for OS/2" @@ -213,6 +213,15 @@ EXPORTS ; Added at version 1.2.7 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 png_libpng_ver png_pass_start diff --git a/scripts/pngw32.def b/scripts/pngw32.def index 8303bfeb7..438cc16cd 100644 --- a/scripts/pngw32.def +++ b/scripts/pngw32.def @@ -5,7 +5,7 @@ LIBRARY EXPORTS -;Version 1.2.8 +;Version 1.2.9beta1 png_build_grayscale_palette @1 png_check_sig @2 png_chunk_error @3 @@ -184,7 +184,7 @@ EXPORTS png_convert_to_rfc1123 @172 png_set_invalid @173 ; 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_read_init_3 @175 png_write_init_3 @176 |