[libpng17] Added png_get_palette_max() function.

This commit is contained in:
Glenn Randers-Pehrson 2013-02-04 19:55:53 -06:00
parent 9124f3e29a
commit d304125332
6 changed files with 40 additions and 25 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.7.0alpha10 - February 4, 2013
Libpng 1.7.0alpha10 - February 5, 2013
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.
@ -116,10 +116,11 @@ Version 1.7.0alpha08 [January 17, 2013]
Version 1.7.0alpha09 [January 21, 2013]
Pulled changes to multi-chunk handling from libpng-1.6.0beta40.
Version 1.7.0alpha10 [February 4, 2013]
Version 1.7.0alpha10 [February 5, 2013]
Make symbol prefixing work with the ARM neon optimizations. Also
allow pngpriv.h to be included for preprocessor definitions only, so
it can be used in non-C/C++ files.
Added png_get_palette_max() function.
===========================================================================
NOTICE November 17, 2012:

View File

@ -4402,10 +4402,11 @@ Version 1.7.0alpha08 [January 17, 2013]
Version 1.7.0alpha09 [January 21, 2013]
Pulled changes to multi-chunk handling from libpng-1.6.0beta40.
Version 1.7.0alpha10 [February 4, 2013]
Version 1.7.0alpha10 [February 5, 2013]
Make symbol prefixing work with the ARM neon optimizations. Also
allow pngpriv.h to be included for preprocessor definitions only, so
it can be used in non-C/C++ files.
Added png_get_palette_max() function.
===========================================================================
NOTICE November 17, 2012:

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.7.0alpha10 - January 21, 2013
libpng version 1.7.0alpha10 - February 5, 2013
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2013 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.0alpha10 - January 21, 2013
libpng versions 0.97, January 1998, through 1.7.0alpha10 - February 5, 2013
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -676,9 +676,6 @@ where 0x7fffffffL means unlimited. You can retrieve this limit with
chunk_cache_max = png_get_chunk_cache_max(png_ptr);
This limit also applies to the number of buffers that can be allocated
by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks.
You can also set a limit on the amount of memory that a compressed chunk
other than IDAT can occupy, with
@ -4594,6 +4591,14 @@ If the error is ignored, or if png_benign_error() treats it as a warning,
any invalid pixels are decoded as opaque black by the decoder and written
as-is by the encoder.
Retrieving the maximum palette index found was added at libpng-1.5.15.
This statement must appear after png_read_png() or png_read_image().
int max_palette = png_get_palette_max(png_ptr, info_ptr);
This will return the maximum palette index found, or "-1" if the palette
was not checked, or "0" if no palette was found.
A. Changes that affect users of libpng
There are no substantial API changes between the non-deprecated parts of
@ -5161,7 +5166,7 @@ Other rules can be inferred by inspecting the libpng source.
XVII. Y2K Compliance in libpng
January 21, 2013
February 5, 2013
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "January 21, 2013"
.TH LIBPNG 3 "February 5, 2013"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0alpha10
.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.0alpha10 - January 21, 2013
libpng version 1.7.0alpha10 - February 5, 2013
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2013 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.0alpha10 - January 21, 2013
libpng versions 0.97, January 1998, through 1.7.0alpha10 - February 5, 2013
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -1170,9 +1170,6 @@ where 0x7fffffffL means unlimited. You can retrieve this limit with
chunk_cache_max = png_get_chunk_cache_max(png_ptr);
This limit also applies to the number of buffers that can be allocated
by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks.
You can also set a limit on the amount of memory that a compressed chunk
other than IDAT can occupy, with
@ -5089,6 +5086,14 @@ If the error is ignored, or if png_benign_error() treats it as a warning,
any invalid pixels are decoded as opaque black by the decoder and written
as-is by the encoder.
Retrieving the maximum palette index found was added at libpng-1.5.15.
This statement must appear after png_read_png() or png_read_image().
int max_palette = png_get_palette_max(png_ptr, info_ptr);
This will return the maximum palette index found, or "-1" if the palette
was not checked, or "0" if no palette was found.
A. Changes that affect users of libpng
There are no substantial API changes between the non-deprecated parts of
@ -5656,7 +5661,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVII. Y2K Compliance in libpng
January 21, 2013
February 5, 2013
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@ -5925,7 +5930,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.7.0alpha10 - January 21, 2013:
Libpng version 1.7.0alpha10 - February 5, 2013:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -5948,7 +5953,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha10, January 21, 2013, are
libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha10, February 5, 2013, 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
@ -6047,7 +6052,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
January 21, 2013
February 5, 2013
.\" end of man page

14
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.7.0alpha10 - January 21, 2013
* libpng version 1.7.0alpha10 - February 5, 2013
* 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.0alpha10 - January 21, 2013: Glenn
* libpng versions 0.97, January 1998, through 1.7.0alpha10 - February 5, 2013: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -199,7 +199,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha10, January 21, 2013, are
* libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha10, February 5, 2013, 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:
@ -311,7 +311,7 @@
* Y2K compliance in libpng:
* =========================
*
* January 21, 2013
* February 5, 2013
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@ -379,7 +379,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.7.0alpha10"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.7.0alpha10 - January 21, 2013\n"
" libpng version 1.7.0alpha10 - February 5, 2013\n"
#define PNG_LIBPNG_VER_SONUM 17
#define PNG_LIBPNG_VER_DLLNUM 17
@ -3208,6 +3208,8 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED)
PNG_EXPORT(242, void, png_set_check_for_invalid_index,
(png_structrp png_ptr, int allowed));
PNG_EXPORT(243, void, png_get_palette_max, (png_structp png_ptr,
png_const_infop info_ptr));
#endif
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
@ -3219,7 +3221,7 @@ PNG_EXPORT(242, void, png_set_check_for_invalid_index,
* scripts/symbols.def as well.
*/
#ifdef PNG_EXPORT_LAST_ORDINAL
PNG_EXPORT_LAST_ORDINAL(242);
PNG_EXPORT_LAST_ORDINAL(243);
#endif
#ifdef __cplusplus

View File

@ -241,3 +241,4 @@ EXPORTS
png_image_write_to_stdio @240
png_convert_to_rfc1123_buffer @241
png_set_check_for_invalid_index @242
png_get_palette_max @243