From 149eea29b6b153cde30132416328bf9656ee23bf Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 17 Mar 2014 10:58:02 -0500 Subject: [PATCH] [libpng16] Imported from libpng-1.6.11beta01.tar --- INSTALL | 4 ++-- LICENSE | 4 ++-- README | 2 +- TODO | 1 + arm/arm_init.c | 2 +- libpngpf.3 | 2 +- png.5 | 2 +- png.c | 4 ++-- png.h | 14 ++++++++------ pngconf.h | 2 +- pngread.c | 8 ++++---- pngwrite.c | 7 ++++--- projects/vstudio/readme.txt | 2 +- projects/vstudio/zlib.props | 2 +- scripts/README.txt | 2 +- scripts/pnglibconf.h.prebuilt | 2 +- 16 files changed, 32 insertions(+), 28 deletions(-) diff --git a/INSTALL b/INSTALL index 8e42354f2..781f760e0 100644 --- a/INSTALL +++ b/INSTALL @@ -12,10 +12,10 @@ Contents VII. Building with makefiles VIII. Configuring libpng for 16-bit platforms IX. Configuring for DOS - X. Configuring for Medium Model + X. Configuring for Medium Model XI. Prepending a prefix to exported symbols XII. Configuring for compiler xxx: -XIII Removing unwanted object code +XIII. Removing unwanted object code XIV. Changes to the build and configuration of libpng in libpng-1.5.x XV. Configuring libpng for multiprocessing XVI. Other sources of information about libpng: diff --git a/LICENSE b/LICENSE index 2d2e0335f..b4365cdce 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.6.11beta01, March 7, 2014, are +libpng versions 1.2.6, August 15, 2004, through 1.6.11beta01, March 17, 2014, are Copyright (c) 2004, 2006-2014 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 -March 7, 2014 +March 17, 2014 diff --git a/README b/README index 29028196b..ffc518caf 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README for libpng version 1.6.11beta01 - March 7, 2014 (shared library 16.0) +README for libpng version 1.6.11beta01 - March 17, 2014 (shared library 16.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/TODO b/TODO index 63613b8dd..72633774f 100644 --- a/TODO +++ b/TODO @@ -6,6 +6,7 @@ Better C++ wrapper/full C++ implementation? Fix problem with C++ and EXTERN "C". cHRM transformation. Remove setjmp/longjmp usage in favor of returning error codes. +Palette creation. Add "grayscale->palette" transformation and "palette->grayscale" detection. Improved dithering. Multi-lingual error and warning message support. diff --git a/arm/arm_init.c b/arm/arm_init.c index 580053016..a672eaebb 100644 --- a/arm/arm_init.c +++ b/arm/arm_init.c @@ -22,7 +22,7 @@ /* WARNING: it is strongly recommended that you do not build libpng with * run-time checks for CPU features if at all possible. In the case of the ARM * NEON instructions there is no processor-specific way of detecting the - * presense of the required support, therefore run-time detectioon is extremely + * presence of the required support, therefore run-time detection is extremely * OS specific. * * You may set the macro PNG_ARM_NEON_FILE to the file name of file containing diff --git a/libpngpf.3 b/libpngpf.3 index c45061be5..ee0f020f4 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,4 +1,4 @@ -.TH LIBPNGPF 3 "March 7, 2014" +.TH LIBPNGPF 3 "March 17, 2014" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.6.11beta01 (private functions) diff --git a/png.5 b/png.5 index e461b6dec..f0157e441 100644 --- a/png.5 +++ b/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "March 7, 2014" +.TH PNG 5 "March 17, 2014" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/png.c b/png.c index c8dc69b98..b8a78a9bc 100644 --- a/png.c +++ b/png.c @@ -773,13 +773,13 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.11beta01 - March 8, 2014" PNG_STRING_NEWLINE \ + "libpng version 1.6.11beta01 - March 17, 2014" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2014 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 "libpng version 1.6.11beta01 - March 8, 2014\ + return "libpng version 1.6.11beta01 - March 17, 2014\ Copyright (c) 1998-2014 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 ef94f1f63..0012961da 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.6.11beta01 - March 7, 2014 + * libpng version 1.6.11beta01 - March 17, 2014 * Copyright (c) 1998-2014 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.6.11beta01 - March 7, 2014: Glenn + * libpng versions 0.97, January 1998, through 1.6.11beta01 - March 17, 2014: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -227,7 +227,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.6.11beta01, March 7, 2014, are + * libpng versions 1.2.6, August 15, 2004, through 1.6.11beta01, March 17, 2014, are * Copyright (c) 2004, 2006-2013 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: @@ -339,7 +339,7 @@ * Y2K compliance in libpng: * ========================= * - * March 7, 2014 + * March 17, 2014 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. @@ -398,7 +398,9 @@ /* This is not the place to learn how to use libpng. The file libpng-manual.txt * describes how to use libpng, and the file example.c summarizes it * with some code on which to build. This file is useful for looking - * at the actual function definitions and structure components. + * at the actual function definitions and structure components. If that + * file has been stripped from your copy of libpng, you can find it at + * * * If you just need to read a PNG file and don't want to read the documentation * skip to the end of this file and read the section entitled 'simplified API'. @@ -407,7 +409,7 @@ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.6.11beta01" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.6.11beta01 - March 7, 2014\n" + " libpng version 1.6.11beta01 - March 17, 2014\n" #define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_DLLNUM 16 diff --git a/pngconf.h b/pngconf.h index e638406b3..97d6cef8a 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.6.11beta01 - March 7, 2014 + * libpng version 1.6.11beta01 - March 17, 2014 * * Copyright (c) 1998-2013 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngread.c b/pngread.c index 10d8389f7..32043cacc 100644 --- a/pngread.c +++ b/pngread.c @@ -3317,11 +3317,11 @@ png_image_read_composite(png_voidp argument) * PNG_COMPOSITE * PNG_GAMMA * - * This is a work-round for the fact that both the PNG_RGB_TO_GRAY and + * This is a work-around for the fact that both the PNG_RGB_TO_GRAY and * PNG_COMPOSITE code performs gamma correction, so we get double gamma - * correction. The fix-up is to prevent the PNG_COMPOSITE operation happening - * inside libpng, so this routine sees an 8 or 16-bit gray+alpha row and handles - * the removal or pre-multiplication of the alpha channel. + * correction. The fix-up is to prevent the PNG_COMPOSITE operation from + * happening inside libpng, so this routine sees an 8 or 16-bit gray+alpha + * row and handles the removal or pre-multiplication of the alpha channel. */ static int png_image_read_background(png_voidp argument) diff --git a/pngwrite.c b/pngwrite.c index 2718dfcb8..73ff60111 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -432,6 +432,7 @@ png_write_end(png_structrp png_ptr, png_inforp info_ptr) /* Write end of PNG file */ png_write_IEND(png_ptr); + /* This flush, added in libpng-1.0.8, removed from libpng-1.0.9beta03, * and restored again in libpng-1.2.30, may cause some applications that * do not set png_ptr->output_flush_fn to crash. If your application @@ -479,7 +480,7 @@ png_create_write_struct,(png_const_charp user_png_ver, png_voidp error_ptr, { #ifndef PNG_USER_MEM_SUPPORTED png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr, - error_fn, warn_fn, NULL, NULL, NULL); + error_fn, warn_fn, NULL, NULL, NULL); #else return png_create_write_struct_2(user_png_ver, error_ptr, error_fn, warn_fn, NULL, NULL, NULL); @@ -492,7 +493,7 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) { png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr, - error_fn, warn_fn, mem_ptr, malloc_fn, free_fn); + error_fn, warn_fn, mem_ptr, malloc_fn, free_fn); #endif /* PNG_USER_MEM_SUPPORTED */ if (png_ptr != NULL) { @@ -525,10 +526,10 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, * applications that must not fail to write at all costs! */ #ifdef PNG_BENIGN_WRITE_ERRORS_SUPPORTED - png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; /* In stable builds only warn if an application error can be completely * handled. */ + png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; #endif /* App warnings are warnings in release (or release candidate) builds but diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt index dd2b2f202..5a16a51c9 100644 --- a/projects/vstudio/readme.txt +++ b/projects/vstudio/readme.txt @@ -1,7 +1,7 @@ VisualStudio instructions -libpng version 1.6.11beta01 - March 7, 2014 +libpng version 1.6.11beta01 - March 17, 2014 Copyright (c) 1998-2010 Glenn Randers-Pehrson diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props index 949a42a28..e347099e6 100644 --- a/projects/vstudio/zlib.props +++ b/projects/vstudio/zlib.props @@ -2,7 +2,7 @@