diff --git a/LICENSE b/LICENSE index aa61a18c1..fc6fa40bc 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.0beta32, February 6, 2014, are +libpng versions 1.2.6, August 15, 2004, through 1.7.0beta32, February 26, 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 -February 6, 2014 +February 26, 2014 diff --git a/README b/README index 55fda7027..d15d952c3 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README for libpng version 1.7.0beta32 - February 6, 2014 (shared library 17.0) +README for libpng version 1.7.0beta32 - February 26, 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/contrib/arm-neon/README b/contrib/arm-neon/README index 19aa49aaa..535c8d3f7 100644 --- a/contrib/arm-neon/README +++ b/contrib/arm-neon/README @@ -7,7 +7,7 @@ operating system support. (The information is not available in user mode.) HOW TO USE THIS --------------- -This directory contains C code fragments which can be included in arm/arm_init.c +This directory contains C code fragments that can be included in arm/arm_init.c by setting the macro PNG_ARM_NEON_FILE to the file name in "" or <> at build time. This setting is not recorded in pnglibconf.h and can be changed simply by rebuilding arm/arm_init.o with the required macro definition. @@ -66,8 +66,8 @@ You may send contributions of new implementations to png-mng-implement@sourceforge.net. Please write code in strict C90 C where possible. Obviously OS dependencies are to be expected. If you submit code you must have the authors permission and it must have a license that is acceptable -to the current maintainer; in particular that license must permit -redistribution. +to the current maintainer; in particular that license must permit modification +and redistribution. Please try to make the contribution a single file and give the file a clear and unambiguous name that identifies the target OS. If multiple files really are diff --git a/contrib/examples/iccfrompng.c b/contrib/examples/iccfrompng.c index 67676219e..386e522a3 100644 --- a/contrib/examples/iccfrompng.c +++ b/contrib/examples/iccfrompng.c @@ -6,9 +6,9 @@ * United States. * * Extract any icc profiles found in the given PNG files. This is a simple - * example of a program which extracts information from the header of a PNG file + * example of a program that extracts information from the header of a PNG file * without processing the image. Notice that some header information may occur - * after the image data, textual data and comments are an example; the approach + * after the image data. Textual data and comments are an example; the approach * in this file won't work reliably for such data because it only looks for the * information in the section of the file that preceeds the image data. * diff --git a/contrib/examples/pngpixel.c b/contrib/examples/pngpixel.c index 410476031..e0d43e3f0 100644 --- a/contrib/examples/pngpixel.c +++ b/contrib/examples/pngpixel.c @@ -8,7 +8,7 @@ * Read a single pixel value from a PNG file. * * This code illustrates basic 'by-row' reading of a PNG file using libpng. - * Rows are read until a particular pixel is found, the value of this pixel is + * Rows are read until a particular pixel is found; the value of this pixel is * then printed on stdout. * * The code illustrates how to do this on interlaced as well as non-interlaced @@ -56,7 +56,7 @@ component(png_const_bytep row, png_uint_32 x, unsigned int c, case 8: return row[0]; case 16: return (row[0] << 8) + row[1]; default: - /* This should never happen, it indicates a bug in this program or in + /* This should never happen; it indicates a bug in this program or in * libpng itself: */ fprintf(stderr, "pngpixel: invalid bit depth %u\n", bit_depth); @@ -132,7 +132,7 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row, return; default: - png_error(png_ptr, "invalid color type"); + png_error(png_ptr, "pngpixel: invalid color type"); } } diff --git a/contrib/libtests/pngimage.c b/contrib/libtests/pngimage.c index a91fbb488..17040566d 100644 --- a/contrib/libtests/pngimage.c +++ b/contrib/libtests/pngimage.c @@ -2,7 +2,7 @@ * * Copyright (c) 2014 John Cunningham Bowler * - * Last changed in libpng 1.6.9 [February 6, 2014] + * Last changed in libpng 1.6.10 [(PENDING RELEASE)] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer diff --git a/contrib/libtests/pngunknown.c b/contrib/libtests/pngunknown.c index 7ab19a102..a1d944e23 100644 --- a/contrib/libtests/pngunknown.c +++ b/contrib/libtests/pngunknown.c @@ -1,8 +1,8 @@ /* pngunknown.c - test the read side unknown chunk handling * - * Last changed in libpng 1.6.0 [February 14, 2013] - * Copyright (c) 2013 Glenn Randers-Pehrson + * Last changed in libpng 1.6.10 [(PENDING RELEASE)] + * Copyright (c) 2014 Glenn Randers-Pehrson * Written by John Cunningham Bowler * * This code is released under the libpng license. diff --git a/contrib/tools/pngfix.c b/contrib/tools/pngfix.c index 65045a5ff..1bd74159a 100644 --- a/contrib/tools/pngfix.c +++ b/contrib/tools/pngfix.c @@ -2,7 +2,7 @@ * * Copyright (c) 2014 John Cunningham Bowler * - * Last changed in libpng 1.6.9 [(PENDING RELEASE)] + * Last changed in libpng 1.6.10 [(PENDING RELEASE)] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer diff --git a/libpngpf.3 b/libpngpf.3 index a8b5be679..3597dace6 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,4 +1,4 @@ -.TH LIBPNGPF 3 "February 6, 2014" +.TH LIBPNGPF 3 "February 26, 2014" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta32 (private functions) diff --git a/png.5 b/png.5 index 3f0c50d27..f380ac93d 100644 --- a/png.5 +++ b/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "February 6, 2014" +.TH PNG 5 "February 26, 2014" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/png.c b/png.c index f0c9d4ced..e03b483f7 100644 --- a/png.c +++ b/png.c @@ -2211,7 +2211,6 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, png_chunk_report(png_ptr, "Not recognizing known sRGB profile that has been edited", PNG_CHUNK_WARNING); - break; # endif } } diff --git a/png.h b/png.h index 40db533f0..33569322d 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.7.0beta32 - February 16, 2014 + * libpng version 1.7.0beta32 - February 26, 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.0beta32 - February 16, 2014: Glenn + * libpng versions 0.97, January 1998, through 1.7.0beta32 - February 26, 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.0beta32, February 16, 2014, are + * libpng versions 1.2.6, August 15, 2004, through 1.7.0beta32, February 26, 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: * ========================= * - * February 16, 2014 + * February 26, 2014 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. @@ -380,7 +380,7 @@ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.7.0beta32" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.7.0beta32 - February 16, 2014\n" + " libpng version 1.7.0beta32 - February 26, 2014\n" #define PNG_LIBPNG_VER_SONUM 17 #define PNG_LIBPNG_VER_DLLNUM 17 @@ -1301,9 +1301,9 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, #endif #ifdef PNG_READ_ALPHA_MODE_SUPPORTED -/* How the alpha channel is interpreted - this affects how the color channels of - * a PNG file are returned when an alpha channel, or tRNS chunk in a palette - * file, is present. +/* How the alpha channel is interpreted - this affects how the color channels + * of a PNG file are returned to the calling application when an alpha channel, + * or a tRNS chunk in a palette file, is present. * * This has no effect on the way pixels are written into a PNG output * datastream. The color samples in a PNG datastream are never premultiplied @@ -1311,33 +1311,19 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, * * The default is to return data according to the PNG specification: the alpha * channel is a linear measure of the contribution of the pixel to the - * corresponding composited pixel. The gamma encoded color channels must be - * scaled according to the contribution and to do this it is necessary to undo + * corresponding composited pixel, and the color channels are unassociated + * (not premultiplied). The gamma encoded color channels must be scaled + * according to the contribution and to do this it is necessary to undo * the encoding, scale the color values, perform the composition and reencode * the values. This is the 'PNG' mode. * * The alternative is to 'associate' the alpha with the color information by - * storing color channel values that have been scaled by the alpha. The - * advantage is that the color channels can be resampled (the image can be - * scaled) in this form. The disadvantage is that normal practice is to store - * linear, not (gamma) encoded, values and this requires 16-bit channels for - * still images rather than the 8-bit channels that are just about sufficient if - * gamma encoding is used. In addition all non-transparent pixel values, - * including completely opaque ones, must be gamma encoded to produce the final - * image. This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the - * latter being the two common names for associated alpha color channels.) + * storing color channel values that have been scaled by the alpha. + * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes + * (the latter being the two common names for associated alpha color channels). * - * Since it is not necessary to perform arithmetic on opaque color values so - * long as they are not to be resampled and are in the final color space it is - * possible to optimize the handling of alpha by storing the opaque pixels in - * the PNG format (adjusted for the output color space) while storing partially - * opaque pixels in the standard, linear, format. The accuracy required for - * standard alpha composition is relatively low, because the pixels are - * isolated, therefore typically the accuracy loss in storing 8-bit linear - * values is acceptable. (This is not true if the alpha channel is used to - * simulate transparency over large areas - use 16 bits or the PNG mode in - * this case!) This is the 'OPTIMIZED' mode. For this mode a pixel is - * treated as opaque only if the alpha value is equal to the maximum value. + * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha + * value is equal to the maximum value. * * The final choice is to gamma encode the alpha channel as well. This is * broken because, in practice, no implementation that uses this choice @@ -1364,68 +1350,7 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr, #if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) /* The output_gamma value is a screen gamma in libpng terminology: it expresses - * how to decode the output values, not how they are encoded. The values used - * correspond to the normal numbers used to describe the overall gamma of a - * computer display system; for example 2.2 for an sRGB conformant system. The - * values are scaled by 100000 in the _fixed version of the API (so 220000 for - * sRGB.) - * - * The inverse of the value is always used to provide a default for the PNG file - * encoding if it has no gAMA chunk and if png_set_gamma() has not been called - * to override the PNG gamma information. - * - * When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode - * opaque pixels however pixels with lower alpha values are not encoded, - * regardless of the output gamma setting. - * - * When the standard Porter Duff handling is requested with mode 1 the output - * encoding is set to be linear and the output_gamma value is only relevant - * as a default for input data that has no gamma information. The linear output - * encoding will be overridden if png_set_gamma() is called - the results may be - * highly unexpected! - * - * The following numbers are derived from the sRGB standard and the research - * behind it. sRGB is defined to be approximated by a PNG gAMA chunk value of - * 0.45455 (1/2.2) for PNG. The value implicitly includes any viewing - * correction required to take account of any differences in the color - * environment of the original scene and the intended display environment; the - * value expresses how to *decode* the image for display, not how the original - * data was *encoded*. - * - * sRGB provides a peg for the PNG standard by defining a viewing environment. - * sRGB itself, and earlier TV standards, actually use a more complex transform - * (a linear portion then a gamma 2.4 power law) than PNG can express. (PNG is - * limited to simple power laws.) By saying that an image for direct display on - * an sRGB conformant system should be stored with a gAMA chunk value of 45455 - * (11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification - * makes it possible to derive values for other display systems and - * environments. - * - * The Mac value is deduced from the sRGB based on an assumption that the actual - * extra viewing correction used in early Mac display systems was implemented as - * a power 1.45 lookup table. - * - * Any system where a programmable lookup table is used or where the behavior of - * the final display device characteristics can be changed requires system - * specific code to obtain the current characteristic. However this can be - * difficult and most PNG gamma correction only requires an approximate value. - * - * By default, if png_set_alpha_mode() is not called, libpng assumes that all - * values are unencoded, linear, values and that the output device also has a - * linear characteristic. This is only very rarely correct - it is invariably - * better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the - * default if you don't know what the right answer is! - * - * The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS - * 10.6) which used a correction table to implement a somewhat lower gamma on an - * otherwise sRGB system. - * - * Both these values are reserved (not simple gamma values) in order to allow - * more precise correction internally in the future. - * - * NOTE: the following values can be passed to either the fixed or floating - * point APIs, but the floating point API will also accept floating point - * values. + * how to decode the output values, not how they are encoded. */ #define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ #define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ diff --git a/pngconf.h b/pngconf.h index f78d2bdaf..fa41e8dd1 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.7.0beta32 - February 20, 2014 + * libpng version 1.7.0beta32 - February 26, 2014 * * Copyright (c) 1998-2013 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt index 856c3f99f..4148d5caa 100644 --- a/projects/vstudio/readme.txt +++ b/projects/vstudio/readme.txt @@ -1,7 +1,7 @@ VisualStudio instructions -libpng version 1.7.0beta32 - February 6, 2014 +libpng version 1.7.0beta32 - February 26, 2014 Copyright (c) 1998-2010 Glenn Randers-Pehrson diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props index 732d8710c..8ac0f7c54 100644 --- a/projects/vstudio/zlib.props +++ b/projects/vstudio/zlib.props @@ -2,7 +2,7 @@