From cf354c2c828a10e0c9ab67ada617f1e96fed631c Mon Sep 17 00:00:00 2001 From: John Bowler Date: Wed, 5 Feb 2014 10:55:35 -0600 Subject: [PATCH] [libpng17] Make png_read_png() and png_write_png() prototypes in png.h depend upon PNG_READ_SUPPORTED and PNG_WRITE_SUPPORTED. Removed dependence on !PNG_READ_EXPAND_SUPPORTED for calling png_set_packing() in png_read_png(). --- ANNOUNCE | 8 ++++++-- CHANGES | 6 +++++- png.h | 14 +++++++++----- pngread.c | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 1535d79bd..9f3347b4c 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta31 - February 2, 2014 +Libpng 1.7.0beta31 - February 5, 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. @@ -504,7 +504,11 @@ Version 1.7.0beta30 [February 2, 2014] the program by virtue of exhaustively testing all the transforms is very slow. -Version 1.7.0beta31 [February 2, 2014] +Version 1.7.0beta31 [February 5, 2014] + Make png_read_png() and png_write_png() prototypes in png.h depend + upon PNG_READ_SUPPORTED and PNG_WRITE_SUPPORTED. + Removed dependence on !PNG_READ_EXPAND_SUPPORTED for calling + png_set_packing() in png_read_png(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index e6bb59233..bcb95242a 100644 --- a/CHANGES +++ b/CHANGES @@ -4793,7 +4793,11 @@ Version 1.7.0beta30 [February 2, 2014] the program by virtue of exhaustively testing all the transforms is very slow. -Version 1.7.0beta31 [February 2, 2014] +Version 1.7.0beta31 [February 5, 2014] + Make png_read_png() and png_write_png() prototypes in png.h depend + upon PNG_READ_SUPPORTED and PNG_WRITE_SUPPORTED. + Removed dependence on !PNG_READ_EXPAND_SUPPORTED for calling + png_set_packing() in png_read_png(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.h b/png.h index 5091141fa..4432b7d4f 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.7.0beta31 - February 2, 2014 + * libpng version 1.7.0beta31 - February 5, 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.0beta31 - February 2, 2014: Glenn + * libpng versions 0.97, January 1998, through 1.7.0beta31 - February 5, 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.0beta31, February 2, 2014, are + * libpng versions 1.2.6, August 15, 2004, through 1.7.0beta31, February 5, 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 2, 2014 + * February 5, 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.0beta31" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.7.0beta31 - February 2, 2014\n" + " libpng version 1.7.0beta31 - February 5, 2014\n" #define PNG_LIBPNG_VER_SONUM 17 #define PNG_LIBPNG_VER_DLLNUM 17 @@ -2620,11 +2620,15 @@ PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr, #ifdef PNG_INFO_IMAGE_SUPPORTED /* The "params" pointer is currently not used and is for future expansion. */ +#ifdef PNG_READ_SUPPORTED PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr, int transforms, png_voidp params)); +#endif +#ifdef PNG_WRITE_SUPPORTED PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr, int transforms, png_voidp params)); #endif +#endif PNG_EXPORT(180, png_const_charp, png_get_copyright, (png_const_structrp png_ptr)); diff --git a/pngread.c b/pngread.c index 9eb71e891..1483e2b1e 100644 --- a/pngread.c +++ b/pngread.c @@ -1044,7 +1044,7 @@ png_read_png(png_structrp png_ptr, png_inforp info_ptr, png_set_strip_alpha(png_ptr); #endif -#if defined(PNG_READ_PACK_SUPPORTED) && !defined(PNG_READ_EXPAND_SUPPORTED) +#if defined(PNG_READ_PACK_SUPPORTED) /* Extract multiple pixels with bit depths of 1, 2, or 4 from a single * byte into separate bytes (useful for paletted and grayscale images). */