[libpng15] Added documentation of new png_get_palette_max() function.
diff --git a/ANNOUNCE b/ANNOUNCE
index 2134677..fec4c11 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.5.15beta01 - February 4, 2013
+Libpng 1.5.15beta01 - 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.
@@ -26,10 +26,11 @@
Changes since the last public release (1.5.14):
-Version 1.5.15beta01 [February 4, 2013]
+Version 1.5.15beta01 [February 5, 2013]
Enabled renaming of the extern (but not DLL exported) ARM filter functions.
Also enabled inclusion of pngpriv.h in non-C files by preventing C/C++
specific definitions if PNG_VERSION_INFO_ONLY is defined.
+ Added png_get_palette_max() function.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index 7984f91..81d988a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3983,10 +3983,11 @@
Version 1.5.14 [January 24, 2013]
Removed an obsolete line from the manual.
-Version 1.5.15beta01 [February 4, 2013]
+Version 1.5.15beta01 [February 5, 2013]
Enabled renaming of the extern (but not DLL exported) ARM filter functions.
Also enabled inclusion of pngpriv.h in non-C files by preventing C/C++
specific definitions if PNG_VERSION_INFO_ONLY is defined.
+ Added png_get_palette_max() function.
===========================================================================
NOTICE November 17, 2012:
diff --git a/libpng-manual.txt b/libpng-manual.txt
index 4025a9f..55c9a8c 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.5.15beta01 - January 24, 2013
+ libpng version 1.5.15beta01 - February 5, 2013
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2012 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@
Based on:
- libpng versions 0.97, January 1998, through 1.5.15beta01 - January 24, 2013
+ libpng versions 0.97, January 1998, through 1.5.15beta01 - February 5, 2013
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2012 Glenn Randers-Pehrson
@@ -4161,6 +4161,14 @@
0: disable
1: enable
+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
@@ -4609,7 +4617,7 @@
XIV. Y2K Compliance in libpng
-January 24, 2013
+February 5, 2013
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 1eccd41..28a5760 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,4 +1,4 @@
-.TH LIBPNG 3 "January 24, 2013"
+.TH LIBPNG 3 "February 5, 2013"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.15beta01
.SH SYNOPSIS
@@ -492,7 +492,7 @@
.SH LIBPNG.TXT
Libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.5.15beta01 - January 24, 2013
+ libpng version 1.5.15beta01 - February 5, 2013
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2012 Glenn Randers-Pehrson
@@ -503,7 +503,7 @@
Based on:
- libpng versions 0.97, January 1998, through 1.5.15beta01 - January 24, 2013
+ libpng versions 0.97, January 1998, through 1.5.15beta01 - February 5, 2013
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2012 Glenn Randers-Pehrson
@@ -4654,6 +4654,14 @@
0: disable
1: enable
+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
@@ -5102,7 +5110,7 @@
.SH XIV. Y2K Compliance in libpng
-January 24, 2013
+February 5, 2013
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@@ -5331,7 +5339,6 @@
1.5.14beta01-08 15 10514 15.so.15.14[.0]
1.5.14rc01-03 15 10514 15.so.15.14[.0]
1.5.14 15 10514 15.so.15.14[.0]
- 1.5.15beta01 15 10515 15.so.15.15[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -5388,7 +5395,7 @@
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.5.15beta01 - January 24, 2013:
+Libpng version 1.5.15beta01 - 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).
@@ -5411,7 +5418,7 @@
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.5.15beta01, January 24, 2013, are
+libpng versions 1.2.6, August 15, 2004, through 1.5.15beta01, 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
@@ -5510,7 +5517,7 @@
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-January 24, 2013
+February 5, 2013
.\" end of man page
diff --git a/pngget.c b/pngget.c
index c9a663f..076ac4f 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,8 +1,8 @@
/* pngget.c - retrieval of values from info struct
*
- * Last changed in libpng 1.5.14 [January 24, 2013]
- * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.15 [(PENDING RELEASE)]
+ * 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.)
*
@@ -1127,4 +1127,16 @@
}
#endif /* ?PNG_IO_STATE_SUPPORTED */
+#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
+int PNGAPI
+png_get_max_palette_index(png_const_structp png_ptr, png_const_infop info_ptr)
+{
+ if (png_ptr != NULL && info_ptr != NULL)
+ return png_ptr->num_palette_max;
+
+ return (-1);
+}
+#endif
+
+
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
diff --git a/scripts/symbols.def b/scripts/symbols.def
index 8fb6c6b..b77c695 100644
--- a/scripts/symbols.def
+++ b/scripts/symbols.def
@@ -240,3 +240,4 @@
png_set_cHRM_XYZ @232
png_set_cHRM_XYZ_fixed @233
png_set_check_for_invalid_index @234
+ png_get_palette_max @235