From 0bfb58ff8002e70d7ec719cbef2646f1366b3922 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 30 Sep 2009 23:07:22 -0500 Subject: [PATCH] [devel] Imported from libpng-1.4.0beta85.tar --- INSTALL | 2 +- LICENSE | 4 ++-- README | 2 +- example.c | 2 +- libpng.3 | 56 ++++++++++++++++++++++++++++++------------------------ libpngpf.3 | 2 +- png.5 | 2 +- png.h | 8 ++++---- pngconf.h | 2 +- pngerror.c | 2 +- pngmem.c | 2 +- pngpread.c | 2 +- pngpriv.h | 2 +- pngread.c | 2 +- pngrio.c | 2 +- pngrtran.c | 2 +- pngrutil.c | 2 +- pngtest.c | 2 +- pngtrans.c | 2 +- pngwio.c | 2 +- pngwrite.c | 2 +- pngwtran.c | 2 +- pngwutil.c | 2 +- 23 files changed, 57 insertions(+), 51 deletions(-) diff --git a/INSTALL b/INSTALL index d0afd388c..826382f36 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ -Installing libpng version 1.4.0beta85 - September 30, 2009 +Installing libpng version 1.4.0beta85 - October 1, 2009 On Unix/Linux and similar systems, you can simply type diff --git a/LICENSE b/LICENSE index 4a329eb7b..e2deaa6ec 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.0beta85, September 30, 2009, are +libpng versions 1.2.6, August 15, 2004, through 1.4.0beta85, October 1, 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 @@ -108,4 +108,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -September 30, 2009 +October 1, 2009 diff --git a/README b/README index 258be174e..acc7e539b 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README for libpng version 1.4.0beta85 - September 30, 2009 (shared library 14.0) +README for libpng version 1.4.0beta85 - October 1, 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. diff --git a/example.c b/example.c index 26f9d0864..3c3ecbd46 100644 --- a/example.c +++ b/example.c @@ -2,7 +2,7 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 2009] * This file has been placed in the public domain by the authors. * Maintained 1998-2009 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) diff --git a/libpng.3 b/libpng.3 index cfc68c181..ffce31c06 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1,4 +1,4 @@ -.TH LIBPNG 3 "September 30, 2009" +.TH LIBPNG 3 "October 1, 2009" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta85 .SH SYNOPSIS @@ -809,7 +809,7 @@ 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.4.0beta85 - September 30, 2009 + libpng version 1.4.0beta85 - October 1, 2009 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -820,7 +820,7 @@ libpng.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.4.0beta85 - September 30, 2009 + libpng versions 0.97, January 1998, through 1.4.0beta85 - October 1, 2009 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -1366,10 +1366,33 @@ in until png_read_end() has read the chunk data following the image. for PNG 1.0) interlace_type - (PNG_INTERLACE_NONE or PNG_INTERLACE_ADAM7) - Any or all of interlace_type, compression_type, of + + Any or all of interlace_type, compression_type, or filter_method can be NULL if you are not interested in their values. + Note that png_get_IHDR() returns 32-bit data into + the application's width and height variables. + This is an unsafe situation if these are 16-bit + variables. In such situations, the + png_get_image_width() and png_get_image_height() + functions described below are safer. + + width = png_get_image_width(png_ptr, + info_ptr); + height = png_get_image_height(png_ptr, + info_ptr); + bit_depth = png_get_bit_depth(png_ptr, + info_ptr); + color_type = png_get_color_type(png_ptr, + info_ptr); + filter_method = png_get_filter_type(png_ptr, + info_ptr); + compression_type = png_get_compression_type(png_ptr, + info_ptr); + interlace_type = png_get_interlace_type(png_ptr, + info_ptr); + channels = png_get_channels(png_ptr, info_ptr); channels - number of channels of info for the color type (valid values are 1 (GRAY, @@ -1389,23 +1412,6 @@ in until png_read_end() has read the chunk data following the image. be in signature[4] through signature[7] (see png_set_sig_bytes())). - - width = png_get_image_width(png_ptr, - info_ptr); - height = png_get_image_height(png_ptr, - info_ptr); - bit_depth = png_get_bit_depth(png_ptr, - info_ptr); - color_type = png_get_color_type(png_ptr, - info_ptr); - filter_method = png_get_filter_type(png_ptr, - info_ptr); - compression_type = png_get_compression_type(png_ptr, - info_ptr); - interlace_type = png_get_interlace_type(png_ptr, - info_ptr); - - 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 @@ -4014,7 +4020,7 @@ source. .SH XIII. Y2K Compliance in libpng -September 30, 2009 +October 1, 2009 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. @@ -4244,7 +4250,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.4.0beta85 - September 30, 2009: +Libpng version 1.4.0beta85 - October 1, 2009: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -4267,7 +4273,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.4.0beta85, September 30, 2009, are +libpng versions 1.2.6, August 15, 2004, through 1.4.0beta85, October 1, 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 @@ -4366,7 +4372,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -September 30, 2009 +October 1, 2009 .\" end of man page diff --git a/libpngpf.3 b/libpngpf.3 index 179e85c0e..f2713e66a 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,4 +1,4 @@ -.TH LIBPNGPF 3 "September 30, 2009" +.TH LIBPNGPF 3 "October 1, 2009" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta85 (private functions) diff --git a/png.5 b/png.5 index 93850a6ee..7d79bf367 100644 --- a/png.5 +++ b/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "September 30, 2009" +.TH PNG 5 "October 1, 2009" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/png.h b/png.h index f105229d9..32be0d743 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.4.0beta85 - September 30, 2009 + * libpng version 1.4.0beta85 - October 1, 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.0beta85 - September 30, 2009: Glenn + * libpng versions 0.97, January 1998, through 1.4.0beta85 - October 1, 2009: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -161,7 +161,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.4.0beta85, September 30, 2009, are + * libpng versions 1.2.6, August 15, 2004, through 1.4.0beta85, October 1, 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: @@ -337,7 +337,7 @@ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.4.0beta85" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.4.0beta85 - September 30, 2009\n" + " libpng version 1.4.0beta85 - October 1, 2009\n" #define PNG_LIBPNG_VER_SONUM 14 #define PNG_LIBPNG_VER_DLLNUM 14 diff --git a/pngconf.h b/pngconf.h index a8378c5ea..b4a21fe49 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.4.0beta85 - September 30, 2009 + * libpng version 1.4.0beta85 - October 1, 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/pngerror.c b/pngerror.c index 23f94390a..5505430a8 100644 --- a/pngerror.c +++ b/pngerror.c @@ -1,7 +1,7 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngmem.c b/pngmem.c index 9e8ce503c..cbe380fdc 100644 --- a/pngmem.c +++ b/pngmem.c @@ -1,7 +1,7 @@ /* pngmem.c - stub functions for memory allocation * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngpread.c b/pngpread.c index ef307c99c..d2c560335 100644 --- a/pngpread.c +++ b/pngpread.c @@ -1,7 +1,7 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngpriv.h b/pngpriv.h index 0b4baaf15..123ba0ae3 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -1,7 +1,7 @@ /* pngpriv.h - private declarations for use inside libpng * - * libpng version 1.4.0beta85 - September 30, 2009 + * libpng version 1.4.0beta85 - October 1, 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/pngread.c b/pngread.c index 590eb7ff2..8e04396b8 100644 --- a/pngread.c +++ b/pngread.c @@ -1,7 +1,7 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngrio.c b/pngrio.c index 42e7cc02f..9a832b3b8 100644 --- a/pngrio.c +++ b/pngrio.c @@ -1,7 +1,7 @@ /* pngrio.c - functions for data input * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngrtran.c b/pngrtran.c index 0fde64bfb..77530a7d9 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1,7 +1,7 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngrutil.c b/pngrutil.c index ca9507cba..dbe88a098 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngtest.c b/pngtest.c index 49b48c6dd..792673de5 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1,7 +1,7 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngtrans.c b/pngtrans.c index e95aadffa..c7044b139 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -1,7 +1,7 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngwio.c b/pngwio.c index 5b913e886..f32923700 100644 --- a/pngwio.c +++ b/pngwio.c @@ -1,7 +1,7 @@ /* pngwio.c - functions for data output * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngwrite.c b/pngwrite.c index 0016d2c22..23c3e1f93 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1,7 +1,7 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngwtran.c b/pngwtran.c index df3a29c4b..64b23ea8a 100644 --- a/pngwtran.c +++ b/pngwtran.c @@ -1,7 +1,7 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.) diff --git a/pngwutil.c b/pngwutil.c index a9131b046..39991271a 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1,7 +1,7 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.4.0 [September 30, 2009] + * Last changed in libpng 1.4.0 [October 1, 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.)