diff --git a/ANNOUNCE b/ANNOUNCE index a7b284bd2..ccb681f2d 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.5.0alpha01 - December 25, 2009 +Libpng 1.5.0alpha01 - January 1, 2010 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. @@ -55,7 +55,7 @@ version 1.4.1alpha02 [December 11, 2009] change in version 1.2.41beta08 caused transparency to be handled wrong in some 16-bit datastreams (Yusaku Sugai). -version 1.5.0alpha01 [December 25, 2009] +version 1.5.0alpha01 [January 1, 2010] Bump version to 1.5.0alpha01 Add "depth" parameter to private png_build_gamma_table() Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c diff --git a/CHANGES b/CHANGES index 27b9aa759..fa198b706 100644 --- a/CHANGES +++ b/CHANGES @@ -2437,7 +2437,7 @@ version 1.4.1alpha02 [December 11, 2009] change in version 1.2.41beta08 caused transparency to be handled wrong in some 16-bit datastreams (Yusaku Sugai). -version 1.5.0alpha01 [December 25, 2009] +version 1.5.0alpha01 [January 1, 2010] Bump version to 1.5.0alpha01 Add "depth" parameter to private png_build_gamma_table() Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c @@ -2447,6 +2447,7 @@ version 1.5.0alpha01 [December 25, 2009] in pngset.c to be consistent with other changes in version 1.2.38. Changed "libpng-pc.in" to "libpng.pc.in" in configure.ac, configure, and Makefile.in to be consistent with changes in libpng-1.4.0rc03 + Updated copyright year to 2010. Send comments/corrections/commendations to png-mng-implement at lists.sf.net diff --git a/INSTALL b/INSTALL index 4710dea2c..7c257191b 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ -Installing libpng version 1.5.0alpha01 - December 12, 2009 +Installing libpng version 1.5.0alpha01 - January 1, 2010 On Unix/Linux and similar systems, you can simply type diff --git a/LICENSE b/LICENSE index bfaa3b5a8..7e5c06fbe 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.5.0alpha01, December 12, 2009, are +libpng versions 1.2.6, August 15, 2004, through 1.5.0alpha01, January 1, 2010, 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 -December 12, 2009 +January 1, 2010 diff --git a/README b/README index 0e9bff086..21b4009de 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README for libpng version 1.5.0alpha01 - December 12, 2009 (shared library 14.0) +README for libpng version 1.5.0alpha01 - January 1, 2010 (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. @@ -245,7 +245,7 @@ Files in this distribution: Good luck, and happy coding. --Glenn Randers-Pehrson (current maintainer) +-Glenn Randers-Pehrson (current maintainer, since 1998) Internet: glennrp at users.sourceforge.net -Andreas Eric Dilger (former maintainer, 1996-1997) diff --git a/example.c b/example.c index 22245e9f5..f578694ef 100644 --- a/example.c +++ b/example.c @@ -2,9 +2,9 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.4.0 [December 12, 2009] + * Last changed in libpng 1.4.0 [January 1, 2010] * This file has been placed in the public domain by the authors. - * Maintained 1998-2009 Glenn Randers-Pehrson + * Maintained 1998-2010 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) */ diff --git a/libpng-1.5.0alpha01.txt b/libpng-1.5.0alpha01.txt index 506f1c13b..1a176756a 100644 --- a/libpng-1.5.0alpha01.txt +++ b/libpng-1.5.0alpha01.txt @@ -1,6 +1,6 @@ libpng.txt - A description on how to use and modify libpng - libpng version 1.5.0alpha01 - December 22, 2009 + libpng version 1.5.0alpha01 - January 1, 2010 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.5.0alpha01 - December 22, 2009 + libpng versions 0.97, January 1998, through 1.5.0alpha01 - January 1, 2010 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -3242,7 +3242,7 @@ Other rules can be inferred by inspecting the libpng source. XIV. Y2K Compliance in libpng -December 22, 2009 +January 1, 2010 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. diff --git a/libpng.3 b/libpng.3 index 0c96084e3..ca21279af 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1,4 +1,4 @@ -.TH LIBPNG 3 "December 12, 2009" +.TH LIBPNG 3 "January 1, 2010" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0alpha01 .SH SYNOPSIS @@ -781,7 +781,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.5.0alpha01 - December 12, 2009 + libpng version 1.5.0alpha01 - January 1, 2010 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -792,7 +792,7 @@ libpng.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.5.0alpha01 - December 12, 2009 + libpng versions 0.97, January 1998, through 1.5.0alpha01 - January 1, 2010 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson @@ -3800,7 +3800,13 @@ Support for global arrays was removed. Some obsolete/deprecated macros and functions have been removed. -The obsolete, unused pnggccrd.c and pngvcrd.files were removed. +Typecasted NULL definitions such as + #define png_voidp_NULL (png_voidp)NULL +were eliminated. If you used these in your application, just use +NULL instead. + +The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles +%were removed. The PNG_1_0_X and PNG_1_2_X macros were eliminated. @@ -3823,9 +3829,6 @@ after the png_malloc() to set the pointers to NULL. We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level input transforms. -We added the png_set_premultiply_alpha and -png_do_read_premultiply_alpha() functions. - The call to png_do_chop() in pngrtran.c, which reduces 16-bit input files to 8-bit bit depth, was relocated ahead of the building of gamma tables. This allows us to build 8-bit tables instead @@ -3877,7 +3880,12 @@ We removed the trailing '.' from the warning and error messages. The png_struct and info_struct members "trans" and "trans_values" were changed to "trans_alpha" and "trans_color", respectively. -.SH X. Detecting libpng +.SH X. Changes to Libpng from version 1.4.x to 1.5.x + +We added the png_set_premultiply_alpha and +png_do_read_premultiply_alpha() functions. + +.SH XI. Detecting libpng The png_get_io_ptr() function has been present since libpng-0.88, has never changed, and is unaffected by conditional compilation macros. It is the @@ -3886,7 +3894,7 @@ libpng version since 0.88. In an autoconf "configure.in" you could use AC_CHECK_LIB(png, png_get_io_ptr, ... -.SH XI. Source code repository +.SH XII. Source code repository Since about February 2009, version 1.2.34, libpng has been under "git" source control. The git repository was built from old libpng-x.y.z.tar.gz files @@ -3905,7 +3913,7 @@ the libpng bug tracker at http://libpng.sourceforge.net -.SH XII. Coding style +.SH XIII. Coding style Our coding style is similar to the "Allman" style, with curly braces on separate lines: @@ -4009,11 +4017,13 @@ when there is only one macro being tested. We do not use the TAB character for indentation in the C sources. +Lines do not exceed 80 characters. + Other rules can be inferred by inspecting the libpng source. -.SH XIII. Y2K Compliance in libpng +.SH XIV. Y2K Compliance in libpng -December 12, 2009 +January 1, 2010 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. @@ -4247,7 +4257,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.5.0alpha01 - December 12, 2009: +Libpng version 1.5.0alpha01 - January 1, 2010: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -4270,7 +4280,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.5.0alpha01, December 12, 2009, are +libpng versions 1.2.6, August 15, 2004, through 1.5.0alpha01, January 1, 2010, 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 @@ -4369,7 +4379,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -December 12, 2009 +January 1, 2010 .\" end of man page diff --git a/libpngpf.3 b/libpngpf.3 index 5fa5aa0e4..9d3ed3dfc 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,4 +1,4 @@ -.TH LIBPNGPF 3 "December 14, 2009" +.TH LIBPNGPF 3 "January 1, 2010" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.5.0alpha01 (private functions) diff --git a/png.5 b/png.5 index ffddae216..115b74cac 100644 --- a/png.5 +++ b/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "December 12, 2009" +.TH PNG 5 "January 1, 2010" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/png.c b/png.c index 0b4de80e5..c87140085 100644 --- a/png.c +++ b/png.c @@ -1,8 +1,8 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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.) * @@ -315,7 +315,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, for (i = 0; i < (int)info_ptr->pcal_nparams; i++) { png_free(png_ptr, info_ptr->pcal_params[i]); - info_ptr->pcal_params[i]=NULL; + info_ptr->pcal_params[i] = NULL; } png_free(png_ptr, info_ptr->pcal_params); info_ptr->pcal_params = NULL; @@ -430,8 +430,10 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, for (row = 0; row < (int)info_ptr->height; row++) { png_free(png_ptr, info_ptr->row_pointers[row]); + info_ptr->row_pointers[row] = NULL; } png_free(png_ptr, info_ptr->row_pointers); + info_ptr->row_pointers = NULL; } info_ptr->valid &= ~PNG_INFO_IDAT; } @@ -458,6 +460,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr) if (png_ptr->num_chunk_list) { png_free(png_ptr, png_ptr->chunk_list); + png_ptr->chunk_list = NULL; png_ptr->num_chunk_list = 0; } #endif @@ -548,14 +551,14 @@ png_get_copyright(png_structp png_ptr) #else #ifdef __STDC__ return ((png_charp) PNG_STRING_NEWLINE \ - "libpng version 1.5.0alpha01 - December 12, 2009" PNG_STRING_NEWLINE \ - "Copyright (c) 1998-2009 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ + "libpng version 1.5.0alpha01 - January 1, 2010" PNG_STRING_NEWLINE \ + "Copyright (c) 1998-2010 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.5.0alpha01 - December 12, 2009\ - Copyright (c) 1998-2009 Glenn Randers-Pehrson\ + return ((png_charp) "libpng version 1.5.0alpha01 - January 1, 2010\ + Copyright (c) 1998-2010 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."); #endif diff --git a/png.h b/png.h index 15952a20a..243892515 100644 --- a/png.h +++ b/png.h @@ -1,8 +1,8 @@ /* png.h - header file for PNG reference library * - * libpng version 1.5.0alpha01 - December 12, 2009 - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * libpng version 1.5.0alpha01 - January 1, 2010 + * Copyright (c) 1998-2010 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.5.0alpha01 - December 12, 2009: Glenn + * libpng versions 0.97, January 1998, through 1.5.0alpha01 - January 1, 2010: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -165,8 +165,8 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.5.0alpha01, December 12, 2009, are - * Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are + * libpng versions 1.2.6, August 15, 2004, through 1.5.0alpha01, January 1, 2010, are + * Copyright (c) 2004, 2006-2010 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: * @@ -277,7 +277,7 @@ * Y2K compliance in libpng: * ========================= * - * July 1, 2008 + * January 1, 2010 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. @@ -341,7 +341,7 @@ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.5.0alpha01" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.5.0alpha01 - December 12, 2009\n" + " libpng version 1.5.0alpha01 - January 1, 2010\n" #define PNG_LIBPNG_VER_SONUM 14 #define PNG_LIBPNG_VER_DLLNUM 14 diff --git a/pngconf.h b/pngconf.h index ccd77ab35..c23027ee6 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,9 +1,9 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.5.0alpha01 - December 12, 2009 + * libpng version 1.5.0alpha01 - January 1, 2010 * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Copyright (c) 1998-2010 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/pngerror.c b/pngerror.c index 458a6be3f..0efcda6ae 100644 --- a/pngerror.c +++ b/pngerror.c @@ -1,8 +1,8 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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.) * @@ -231,11 +231,12 @@ png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message) #endif /* PNG_READ_SUPPORTED */ #ifdef PNG_SETJMP_SUPPORTED -/* This API only exists if ANSI-C style error handling is used, otherwise - * it is necessary for png_default_error to be overridden. +/* This API only exists if ANSI-C style error handling is used, + * otherwise it is necessary for png_default_error to be overridden. */ jmp_buf* PNGAPI -png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size) +png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn, + size_t jmp_buf_size) { if (png_ptr == NULL || jmp_buf_size != png_sizeof(jmp_buf)) return NULL; @@ -295,7 +296,7 @@ png_default_error(png_structp png_ptr, png_const_charp error_message) { jmp_buf jmpbuf; png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf)); - png_ptr->longjmp_fn(jmpbuf, 1); + png_ptr->longjmp_fn(jmpbuf, 1); } # else png_ptr->longjmp_fn(png_ptr->jmpbuf, 1); diff --git a/pngget.c b/pngget.c index 1b825b682..0a330b771 100644 --- a/pngget.c +++ b/pngget.c @@ -1,8 +1,8 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 869ede72e..5f6b3dd49 100644 --- a/pngmem.c +++ b/pngmem.c @@ -1,8 +1,8 @@ /* pngmem.c - stub functions for memory allocation * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 6298a2e02..3954b5710 100644 --- a/pngpread.c +++ b/pngpread.c @@ -1,8 +1,8 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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.) * @@ -1565,7 +1565,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) png_free(png_ptr, text_ptr); if (ret) - png_warning(png_ptr, "Insufficient memory to store iTXt chunk"); + png_warning(png_ptr, "Insufficient memory to store iTXt chunk"); } } #endif @@ -1620,7 +1620,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 else { png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, - (png_size_t)length); + (png_size_t)length); png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length); } diff --git a/pngpriv.h b/pngpriv.h index 6411d23e5..1fe028e29 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -1,9 +1,9 @@ /* pngpriv.h - private declarations for use inside libpng * - * libpng version 1.5.0alpha01 - December 14, 2009 + * libpng version 1.5.0alpha01 - January 1, 2010 * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Copyright (c) 1998-2010 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/pngread.c b/pngread.c index c062c2401..b958b8e05 100644 --- a/pngread.c +++ b/pngread.c @@ -1,8 +1,8 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.4.0 [December 22, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 9c3506806..ca5be70d6 100644 --- a/pngrio.c +++ b/pngrio.c @@ -1,8 +1,8 @@ /* pngrio.c - functions for data input * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 089fa258b..99efa8bb6 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 [December 14, 2009] + * Last changed in libpng 1.5.0 [January 1, 2010] * 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 91ca46b14..f6b318f43 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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.) * @@ -3285,9 +3285,12 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) if (row_bytes + 48 > png_ptr->old_big_row_buf_size) { png_free(png_ptr, png_ptr->big_row_buf); - png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes + 48); if (png_ptr->interlaced) - png_memset(png_ptr->big_row_buf, 0, row_bytes + 48); + png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr, + row_bytes + 48); + else + png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, + row_bytes + 48); png_ptr->old_big_row_buf_size = row_bytes + 48; #ifdef PNG_ALIGNED_MEMORY_SUPPORTED diff --git a/pngset.c b/pngset.c index 255dbe712..818ef8a43 100644 --- a/pngset.c +++ b/pngset.c @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.5.0 [December 25, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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.) * @@ -389,7 +389,7 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, if (info_ptr->scal_s_width == NULL) { png_warning(png_ptr, - "Memory allocation failed while processing sCAL"); + "Memory allocation failed while processing sCAL"); return; } png_memcpy(info_ptr->scal_s_width, swidth, length); @@ -403,7 +403,7 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, png_free (png_ptr, info_ptr->scal_s_width); info_ptr->scal_s_width = NULL; png_warning(png_ptr, - "Memory allocation failed while processing sCAL"); + "Memory allocation failed while processing sCAL"); return; } png_memcpy(info_ptr->scal_s_height, sheight, length); @@ -452,8 +452,7 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr, } } - /* - * It may not actually be necessary to set png_ptr->palette here; + /* It may not actually be necessary to set png_ptr->palette here; * we do it for backward compatibility with the way the png_handle_tRNS * function used to do the allocation. */ @@ -593,7 +592,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length); if (new_iccp_name == NULL) { - png_warning(png_ptr, "Insufficient memory to process iCCP chunk"); + png_warning(png_ptr, "Insufficient memory to process iCCP chunk"); return; } png_memcpy(new_iccp_name, name, length); @@ -602,7 +601,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, { png_free (png_ptr, new_iccp_name); png_warning(png_ptr, - "Insufficient memory to process iCCP profile"); + "Insufficient memory to process iCCP profile"); return; } png_memcpy(new_iccp_profile, profile, (png_size_t)proflen); @@ -613,7 +612,8 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr, info_ptr->iccp_name = new_iccp_name; info_ptr->iccp_profile = new_iccp_profile; /* Compression is always zero but is here so the API and info structure - * does not have to change if we introduce multiple compression types */ + * does not have to change if we introduce multiple compression types + */ info_ptr->iccp_compression = (png_byte)compression_type; info_ptr->free_me |= PNG_FREE_ICCP; info_ptr->valid |= PNG_INFO_iCCP; @@ -886,11 +886,11 @@ png_set_sPLT(png_structp png_ptr, if (np == NULL) { png_warning(png_ptr, "No memory for sPLT palettes"); - return; + return; } png_memcpy(np, info_ptr->splt_palettes, - info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t)); + info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t)); png_free(png_ptr, info_ptr->splt_palettes); info_ptr->splt_palettes=NULL; @@ -901,7 +901,7 @@ png_set_sPLT(png_structp png_ptr, png_uint_32 length; length = png_strlen(from->name) + 1; - to->name = (png_charp)png_malloc_warn(png_ptr, (png_size_t)length); + to->name = (png_charp)png_malloc_warn(png_ptr, (png_size_t)length); if (to->name == NULL) { png_warning(png_ptr, @@ -910,7 +910,7 @@ png_set_sPLT(png_structp png_ptr, } png_memcpy(to->name, from->name, length); to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr, - (png_size_t)(from->nentries * png_sizeof(png_sPLT_entry))); + (png_size_t)(from->nentries * png_sizeof(png_sPLT_entry))); if (to->entries == NULL) { png_warning(png_ptr, @@ -949,22 +949,22 @@ png_set_unknown_chunks(png_structp png_ptr, if (np == NULL) { png_warning(png_ptr, - "Out of memory while processing unknown chunk"); + "Out of memory while processing unknown chunk"); return; } png_memcpy(np, info_ptr->unknown_chunks, - info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk)); + info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk)); png_free(png_ptr, info_ptr->unknown_chunks); + info_ptr->unknown_chunks = NULL; for (i = 0; i < num_unknowns; i++) { png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i; png_unknown_chunkp from = unknowns + i; - png_memcpy((png_charp)to->name, - (png_charp)from->name, - png_sizeof(from->name)); + png_memcpy((png_charp)to->name, (png_charp)from->name, + png_sizeof(from->name)); to->name[png_sizeof(to->name)-1] = '\0'; to->size = from->size; /* Note our location in the read or write sequence */ @@ -996,7 +996,7 @@ png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr, int chunk, int location) { if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk < - (int)info_ptr->unknown_chunks_num) + (int)info_ptr->unknown_chunks_num) info_ptr->unknown_chunks[chunk].location = (png_byte)location; } #endif @@ -1043,16 +1043,16 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep old_num_chunks = png_ptr->num_chunk_list; new_list=(png_bytep)png_malloc(png_ptr, (png_size_t) - (5*(num_chunks + old_num_chunks))); + (5*(num_chunks + old_num_chunks))); if (png_ptr->chunk_list != NULL) { png_memcpy(new_list, png_ptr->chunk_list, - (png_size_t)(5*old_num_chunks)); + (png_size_t)(5*old_num_chunks)); png_free(png_ptr, png_ptr->chunk_list); png_ptr->chunk_list=NULL; } png_memcpy(new_list + 5*old_num_chunks, chunk_list, - (png_size_t)(5*num_chunks)); + (png_size_t)(5*num_chunks)); for (p = new_list + 5*old_num_chunks + 4, i = 0; inum_chunk_list = old_num_chunks + num_chunks; diff --git a/pngtest.c b/pngtest.c index 23c0e7afd..76bc69a20 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1,8 +1,8 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 0789d6d88..723f45804 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -1,8 +1,8 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 3cc6dafc0..4b4eaeb40 100644 --- a/pngwio.c +++ b/pngwio.c @@ -1,8 +1,8 @@ /* pngwio.c - functions for data output * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 d1e5f74ee..2d7e7d5ff 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1,8 +1,8 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.4.0 [December 22, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 f343f7cb1..057681acc 100644 --- a/pngwtran.c +++ b/pngwtran.c @@ -1,8 +1,8 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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 b7c4c49ef..7c358ec65 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1,8 +1,8 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.4.0 [December 12, 2009] - * Copyright (c) 1998-2009 Glenn Randers-Pehrson + * Last changed in libpng 1.4.0 [January 1, 2010] + * Copyright (c) 1998-2010 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/scripts/README.txt b/scripts/README.txt index 0284ee2a8..72fd1a39c 100644 --- a/scripts/README.txt +++ b/scripts/README.txt @@ -1,5 +1,5 @@ -Makefiles for libpng version 1.5.0alpha01 - December 12, 2009 +Makefiles for libpng version 1.5.0alpha01 - January 1, 2010 makefile.linux => Linux/ELF makefile (gcc, creates libpng14.so.14.1.5.0alpha01)