From 1a9c06b11a07557f88cca4bd1e17070a42c52772 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 6 Aug 2014 08:51:39 -0500 Subject: [PATCH] [libpng17] Imported from libpng-1.7.0beta35.tar --- ANNOUNCE | 9 +- CHANGES | 7 +- CMakeLists.txt | 5 +- LICENSE | 4 +- README | 2 +- arm/arm_init.c | 2 +- contrib/libtests/pngvalid.c | 21 ++- contrib/pngminus/png2pnm.bat | 0 contrib/pngminus/png2pnm.sh | 0 contrib/pngminus/pngminus.bat | 0 contrib/pngminus/pngminus.sh | 0 contrib/pngminus/pnm2png.bat | 0 contrib/pngminus/pnm2png.sh | 0 libpng-manual.txt | 25 ++-- libpng.3 | 33 +++-- libpngpf.3 | 2 +- png.5 | 2 +- png.c | 4 +- png.h | 14 +- pngconf.h | 4 +- pngpread.c | 8 +- pngread.c | 24 +-- projects/vstudio/readme.txt | 2 +- projects/vstudio/zlib.props | 2 +- scripts/README.txt | 4 +- scripts/dfn.awk | 2 +- scripts/makefile.amiga | 2 +- scripts/makefile.bc32 | 4 +- scripts/makefile.bor | 4 +- scripts/makefile.elf | 270 ---------------------------------- scripts/makefile.intel | 4 +- scripts/makefile.msc | 4 +- scripts/makefile.tc3 | 4 +- scripts/makefile.vcwin32 | 4 +- scripts/pnglibconf.h.prebuilt | 2 +- scripts/symbols.dfn | 6 - 36 files changed, 112 insertions(+), 368 deletions(-) mode change 100644 => 100755 contrib/pngminus/png2pnm.bat mode change 100644 => 100755 contrib/pngminus/png2pnm.sh mode change 100644 => 100755 contrib/pngminus/pngminus.bat mode change 100644 => 100755 contrib/pngminus/pngminus.sh mode change 100644 => 100755 contrib/pngminus/pnm2png.bat mode change 100644 => 100755 contrib/pngminus/pnm2png.sh mode change 100644 => 100755 scripts/dfn.awk delete mode 100644 scripts/makefile.elf diff --git a/ANNOUNCE b/ANNOUNCE index e35f5c9c2..2e3720a26 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta35 - April 10, 2014 +Libpng 1.7.0beta35 - August 6, 2014 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. @@ -574,7 +574,7 @@ Version 1.7.0beta34 [March 17, 2014] Changed ZlibSrcDir from 1.2.5 to 1.2.8 in projects/vstudio. Moved configuration information from the manual to the INSTALL file. -Version 1.7.0beta35 [April 10, 2014] +Version 1.7.0beta35 [August 6, 2014] Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3 when using its "__builtin_pow()" function. @@ -587,6 +587,11 @@ Version 1.7.0beta35 [April 10, 2014] macro. Fixed a typo in pngrutil.c, introduced in libpng-1.5.6, that interferes with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss). + Removed scripts/makefile.elf. It has not worked since libpng-1.5.0beta14 + due to elimination of the PNG_FUNCTION_EXPORT and PNG_DATA_EXPORT + definitions from pngconf.h. + Ensure that CMakeLists.txt makes the target "lib" directory before making + symbolic link into it (SourceForge bug report #226 by Rolf Timmermans). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 7c61b440c..602356a29 100644 --- a/CHANGES +++ b/CHANGES @@ -4863,7 +4863,7 @@ Version 1.7.0beta34 [March 17, 2014] Changed ZlibSrcDir from 1.2.5 to 1.2.8 in projects/vstudio. Moved configuration information from the manual to the INSTALL file. -Version 1.7.0beta35 [April 10, 2014] +Version 1.7.0beta35 [August 6, 2014] Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3 when using its "__builtin_pow()" function. @@ -4876,6 +4876,11 @@ Version 1.7.0beta35 [April 10, 2014] macro. Fixed a typo in pngrutil.c, introduced in libpng-1.5.6, that interferes with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss). + Removed scripts/makefile.elf. It has not worked since libpng-1.5.0beta14 + due to elimination of the PNG_FUNCTION_EXPORT and PNG_DATA_EXPORT + definitions from pngconf.h. + Ensure that CMakeLists.txt makes the target "lib" directory before making + symbolic link into it (SourceForge bug report #226 by Rolf Timmermans). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CMakeLists.txt b/CMakeLists.txt index ea6cae5d6..82e861774 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # CMakeLists.txt -# Copyright (C) 2007-2013 Glenn Randers-Pehrson +# Copyright (C) 2007-2014 Glenn Randers-Pehrson # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer @@ -220,6 +220,7 @@ macro(CREATE_SYMLINK SRC_FILE DEST_FILE) ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}) else(WIN32 AND NOT CYGWIN AND NOT MSYS) get_filename_component(LINK_TARGET "${SRC_FILE}" NAME) + execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) endif(WIN32 AND NOT CYGWIN AND NOT MSYS) @@ -350,7 +351,7 @@ if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL ) install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) endif() -# what's with libpng-$VER%.txt and all the extra files? +# what's with libpng-manual.txt and all the extra files? # UNINSTALL # do we need this? diff --git a/LICENSE b/LICENSE index 94d7339bf..79151b70c 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.7.0beta35, March 17, 2014, are +libpng versions 1.2.6, August 15, 2004, through 1.7.0beta35, August 6, 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 17, 2014 +August 6, 2014 diff --git a/README b/README index 5786b4a07..439d40e9a 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README for libpng version 1.7.0beta35 - March 17, 2014 (shared library 17.0) +README for libpng version 1.7.0beta35 - August 6, 2014 (shared library 17.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/arm/arm_init.c b/arm/arm_init.c index a672eaebb..b0e929bc1 100644 --- a/arm/arm_init.c +++ b/arm/arm_init.c @@ -3,7 +3,7 @@ * * Copyright (c) 2014 Glenn Randers-Pehrson * Written by Mans Rullgard, 2011. - * Last changed in libpng 1.6.10 [(PENDING RELEASE)] + * Last changed in libpng 1.6.10 [March 6, 2014] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index d07c0e444..592ae7382 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -6776,6 +6776,14 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this, * conversion adds another +/-2 in the 16-bit case and * +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case. */ + that->pm->limit += +# if PNG_MAX_GAMMA_8 < 14 + pow((that->this.bit_depth == 16 ? + 8. : 6. + (1<<(15-PNG_MAX_GAMMA_8)))/65535, data.gamma); +# else + pow((that->this.bit_depth == 16 ? + 8. : 8. + (1<<(15-PNG_MAX_GAMMA_8)))/65535, data.gamma); +# endif that->pm->limit += pow( # if PNG_MAX_GAMMA_8 < 14 (that->this.bit_depth == 16 ? 8. : @@ -6801,13 +6809,12 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this, * internal calculation errors, not the actual limit imposed by * pngvalid on the output errors. */ - that->pm->limit += pow( -# if DIGITIZE - 1.1 -# else - 1. -# endif - /255, data.gamma); + that->pm->limit += +# if DIGITIZE + pow(1.1 /255, data.gamma); +# else + pow(1.0 /255, data.gamma); +# endif } } diff --git a/contrib/pngminus/png2pnm.bat b/contrib/pngminus/png2pnm.bat old mode 100644 new mode 100755 diff --git a/contrib/pngminus/png2pnm.sh b/contrib/pngminus/png2pnm.sh old mode 100644 new mode 100755 diff --git a/contrib/pngminus/pngminus.bat b/contrib/pngminus/pngminus.bat old mode 100644 new mode 100755 diff --git a/contrib/pngminus/pngminus.sh b/contrib/pngminus/pngminus.sh old mode 100644 new mode 100755 diff --git a/contrib/pngminus/pnm2png.bat b/contrib/pngminus/pnm2png.bat old mode 100644 new mode 100755 diff --git a/contrib/pngminus/pnm2png.sh b/contrib/pngminus/pnm2png.sh old mode 100644 new mode 100755 diff --git a/libpng-manual.txt b/libpng-manual.txt index f40a9bd97..c5158c618 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.7.0beta35 - March 17, 2014 + libpng version 1.7.0beta35 - August 6, 2014 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2014 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.7.0beta35 - March 17, 2014 + libpng versions 0.97, January 1998, through 1.7.0beta35 - August 6, 2014 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2014 Glenn Randers-Pehrson @@ -4291,6 +4291,8 @@ zlib.h for more information on what these mean. png_set_compression_method(png_ptr, method); +This controls the size of the IDAT chunks (default 8192): + png_set_compression_buffer_size(png_ptr, size); As of libpng version 1.5.4, additional APIs became @@ -4752,8 +4754,6 @@ does not account for any palette index used by ancillary chunks such as the bKGD chunk; you must check those separately to determine the maximum palette index actually used. -A. Changes that affect users of libpng - There are no substantial API changes between the non-deprecated parts of the 1.4.5 API and the 1.5.0 API; however, the ability to directly access members of the main libpng control structures, png_struct and png_info, @@ -5074,16 +5074,16 @@ Libpng-1.6.0 through 1.6.2 used the CMF bytes at the beginning of the IDAT stream to set the size of the sliding window for reading instead of using the default 32-kbyte sliding window size. It was discovered that there are hundreds of PNG files in the wild that have incorrect CMF bytes that caused -libpng to issue a "too far back" error and reject the file. Libpng-1.6.3 and -later calculate their own safe CMF from the image dimensions, provide a way -to revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a -32-kbyte sliding window), by using +zlib to issue the "invalid distance too far back" error and reject the file. +Libpng-1.6.3 and later calculate their own safe CMF from the image dimensions, +provide a way to revert to the libpng-1.5.x behavior (ignoring the CMF bytes +and using a 32-kbyte sliding window), by using png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, PNG_OPTION_ON); -and provide a tool (contrib/tools/pngfix) for optimizing the CMF bytes -correctly. +and provide a tool (contrib/tools/pngfix) for rewriting a PNG file while +optimizing the CMF bytes in its IDAT chunk correctly. Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong length, which resulted in PNG files that cannot be read beyond the bad iTXt @@ -5158,7 +5158,8 @@ mailing list, or directly to glennrp. XVI. Coding style -Our coding style is similar to the "Allman" style, with curly +Our coding style is similar to the "Allman" style +(See http://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly braces on separate lines: if (condition) @@ -5291,7 +5292,7 @@ Other rules can be inferred by inspecting the libpng source. XVII. Y2K Compliance in libpng -March 17, 2014 +August 6, 2014 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 58c74d4bf..397640883 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1,4 +1,4 @@ -.TH LIBPNG 3 "March 17, 2014" +.TH LIBPNG 3 "August 6, 2014" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta35 .SH SYNOPSIS @@ -494,7 +494,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.7.0beta35 - March 17, 2014 + libpng version 1.7.0beta35 - August 6, 2014 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2014 Glenn Randers-Pehrson @@ -505,7 +505,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.7.0beta35 - March 17, 2014 + libpng versions 0.97, January 1998, through 1.7.0beta35 - August 6, 2014 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2014 Glenn Randers-Pehrson @@ -4785,6 +4785,8 @@ zlib.h for more information on what these mean. png_set_compression_method(png_ptr, method); +This controls the size of the IDAT chunks (default 8192): + png_set_compression_buffer_size(png_ptr, size); As of libpng version 1.5.4, additional APIs became @@ -5246,8 +5248,6 @@ does not account for any palette index used by ancillary chunks such as the bKGD chunk; you must check those separately to determine the maximum palette index actually used. -A. Changes that affect users of libpng - There are no substantial API changes between the non-deprecated parts of the 1.4.5 API and the 1.5.0 API; however, the ability to directly access members of the main libpng control structures, png_struct and png_info, @@ -5568,16 +5568,16 @@ Libpng-1.6.0 through 1.6.2 used the CMF bytes at the beginning of the IDAT stream to set the size of the sliding window for reading instead of using the default 32-kbyte sliding window size. It was discovered that there are hundreds of PNG files in the wild that have incorrect CMF bytes that caused -libpng to issue a "too far back" error and reject the file. Libpng-1.6.3 and -later calculate their own safe CMF from the image dimensions, provide a way -to revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a -32-kbyte sliding window), by using +zlib to issue the "invalid distance too far back" error and reject the file. +Libpng-1.6.3 and later calculate their own safe CMF from the image dimensions, +provide a way to revert to the libpng-1.5.x behavior (ignoring the CMF bytes +and using a 32-kbyte sliding window), by using png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, PNG_OPTION_ON); -and provide a tool (contrib/tools/pngfix) for optimizing the CMF bytes -correctly. +and provide a tool (contrib/tools/pngfix) for rewriting a PNG file while +optimizing the CMF bytes in its IDAT chunk correctly. Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong length, which resulted in PNG files that cannot be read beyond the bad iTXt @@ -5652,7 +5652,8 @@ mailing list, or directly to glennrp. .SH XVI. Coding style -Our coding style is similar to the "Allman" style, with curly +Our coding style is similar to the "Allman" style +(See http://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly braces on separate lines: if (condition) @@ -5785,7 +5786,7 @@ Other rules can be inferred by inspecting the libpng source. .SH XVII. Y2K Compliance in libpng -March 17, 2014 +August 6, 2014 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. @@ -6055,7 +6056,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.7.0beta35 - March 17, 2014: +Libpng version 1.7.0beta35 - August 6, 2014: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -6078,7 +6079,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.7.0beta35, March 17, 2014, are +libpng versions 1.2.6, August 15, 2004, through 1.7.0beta35, August 6, 2014, 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 @@ -6177,7 +6178,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -March 17, 2014 +August 6, 2014 .\" end of man page diff --git a/libpngpf.3 b/libpngpf.3 index ede97de32..4992b485c 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,4 +1,4 @@ -.TH LIBPNGPF 3 "March 17, 2014" +.TH LIBPNGPF 3 "August 6, 2014" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta35 (private functions) diff --git a/png.5 b/png.5 index 54f5409a0..f6c3794fd 100644 --- a/png.5 +++ b/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "March 17, 2014" +.TH PNG 5 "August 6, 2014" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/png.c b/png.c index 5ce74f841..3ae2b67e3 100644 --- a/png.c +++ b/png.c @@ -696,13 +696,13 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.7.0beta35 - March 22, 2014" PNG_STRING_NEWLINE \ + "libpng version 1.7.0beta35 - August 6, 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.7.0beta35 - March 22, 2014\ + return "libpng version 1.7.0beta35 - August 6, 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 775fe83a6..dbeb94566 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.7.0beta35 - March 17, 2014 + * libpng version 1.7.0beta35 - August 6, 2014 * Copyright (c) 1998-2013 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.7.0beta35 - March 17, 2014: Glenn + * libpng versions 0.97, January 1998, through 1.7.0beta35 - August 6, 2014: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -200,7 +200,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.7.0beta35, March 17, 2014, are + * libpng versions 1.2.6, August 15, 2004, through 1.7.0beta35, August 6, 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: @@ -312,7 +312,7 @@ * Y2K compliance in libpng: * ========================= * - * March 17, 2014 + * August 6, 2014 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. @@ -371,7 +371,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'. @@ -380,7 +382,7 @@ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.7.0beta35" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.7.0beta35 - March 17, 2014\n" + " libpng version 1.7.0beta35 - August 6, 2014\n" #define PNG_LIBPNG_VER_SONUM 17 #define PNG_LIBPNG_VER_DLLNUM 17 diff --git a/pngconf.h b/pngconf.h index de3ce894f..21da64802 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.7.0beta35 - March 17, 2014 + * libpng version 1.7.0beta35 - August 6, 2014 * * Copyright (c) 1998-2013 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -360,7 +360,7 @@ * version 1.2.41. Disabling these removes the warnings but may also produce * less efficient code. */ -# if defined(__clang__) +# if defined(__clang__) && defined(__has_attribute) /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */ # if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__) # define PNG_USE_RESULT __attribute__((__warn_unused_result__)) diff --git a/pngpread.c b/pngpread.c index 0b251f736..e12b650dc 100644 --- a/pngpread.c +++ b/pngpread.c @@ -979,15 +979,15 @@ png_push_process_row(png_structrp png_ptr) #ifdef PNG_READ_INTERLACING_SUPPORTED - /* Blow up interlaced rows to full size */ + /* Expand interlaced rows to full size */ if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) { if (png_ptr->pass < 6) png_do_read_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); - switch (png_ptr->pass) - { + switch (png_ptr->pass) + { case 0: { int i; @@ -1262,7 +1262,7 @@ png_progressive_combine_row(png_const_structrp png_ptr, png_bytep old_row, * it must be png_ptr->row_buf+1 */ if (new_row != NULL) - png_combine_row(png_ptr, old_row, 1/*display*/); + png_combine_row(png_ptr, old_row, 1/*blocky display*/); } #endif /* PNG_READ_INTERLACING_SUPPORTED */ diff --git a/pngread.c b/pngread.c index 6a6058f0c..b2c323be9 100644 --- a/pngread.c +++ b/pngread.c @@ -1,7 +1,7 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.7.0 [(PENDING RELEASE)] + * Last changed in libpng 1.6.11 [June 5, 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.) @@ -572,7 +572,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row) png_error(png_ptr, "internal sequential row size calculation error"); #ifdef PNG_READ_INTERLACING_SUPPORTED - /* Blow up interlaced rows to full size */ + /* Expand interlaced rows to full size */ if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) { @@ -1220,7 +1220,7 @@ png_read_png(png_structrp png_ptr, png_inforp info_ptr, # define P_LINEAR8 4 /* 8-bit linear: only from a file value */ /* Color-map processing: after libpng has run on the PNG image further - * processing may be needed to conver the data to color-map indicies. + * processing may be needed to convert the data to color-map indices. */ #define PNG_CMAP_NONE 0 #define PNG_CMAP_GA 1 /* Process GA data to a color-map with alpha */ @@ -2187,7 +2187,7 @@ png_image_read_colormap(png_voidp argument) data_encoding = P_FILE; /* The rows from libpng, while technically gray values, are now also - * color-map indicies; however, they may need to be expanded to 1 + * color-map indices; however, they may need to be expanded to 1 * byte per pixel. This is what png_set_packing does (i.e., it * unpacks the bit values into bytes.) */ @@ -2273,8 +2273,8 @@ png_image_read_colormap(png_voidp argument) * 8-bit GA and it has to be processing to single byte color-map * values. Entry 254 is replaced by either a completely * transparent entry or by the background color at full - * precision (and the background color is not a simple gray leve - * in this case.) + * precision (and the background color is not a simple gray + * level in this case.) */ expand_tRNS = 1; output_processing = PNG_CMAP_TRANS; @@ -2752,7 +2752,7 @@ png_image_read_colormap(png_voidp argument) num_trans = 0; output_processing = PNG_CMAP_NONE; - data_encoding = P_FILE; /* Don't change from color-map indicies */ + data_encoding = P_FILE; /* Don't change from color-map indices */ cmap_entries = png_ptr->num_palette; if (cmap_entries > 256) cmap_entries = 256; @@ -2792,7 +2792,7 @@ png_image_read_colormap(png_voidp argument) i < num_trans ? trans[i] : 255U, P_FILE/*8-bit*/); } - /* The PNG data may have indicies packed in fewer than 8 bits, it + /* The PNG data may have indices packed in fewer than 8 bits, it * must be expanded if so. */ if (png_ptr->bit_depth < 8) @@ -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/projects/vstudio/readme.txt b/projects/vstudio/readme.txt index 46b25f979..d5653712c 100644 --- a/projects/vstudio/readme.txt +++ b/projects/vstudio/readme.txt @@ -1,7 +1,7 @@ VisualStudio instructions -libpng version 1.7.0beta35 - March 17, 2014 +libpng version 1.7.0beta35 - August 6, 2014 Copyright (c) 1998-2010 Glenn Randers-Pehrson diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props index 542ed926c..40700e23c 100644 --- a/projects/vstudio/zlib.props +++ b/projects/vstudio/zlib.props @@ -2,7 +2,7 @@