diff --git a/ANNOUNCE b/ANNOUNCE index 37f1cafec..0705920ee 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.4.0beta96 - November 12, 2009 +Libpng 1.4.0beta97 - November 12, 2009 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. @@ -9,20 +9,20 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - 1.4.0beta96.tar.xz (LZMA-compressed, recommended) - 1.4.0beta96.tar.gz - 1.4.0beta96.tar.bz2 + 1.4.0beta97.tar.xz (LZMA-compressed, recommended) + 1.4.0beta97.tar.gz + 1.4.0beta97.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lp140b96.zip - lp140b96.7z + lp140b97.zip + lp140b97.7z Other information: - 1.4.0beta96-README.txt - 1.4.0beta96-LICENSE.txt + 1.4.0beta97-README.txt + 1.4.0beta97-LICENSE.txt Changes since the last public release (1.2.10): diff --git a/CMakeLists.txt b/CMakeLists.txt index f58c54a88..d59d42000 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,7 +203,7 @@ configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in # SET UP LINKS if(PNG_SHARED) set_target_properties(${PNG_LIB_NAME} PROPERTIES -# VERSION 14.${PNGLIB_RELEASE}.1.4.0beta96 +# VERSION 14.${PNGLIB_RELEASE}.1.4.0beta97 VERSION 14.${PNGLIB_RELEASE}.0 SOVERSION 14 CLEAN_DIRECT_OUTPUT 1) diff --git a/INSTALL b/INSTALL index 04bee5414..a49e22747 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ -Installing libpng version 1.4.0beta96 - November 12, 2009 +Installing libpng version 1.4.0beta97 - November 12, 2009 On Unix/Linux and similar systems, you can simply type @@ -43,7 +43,7 @@ to have access to the 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.4.0beta96" or "lpng109" and "zlib-1.2.1" +might be called "libpng-1.4.0beta97" 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: @@ -94,14 +94,14 @@ include CMakeLists.txt => "cmake" script makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.elf => Linux/ELF makefile symbol versioning, - gcc, creates libpng14.so.14.1.4.0beta96) + gcc, creates libpng14.so.14.1.4.0beta97) makefile.linux => Linux/ELF makefile - (gcc, creates libpng14.so.14.1.4.0beta96) + (gcc, creates libpng14.so.14.1.4.0beta97) makefile.gcmmx => Linux/ELF makefile - (gcc, creates libpng14.so.14.1.4.0beta96, + (gcc, creates libpng14.so.14.1.4.0beta97, uses assembler code tuned for Intel MMX platform) makefile.nommx => Linux/ELF makefile - (gcc, creates libpng14.so.14.1.4.0beta96 + (gcc, creates libpng14.so.14.1.4.0beta97 does not use Intel MMX assembler code) makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.knr => Archaic UNIX Makefile that converts files with @@ -124,12 +124,12 @@ include makefile.openbsd => OpenBSD makefile makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) makefile.sggcc => Silicon Graphics (gcc, - creates libpng14.so.14.1.4.0beta96) + creates libpng14.so.14.1.4.0beta97) makefile.sunos => Sun makefile makefile.solaris => Solaris 2.X makefile (gcc, - creates libpng14.so.14.1.4.0beta96) + creates libpng14.so.14.1.4.0beta97) makefile.so9 => Solaris 9 makefile (gcc, - creates libpng14.so.14.1.4.0beta96) + creates libpng14.so.14.1.4.0beta97) 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 diff --git a/LICENSE b/LICENSE index bc56a19ce..331a5ef42 100644 --- a/LICENSE +++ b/LICENSE @@ -10,7 +10,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.4.0beta96, November 12, 2009, are +libpng versions 1.2.6, August 15, 2004, through 1.4.0beta97, November 12, 2009, are Copyright (c) 2004, 2006-2007 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 diff --git a/Makefile.am b/Makefile.am index 272db6e4a..e4041862e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -88,7 +88,7 @@ EXTRA_DIST= \ ${srcdir}/contrib/pngsuite/* \ ${srcdir}/contrib/visupng/* \ $(TESTS) \ - example.c libpng-1.4.0beta96.txt pngvcrd.c + example.c libpng-1.4.0beta97.txt pngvcrd.c CLEANFILES= pngout.png libpng14.pc libpng14-config libpng.vers \ libpng.sym diff --git a/Makefile.in b/Makefile.in index c96b668fb..b8a160ac8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -352,7 +352,7 @@ EXTRA_DIST = \ ${srcdir}/contrib/pngsuite/* \ ${srcdir}/contrib/visupng/* \ $(TESTS) \ - example.c libpng-1.4.0beta96.txt pngvcrd.c + example.c libpng-1.4.0beta97.txt pngvcrd.c CLEANFILES = pngout.png libpng14.pc libpng14-config libpng.vers \ libpng.sym diff --git a/README b/README index 45353f934..8626a7f97 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README for libpng version 1.4.0beta96 - November 12, 2009 (shared library 14.0) +README for libpng version 1.4.0beta97 - November 12, 2009 (shared library 14.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. @@ -184,11 +184,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 libpng14.so.14.1.4.0beta96) + gcc, creates libpng14.so.14.1.4.0beta97) makefile.linux => Linux/ELF makefile - (gcc, creates libpng14.so.14.1.4.0beta96) + (gcc, creates libpng14.so.14.1.4.0beta97) makefile.gcmmx => Linux/ELF makefile - (gcc, creates libpng14.so.14.1.4.0beta96, + (gcc, creates libpng14.so.14.1.4.0beta97, 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 @@ -209,12 +209,12 @@ Files in this distribution: makefile.openbsd => OpenBSD makefile makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) makefile.sggcc => Silicon Graphics - (gcc, creates libpng14.so.14.1.4.0beta96) + (gcc, creates libpng14.so.14.1.4.0beta97) makefile.sunos => Sun makefile makefile.solaris => Solaris 2.X makefile - (gcc, creates libpng14.so.14.1.4.0beta96) + (gcc, creates libpng14.so.14.1.4.0beta97) makefile.so9 => Solaris 9 makefile - (gcc, creates libpng14.so.14.1.4.0beta96) + (gcc, creates libpng14.so.14.1.4.0beta97) 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 diff --git a/configure b/configure index 93c2d5f9c..edfc4033d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for libpng 1.4.0beta96. +# Generated by GNU Autoconf 2.64 for libpng 1.4.0beta97. # # Report bugs to . # @@ -698,8 +698,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libpng' PACKAGE_TARNAME='libpng' -PACKAGE_VERSION='1.4.0beta96' -PACKAGE_STRING='libpng 1.4.0beta96' +PACKAGE_VERSION='1.4.0beta97' +PACKAGE_STRING='libpng 1.4.0beta97' PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' PACKAGE_URL='' @@ -1431,7 +1431,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.4.0beta96 to adapt to many kinds of systems. +\`configure' configures libpng 1.4.0beta97 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1501,7 +1501,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpng 1.4.0beta96:";; + short | recursive ) echo "Configuration of libpng 1.4.0beta97:";; esac cat <<\_ACEOF @@ -1608,7 +1608,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libpng configure 1.4.0beta96 +libpng configure 1.4.0beta97 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2033,7 +2033,7 @@ cat >config.log <<_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.4.0beta96, which was +It was created by libpng $as_me 1.4.0beta97, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ @@ -2841,7 +2841,7 @@ fi # Define the identity of the package. PACKAGE='libpng' - VERSION='1.4.0beta96' + VERSION='1.4.0beta97' cat >>confdefs.h <<_ACEOF @@ -2905,7 +2905,7 @@ fi -PNGLIB_VERSION=1.4.0beta96 +PNGLIB_VERSION=1.4.0beta97 PNGLIB_MAJOR=1 PNGLIB_MINOR=4 PNGLIB_RELEASE=0 @@ -12022,7 +12022,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libpng $as_me 1.4.0beta96, which was +This file was extended by libpng $as_me 1.4.0beta97, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12086,7 +12086,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -libpng config.status 1.4.0beta96 +libpng config.status 1.4.0beta97 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 4ee53b26d..0e2dc51e4 100644 --- a/configure.ac +++ b/configure.ac @@ -18,12 +18,12 @@ AC_PREREQ(2.59) dnl Version number stuff here: -AC_INIT([libpng], [1.4.0beta96], [png-mng-implement@lists.sourceforge.net]) +AC_INIT([libpng], [1.4.0beta97], [png-mng-implement@lists.sourceforge.net]) AM_INIT_AUTOMAKE dnl stop configure from automagically running automake AM_MAINTAINER_MODE -PNGLIB_VERSION=1.4.0beta96 +PNGLIB_VERSION=1.4.0beta97 PNGLIB_MAJOR=1 PNGLIB_MINOR=4 PNGLIB_RELEASE=0 diff --git a/libpng-1.4.0beta96.txt b/libpng-1.4.0beta97.txt similarity index 99% rename from libpng-1.4.0beta96.txt rename to libpng-1.4.0beta97.txt index 7a0e5b355..d69ed2aa0 100644 --- a/libpng-1.4.0beta96.txt +++ b/libpng-1.4.0beta97.txt @@ -1,6 +1,6 @@ libpng.txt - A description on how to use and modify libpng - libpng version 1.4.0beta96 - November 12, 2009 + libpng version 1.4.0beta97 - November 12, 2009 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.4.0beta96 - November 12, 2009 + libpng versions 0.97, January 1998, through 1.4.0beta97 - November 12, 2009 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -878,7 +878,7 @@ things. As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was added. It expands the sample depth without changing tRNS to alpha. -As of libpng version 1.4.0beta96, not all possible expansions are supported. +As of libpng version 1.4.0beta97, not all possible expansions are supported. In the following table, the 01 means grayscale with depth<8, 31 means indexed with depth<8, other numerals represent the color type, "T" means @@ -3234,7 +3234,7 @@ 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.4.0beta96 are Y2K compliant. It is my belief that earlier +upward through 1.4.0beta97 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/libpng.3 b/libpng.3 index 5c6da21f3..1672f4b3a 100644 --- a/libpng.3 +++ b/libpng.3 @@ -825,8 +825,8 @@ will need. We assume that libpng is already installed; see the INSTALL file for instructions on how to install libpng. For examples of libpng usage, see the files "example.c", "pngtest.c", -and the files in the "contrib" directory, all of which are included in -the libpng distribution. +and the files in the "contrib" directory, all of which are included in the +libpng distribution. Libpng was written as a companion to the PNG specification, as a way of reducing the amount of time and effort it takes to support the PNG @@ -1243,8 +1243,8 @@ dithering, and setting filler.) If this is the case, simply do this: png_read_png(png_ptr, info_ptr, png_transforms, NULL) -where png_transforms is an integer containing the bitwise OR of some -set of transformation flags. This call is equivalent to png_read_info(), +where png_transforms is an integer containing the bitwise OR of +some set of transformation flags. This call is equivalent to png_read_info(), followed the set of transformations indicated by the transform mask, then png_read_image(), and finally png_read_end(). @@ -1395,8 +1395,8 @@ These are also important, but their validity depends on whether the chunk has been read. The png_get_valid(png_ptr, info_ptr, PNG_INFO_) and png_get_(png_ptr, info_ptr, ...) functions return non-zero if the data has been read, or zero if it is missing. The parameters to the -png_get_ are set directly if they are simple data types, or a -pointer into the info_ptr is returned for any complex types. +png_get_ are set directly if they are simple data types, or a pointer +into the info_ptr is returned for any complex types. png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette); @@ -1742,10 +1742,10 @@ values of the pixels: PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels stored in a PNG image have been "scaled" or "shifted" up to the next -higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] -to 8 bits/sample in the range [0, 255]). However, it is also possible -to convert the PNG pixel data back to the original bit depth of the -image. This call reduces the pixels back down to the original bit depth: +higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to +8 bits/sample in the range [0, 255]). However, it is also possible to +convert the PNG pixel data back to the original bit depth of the image. +This call reduces the pixels back down to the original bit depth: png_color_8p sig_bit; @@ -2158,11 +2158,12 @@ point to libpng-allocated storage with the following function: This function may be safely called when the relevant storage has already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those cases do nothing. -The "seq" parameter is ignored if only one item of the selected data -type, such as PLTE, is allowed. If "seq" is not -1, and multiple items -are allowed for the data type identified in the mask, such as text or -sPLT, only the n'th item in the structure is freed, where n is "seq". +by the user and not by libpng, and will in those +cases do nothing. The "seq" parameter is ignored if only one item +of the selected data type, such as PLTE, is allowed. If "seq" is not +-1, and multiple items are allowed for the data type identified in +the mask, such as text or sPLT, only the n'th item in the structure +is freed, where n is "seq". The default behavior is only to free data that was allocated internally by libpng. This can be changed, so that libpng will not free the data, @@ -2201,8 +2202,8 @@ if you transfer responsibility for free'ing text_ptr from libpng to your application, your application must not separately free those members. The png_free_data() function will turn off the "valid" flag for anything -it frees. If you need to turn the flag off for a chunk that was freed by -your application instead of by libpng, you can use +it frees. If you need to turn the flag off for a chunk that was freed by your +application instead of by libpng, you can use png_set_invalid(png_ptr, info_ptr, mask); mask - identifies the chunks to be made invalid, @@ -2512,8 +2513,8 @@ the filter method, for which the only valid values are 0 (as of the July 1999 PNG specification, version 1.2) or 64 (if you are writing a PNG datastream that is to be embedded in a MNG datastream). The third parameter is a flag that indicates which filter type(s) are to be tested -for each scanline. See the PNG specification for details on the specific -filter types. +for each scanline. See the PNG specification for details on the specific filter +types. /* turn on or off filtering, and/or choose @@ -2931,10 +2932,10 @@ this with a call to png_write_info(). Note that there is one transformation you may need to do before png_write_info(). In PNG files, the alpha channel in an image is the -level of opacity. If your data is supplied as a level of transparency, -you can invert the alpha channel before you write it, so that 0 is -fully transparent and 255 (in 8-bit or paletted images) or 65535 -(in 16-bit images) is fully opaque, with +level of opacity. If your data is supplied as a level of +transparency, you can invert the alpha channel before you write it, so +that 0 is fully transparent and 255 (in 8-bit or paletted images) or +65535 (in 16-bit images) is fully opaque, with png_set_invert_alpha(png_ptr); @@ -3121,13 +3122,14 @@ a single row_pointer instead of an array of row_pointers: png_write_row(png_ptr, row_pointer); -When the file is interlaced, things can get a good deal more complicated. -The only currently (as of the PNG Specification version 1.2, dated July -1999) defined interlacing scheme for PNG files is the "Adam7" interlace -scheme, that breaks down an image into seven smaller images of varying -size. libpng will build these images for you, or you can do them -yourself. If you want to build them yourself, see the PNG specification -for details of which pixels to write when. +When the file is interlaced, things can get a good deal more +complicated. The only currently (as of the PNG Specification +version 1.2, dated July 1999) defined interlacing scheme for PNG files +is the "Adam7" interlace scheme, that breaks down an +image into seven smaller images of varying size. libpng will build +these images for you, or you can do them yourself. If you want to +build them yourself, see the PNG specification for details of which +pixels to write when. If you don't want libpng to handle the interlacing details, just use png_set_interlace_handling() and call png_write_rows() the @@ -3139,17 +3141,17 @@ writing any rows: number_of_passes = png_set_interlace_handling(png_ptr); -This will return the number of passes needed. Currently, this is seven, -but may change if another interlace type is added. +This will return the number of passes needed. Currently, this +is seven, but may change if another interlace type is added. Then write the complete image number_of_passes times. png_write_rows(png_ptr, row_pointers, number_of_rows); -As some of these rows are not used, and thus return immediately, you may -want to read about interlacing in the PNG specification, and only update -the rows that are actually used. +As some of these rows are not used, and thus return immediately, +you may want to read about interlacing in the PNG specification, +and only update the rows that are actually used. .SS Finishing a sequential write @@ -3182,14 +3184,15 @@ point to libpng-allocated storage with the following function: This function may be safely called when the relevant storage has already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those cases do nothing. -The "seq" parameter is ignored if only one item of the selected data -type, such as PLTE, is allowed. If "seq" is not -1, and multiple items -are allowed for the data type identified in the mask, such as text or -sPLT, only the n'th item in the structure is freed, where n is "seq". +by the user and not by libpng, and will in those +cases do nothing. The "seq" parameter is ignored if only one item +of the selected data type, such as PLTE, is allowed. If "seq" is not +-1, and multiple items are allowed for the data type identified in +the mask, such as text or sPLT, only the n'th item in the structure +is freed, where n is "seq". -If you allocated data such as a palette that you passed in to libpng -with png_set_*, you must not free it until just before the call to +If you allocated data such as a palette that you passed +in to libpng with png_set_*, you must not free it until just before the call to png_destroy_write_struct(). The default behavior is only to free data that was allocated internally @@ -3255,18 +3258,16 @@ goes through callbacks that are user-settable. The default routines are in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change these functions, call the appropriate png_set_*_fn() function. -Memory allocation is done through the functions png_malloc(), png_calloc(), -and png_free(). These currently just call the standard C functions. -png_calloc() calls png_malloc() and then png_memset() to clear the newly -allocated memory to zero. If your pointers can't access more then 64K -at a time, you will want to set MAXSEG_64K in zlib.h. Since it is -unlikely that the method of handling memory allocation on a platform -will change between applications, these functions must be modified in -the library at compile time. If you prefer to use a different method -of allocating and freeing data, you can use png_create_read_struct_2() or -png_create_write_struct_2() to register your own functions as described -above. These functions also provide a void pointer that can be retrieved -via +Memory allocation is done through the functions png_malloc() +and png_free(). These currently just call the standard C functions. If +your pointers can't access more then 64K at a time, you will want to set +MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling +memory allocation on a platform will change between applications, these +functions must be modified in the library at compile time. If you prefer +to use a different method of allocating and freeing data, you can use +png_create_read_struct_2() or png_create_write_struct_2() to register +your own functions as described above. +These functions also provide a void pointer that can be retrieved via mem_ptr=png_get_mem_ptr(png_ptr); @@ -3358,10 +3359,10 @@ The motivation behind using setjmp() and longjmp() is the C++ throw and catch exception handling methods. This makes the code much easier to write, as there is no need to check every return code of every function call. However, there are some uncertainties about the status of local variables -after a longjmp, so the user may want to be careful about doing anything -after setjmp returns non-zero besides returning itself. Consult your -compiler documentation for more details. For an alternative approach, you -may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net). +after a longjmp, so the user may want to be careful about doing anything after +setjmp returns non-zero besides returning itself. Consult your compiler +documentation for more details. For an alternative approach, you may wish +to use the "cexcept" facility (see http://cexcept.sourceforge.net). .SS Custom chunks @@ -3373,14 +3374,15 @@ library code itself needs to know about interactions between your chunk and existing `intrinsic' chunks. If you need to write a new intrinsic chunk, first read the PNG -specification. Acquire a first level of understanding of how it works. -Pay particular attention to the sections that describe chunk names, -and look at how other chunks were designed, so you can do things -similarly. Second, check out the sections of libpng that read and -write chunks. Try to find a chunk that is similar to yours and use -it as a template. More details can be found in the comments inside -the code. It is best to handle unknown chunks in a generic method, -via callback functions, instead of by modifying libpng functions. +specification. Acquire a first level of +understanding of how it works. Pay particular attention to the +sections that describe chunk names, and look at how other chunks were +designed, so you can do things similarly. Second, check out the +sections of libpng that read and write chunks. Try to find a chunk +that is similar to yours and use it as a template. More details can +be found in the comments inside the code. It is best to handle unknown +chunks in a generic method, via callback functions, instead of by +modifying libpng functions. If you wish to write your own transformation for the data, look through the part of the code that does the transformations, and check out some of @@ -3557,14 +3559,14 @@ off en masse with compiler directives that define PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, or all four, along with directives to turn on any of the capabilities that you do -want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra -transformations but still leave the library fully capable of reading -and writing PNG files with all known public chunks. Use of the -PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library -that is incapable of reading or writing ancillary chunks. If you are -not using the progressive reading capability, you can turn that off -with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING -capability, which you'll still have). +want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable +the extra transformations but still leave the library fully capable of reading +and writing PNG files with all known public chunks +Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive +produces a library that is incapable of reading or writing ancillary chunks. +If you are not using the progressive reading capability, you can +turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse +this with the INTERLACING capability, which you'll still have). All the reading and writing specific code are in separate files, so the linker should only grab the files it needs. However, if you want to @@ -3809,8 +3811,8 @@ will allocate for reading chunks was added, as a security measure. The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() were added to the library. -We implemented support for I/O states by adding png_ptr member io_state -and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c +We implemented support for I/O states. Added png_ptr member io_state, and +functions png_get_io_chunk_name() and png_get_io_state() in pngget.c The png_calloc() function was added and is used in place of of "png_malloc(); png_memset();" except in the case in png_read_png() @@ -4006,7 +4008,8 @@ when there is only one macro being tested. We do not use the TAB character for indentation in the C sources. -Other rules can be inferred by inspecting the libpng source. +Other rules can be inferred by inspecting the libpng +source. .SH XIII. Y2K Compliance in libpng diff --git a/libpngpf.3 b/libpngpf.3 index 402ed2ebf..ae983e592 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,6 +1,6 @@ .TH LIBPNGPF 3 "November 12, 2009" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta96 +libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta97 (private functions) .SH SYNOPSIS \fB#include \fP diff --git a/png.c b/png.c index bc1e9fd38..fd71e2130 100644 --- a/png.c +++ b/png.c @@ -16,7 +16,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_4_0beta96 Your_png_h_is_not_version_1_4_0beta96; +typedef version_1_4_0beta97 Your_png_h_is_not_version_1_4_0beta97; /* Version information for C files. This had better match the version * string defined in png.h. @@ -547,13 +547,13 @@ png_get_copyright(png_structp png_ptr) #else #ifdef __STDC__ return ((png_charp) PNG_STRING_NEWLINE \ - "libpng version 1.4.0beta96 - November 12, 2009" PNG_STRING_NEWLINE \ + "libpng version 1.4.0beta97 - November 12, 2009" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2009 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE); #else - return ((png_charp) "libpng version 1.4.0beta96 - November 12, 2009\ + return ((png_charp) "libpng version 1.4.0beta97 - November 12, 2009\ Copyright (c) 1998-2009 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."); diff --git a/png.h b/png.h index f66e3bb36..3f6b3de08 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.4.0beta96 - November 12, 2009 + * libpng version 1.4.0beta97 - November 12, 2009 * Copyright (c) 1998-2009 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,7 +11,7 @@ * 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.4.0beta96 - November 12, 2009: Glenn + * libpng versions 0.97, January 1998, through 1.4.0beta97 - November 12, 2009: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -131,7 +131,7 @@ * 1.4.0beta15-36 14 10400 14.so.0.0[.0] * 1.4.0beta37-87 14 10400 14.so.14.0[.0] * 1.4.0rc01 14 10400 14.so.14.0[.0] - * 1.4.0beta88-96 14 10400 14.so.14.0[.0] + * 1.4.0beta88-97 14 10400 14.so.14.0[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -163,7 +163,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.4.0beta96, November 12, 2009, are + * libpng versions 1.2.6, August 15, 2004, through 1.4.0beta97, November 12, 2009, are * Copyright (c) 2004, 2006-2007 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: @@ -281,7 +281,7 @@ * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.4.0beta96 are Y2K compliant. It is my belief that earlier + * upward through 1.4.0beta97 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 @@ -337,9 +337,9 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.4.0beta96" +#define PNG_LIBPNG_VER_STRING "1.4.0beta97" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.4.0beta96 - November 12, 2009\n" + " libpng version 1.4.0beta97 - November 12, 2009\n" #define PNG_LIBPNG_VER_SONUM 14 #define PNG_LIBPNG_VER_DLLNUM 14 @@ -352,7 +352,7 @@ * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ -#define PNG_LIBPNG_VER_BUILD 96 +#define PNG_LIBPNG_VER_BUILD 97 /* Release Status */ #define PNG_LIBPNG_BUILD_ALPHA 1 @@ -1333,7 +1333,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_4_0beta96; +typedef png_structp version_1_4_0beta97; typedef png_struct FAR * FAR * png_structpp; diff --git a/pngconf.h b/pngconf.h index 5c1e28a8f..c7a63bac4 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.4.0beta96 - November 12, 2009 + * libpng version 1.4.0beta97 - November 12, 2009 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2009 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngpriv.h b/pngpriv.h index a1ceb6ca7..4a679a362 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -1,7 +1,7 @@ /* pngpriv.h - private declarations for use inside libpng * - * libpng version 1.4.0beta96 - November 12, 2009 + * libpng version 1.4.0beta97 - November 12, 2009 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2009 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngtest.c b/pngtest.c index 6452521d1..ce5f26bd3 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1619,4 +1619,4 @@ main(int argc, char *argv[]) } /* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_4_0beta96 your_png_h_is_not_version_1_4_0beta96; +typedef version_1_4_0beta97 your_png_h_is_not_version_1_4_0beta97; diff --git a/pngtest.png b/pngtest.png index cfdd36f28..b86459b24 100644 Binary files a/pngtest.png and b/pngtest.png differ diff --git a/projects/xcode/libpng.xcodeproj/project.pbxproj b/projects/xcode/libpng.xcodeproj/project.pbxproj index 5f234ddfb..e51ce0001 100644 --- a/projects/xcode/libpng.xcodeproj/project.pbxproj +++ b/projects/xcode/libpng.xcodeproj/project.pbxproj @@ -226,7 +226,7 @@ COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 14; DYLIB_CURRENT_VERSION = 14; - FRAMEWORK_VERSION = 1.4.0beta96; + FRAMEWORK_VERSION = 1.4.0beta97; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; @@ -244,7 +244,7 @@ buildSettings = { DYLIB_COMPATIBILITY_VERSION = 14; DYLIB_CURRENT_VERSION = 14; - FRAMEWORK_VERSION = 1.4.0beta96; + FRAMEWORK_VERSION = 1.4.0beta97; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in index 999337cd8..0381828df 100755 --- a/scripts/libpng-config-head.in +++ b/scripts/libpng-config-head.in @@ -11,7 +11,7 @@ # Modeled after libxml-config. -version=1.4.0beta96 +version=1.4.0beta97 prefix="" libdir="" libs="" diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in index 97c1d653e..064d4aeed 100644 --- a/scripts/libpng.pc.in +++ b/scripts/libpng.pc.in @@ -5,6 +5,6 @@ includedir=@includedir@/libpng14 Name: libpng Description: Loads and saves PNG files -Version: 1.4.0beta96 +Version: 1.4.0beta97 Libs: -L${libdir} -lpng14 Cflags: -I${includedir} diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu index c5a33dfbc..c0303b8af 100644 --- a/scripts/makefile.32sunu +++ b/scripts/makefile.32sunu @@ -11,7 +11,7 @@ # Library name: LIBNAME=libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu index b0b4583d4..1d3a5c9cd 100644 --- a/scripts/makefile.64sunu +++ b/scripts/makefile.64sunu @@ -11,7 +11,7 @@ # Library name: LIBNAME=libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.aix b/scripts/makefile.aix index 23bffcd02..2b2d54608 100644 --- a/scripts/makefile.aix +++ b/scripts/makefile.aix @@ -23,7 +23,7 @@ LN_SF = ln -f -s LIBNAME=libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) prefix=/usr/local diff --git a/scripts/makefile.beos b/scripts/makefile.beos index 5c19036b0..2c7477fba 100644 --- a/scripts/makefile.beos +++ b/scripts/makefile.beos @@ -11,7 +11,7 @@ # Library name: LIBNAME=libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin index 709e266f9..f25f555fa 100644 --- a/scripts/makefile.cygwin +++ b/scripts/makefile.cygwin @@ -68,7 +68,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ LIBNAME = libpng14 PNGMAJ = 14 CYGDLL = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) SHAREDLIB=cygpng$(CYGDLL).dll diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin index 017bdd98e..cca061d8b 100644 --- a/scripts/makefile.darwin +++ b/scripts/makefile.darwin @@ -22,7 +22,7 @@ ZLIBINC=../zlib # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.dec b/scripts/makefile.dec index 6f27ed880..07bd87346 100644 --- a/scripts/makefile.dec +++ b/scripts/makefile.dec @@ -8,7 +8,7 @@ # Library name: PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng14 diff --git a/scripts/makefile.elf b/scripts/makefile.elf index f8a9bee5f..e9e79f249 100644 --- a/scripts/makefile.elf +++ b/scripts/makefile.elf @@ -16,7 +16,7 @@ # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.hp64 b/scripts/makefile.hp64 index 36f40a910..d54f44a57 100644 --- a/scripts/makefile.hp64 +++ b/scripts/makefile.hp64 @@ -21,7 +21,7 @@ ZLIBINC=/opt/zlib/include # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc index 64d007c4f..e7b0dcce0 100644 --- a/scripts/makefile.hpgcc +++ b/scripts/makefile.hpgcc @@ -11,7 +11,7 @@ # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux index 2c2cde1d7..55e4c1c3a 100644 --- a/scripts/makefile.hpux +++ b/scripts/makefile.hpux @@ -21,7 +21,7 @@ ZLIBINC=/opt/zlib/include # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.linux b/scripts/makefile.linux index a1922eefa..ca9314078 100644 --- a/scripts/makefile.linux +++ b/scripts/makefile.linux @@ -10,7 +10,7 @@ # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.mingw b/scripts/makefile.mingw index cef55b587..0159325cc 100644 --- a/scripts/makefile.mingw +++ b/scripts/makefile.mingw @@ -68,7 +68,7 @@ CFLAGS= -DPNG_CONFIGURE_LIBPNG $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC LIBNAME = libpng14 PNGMAJ = 14 MINGDLL = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) SHAREDLIB=libpng$(MINGDLL).dll diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd index 6f2bebb71..e51422065 100644 --- a/scripts/makefile.ne12bsd +++ b/scripts/makefile.ne12bsd @@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng14 LIB= png14 SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.4.0beta96 +SHLIB_MINOR= 1.4.0beta97 SRCS= 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 ff032ded0..5d8929020 100644 --- a/scripts/makefile.netbsd +++ b/scripts/makefile.netbsd @@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng LIB= png SHLIB_MAJOR= 3 -SHLIB_MINOR= 1.4.0beta96 +SHLIB_MINOR= 1.4.0beta97 SRCS= 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.nommx b/scripts/makefile.nommx index 8c541f5bc..53baea839 100644 --- a/scripts/makefile.nommx +++ b/scripts/makefile.nommx @@ -10,7 +10,7 @@ # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd index 37d4dd556..0b5b0badd 100644 --- a/scripts/makefile.openbsd +++ b/scripts/makefile.openbsd @@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib MANDIR= ${PREFIX}/man/cat SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.4.0beta96 +SHLIB_MINOR= 1.4.0beta97 LIB= png SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ diff --git a/scripts/makefile.sco b/scripts/makefile.sco index a674a2948..0bc9e3cc8 100644 --- a/scripts/makefile.sco +++ b/scripts/makefile.sco @@ -12,7 +12,7 @@ # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc index 1147bda86..0b03f5410 100644 --- a/scripts/makefile.sggcc +++ b/scripts/makefile.sggcc @@ -9,7 +9,7 @@ # Library name: LIBNAME=libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi index e34169275..c37f9e1dc 100644 --- a/scripts/makefile.sgi +++ b/scripts/makefile.sgi @@ -9,7 +9,7 @@ # Library name: LIBNAME=libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/makefile.so9 b/scripts/makefile.so9 index 7a92c7f70..c4a58ee7f 100644 --- a/scripts/makefile.so9 +++ b/scripts/makefile.so9 @@ -11,7 +11,7 @@ # Library name: PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng14 diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris index 1af0dcd5b..221c2da0a 100644 --- a/scripts/makefile.solaris +++ b/scripts/makefile.solaris @@ -11,7 +11,7 @@ # Library name: LIBNAME = libpng14 PNGMAJ = 14 -PNGMIN = 1.4.0beta96 +PNGMIN = 1.4.0beta97 PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: diff --git a/scripts/png32ce.def b/scripts/png32ce.def index e330d8198..3ed6985ed 100644 --- a/scripts/png32ce.def +++ b/scripts/png32ce.def @@ -15,7 +15,7 @@ LIBRARY lpngce png_get_int_32 EXPORTS -;Version 1.4.0beta96 +;Version 1.4.0beta97 png_build_grayscale_palette @1 ; png_check_sig @2 png_chunk_error @3 diff --git a/scripts/pngos2.def b/scripts/pngos2.def index 01db383b3..2748ba732 100644 --- a/scripts/pngos2.def +++ b/scripts/pngos2.def @@ -2,7 +2,7 @@ ; PNG.LIB module definition file for OS/2 ;---------------------------------------- -; Version 1.4.0beta96 +; Version 1.4.0beta97 LIBRARY PNG DESCRIPTION "PNG image compression library for OS/2" diff --git a/scripts/pngwin.def b/scripts/pngwin.def index 7f08138ba..90a745637 100644 --- a/scripts/pngwin.def +++ b/scripts/pngwin.def @@ -5,7 +5,7 @@ LIBRARY EXPORTS -;Version 1.4.0beta96 +;Version 1.4.0beta97 png_build_grayscale_palette png_chunk_error png_chunk_warning