[libpng17] Rearranged png.h to put the major sections in the same order as

in libpng16.
This commit is contained in:
Glenn Randers-Pehrson 2015-07-25 20:59:09 -05:00
parent e1ff1cc930
commit 47b6a93924
3 changed files with 102 additions and 94 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.7.0beta64 - June 10, 2015 Libpng 1.7.0beta64 - July 26, 2015
This is not intended to be a public release. It will be replaced 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. within a few weeks by a public version or by another test version.
@ -835,7 +835,7 @@ Version 1.7.0beta63 [June 6, 2015]
to compile them without the minimum required support enabled to compile them without the minimum required support enabled
(suggested by Flavio Medeiros). (suggested by Flavio Medeiros).
Version 1.7.0beta64 [June 10, 2015] Version 1.7.0beta64 [July 26, 2015]
Removed non-working progressive reader 'skip' function. This Removed non-working progressive reader 'skip' function. This
function has apparently never been used. It was implemented function has apparently never been used. It was implemented
to support back-door modification of png_struct in libpng-1.4.x to support back-door modification of png_struct in libpng-1.4.x
@ -847,6 +847,8 @@ Version 1.7.0beta64 [June 10, 2015]
file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will
be used. be used.
Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h
Rearranged png.h to put the major sections in the same order as
in libpng16.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

39
CHANGES
View File

@ -162,7 +162,7 @@ Version 0.95 [March, 1997]
Added new pCAL chunk read/write support Added new pCAL chunk read/write support
Added experimental filter selection weighting (Greg Roelofs) Added experimental filter selection weighting (Greg Roelofs)
Removed old png_set_rgbx() and png_set_xrgb() functions that have been Removed old png_set_rgbx() and png_set_xrgb() functions that have been
obsolete for about 2 years now (use png_set_filler() instead) obsolete for about 2 years now (use png_set_filler() instead)
Added macros to read 16- and 32-bit ints directly from buffer, to be Added macros to read 16- and 32-bit ints directly from buffer, to be
used only on those systems that support it (namely PowerPC and 680x0) used only on those systems that support it (namely PowerPC and 680x0)
With some testing, this may become the default for MACOS/PPC systems. With some testing, this may become the default for MACOS/PPC systems.
@ -444,7 +444,7 @@ Version 1.0.3 [January 14, 1999]
Version 1.0.3a [August 12, 1999] Version 1.0.3a [August 12, 1999]
Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning
if an attempt is made to read an interlaced image when it's not supported. if an attempt is made to read an interlaced image when it's not supported.
Added check if png_ptr->trans is defined before freeing it in pngread.c Added check if png_ptr->trans is defined before freeing it in pngread.c
Modified the Y2K statement to include versions back to version 0.71 Modified the Y2K statement to include versions back to version 0.71
Fixed a bug in the check for valid IHDR bit_depth/color_types in pngrutil.c Fixed a bug in the check for valid IHDR bit_depth/color_types in pngrutil.c
@ -452,7 +452,7 @@ Version 1.0.3a [August 12, 1999]
Replaced leading blanks with tab characters in makefile.hux Replaced leading blanks with tab characters in makefile.hux
Changed "dworkin.wustl.edu" to "ccrc.wustl.edu" in various documents. Changed "dworkin.wustl.edu" to "ccrc.wustl.edu" in various documents.
Changed (float)red and (float)green to (double)red, (double)green Changed (float)red and (float)green to (double)red, (double)green
in png_set_rgb_to_gray() to avoid "promotion" problems in AIX. in png_set_rgb_to_gray() to avoid "promotion" problems in AIX.
Fixed a bug in pngconf.h that omitted <stdio.h> when PNG_DEBUG==0 (K Bracey). Fixed a bug in pngconf.h that omitted <stdio.h> when PNG_DEBUG==0 (K Bracey).
Reformatted libpng.3 and libpngpf.3 with proper fonts (script by J. vanZandt). Reformatted libpng.3 and libpngpf.3 with proper fonts (script by J. vanZandt).
Updated documentation to refer to the PNG-1.2 specification. Updated documentation to refer to the PNG-1.2 specification.
@ -495,7 +495,7 @@ Version 1.0.3d [September 4, 1999]
Added new png_expand functions to scripts/pngdef.pas and pngos2.def Added new png_expand functions to scripts/pngdef.pas and pngos2.def
Added a demo read_user_transform_fn that examines the row filters in pngtest.c Added a demo read_user_transform_fn that examines the row filters in pngtest.c
Version 1.0.4 [September 24, 1999] Version 1.0.4 [September 24, 1999, not distributed publicly]
Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined
Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h
Made several minor corrections to pngtest.c Made several minor corrections to pngtest.c
@ -522,6 +522,7 @@ Version 1.0.4c [October 1, 1999]
Added a "png_check_version" function in png.c and pngtest.c that will generate Added a "png_check_version" function in png.c and pngtest.c that will generate
a helpful compiler error if an old png.h is found in the search path. a helpful compiler error if an old png.h is found in the search path.
Changed type of png_user_transform_depth|channels from int to png_byte. Changed type of png_user_transform_depth|channels from int to png_byte.
Added "Libpng is OSI Certified Open Source Software" statement to png.h
Version 1.0.4d [October 6, 1999] Version 1.0.4d [October 6, 1999]
Changed 0.45 to 0.45455 in png_set_sRGB() Changed 0.45 to 0.45455 in png_set_sRGB()
@ -908,7 +909,7 @@ Version 1.0.7 [July 1, 2000]
Version 1.0.8beta1 [July 8, 2000] Version 1.0.8beta1 [July 8, 2000]
Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks. Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
pngwutil.c. pngwutil.c.
Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h. Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h.
Removed unused "#include <assert.h>" from png.c Removed unused "#include <assert.h>" from png.c
Added WindowsCE support. Added WindowsCE support.
@ -916,12 +917,12 @@ Version 1.0.8beta1 [July 8, 2000]
Version 1.0.8beta2 [July 10, 2000] Version 1.0.8beta2 [July 10, 2000]
Added project files to the wince directory and made further revisions Added project files to the wince directory and made further revisions
of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE. of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE.
Version 1.0.8beta3 [July 11, 2000] Version 1.0.8beta3 [July 11, 2000]
Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS() Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS()
for indexed-color input files to avoid potential double-freeing trans array for indexed-color input files to avoid potential double-freeing trans array
under some unusual conditions; problem was introduced in version 1.0.6f. under some unusual conditions; problem was introduced in version 1.0.6f.
Further revisions to pngtest.c and files in the wince subdirectory. Further revisions to pngtest.c and files in the wince subdirectory.
Version 1.0.8beta4 [July 14, 2000] Version 1.0.8beta4 [July 14, 2000]
@ -1093,16 +1094,16 @@ Version 1.2.0beta3 [May 17, 2001]
Version 1.2.0beta4 [June 23, 2001] Version 1.2.0beta4 [June 23, 2001]
Check for missing profile length field in iCCP chunk and free chunk_data Check for missing profile length field in iCCP chunk and free chunk_data
in case of truncated iCCP chunk. in case of truncated iCCP chunk.
Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc
Bumped dll-number from 2 to 3 in makefile.cygwin Bumped dll-number from 2 to 3 in makefile.cygwin
Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly
if user attempts to run it on an 8-bit display. if user attempts to run it on an 8-bit display.
Updated contrib/gregbook Updated contrib/gregbook
Use png_malloc instead of png_zalloc to allocate palette in pngset.c Use png_malloc instead of png_zalloc to allocate palette in pngset.c
Updated makefile.ibmc Updated makefile.ibmc
Added some typecasts to eliminate gcc 3.0 warnings. Changed prototypes Added some typecasts to eliminate gcc 3.0 warnings. Changed prototypes
of png_write_oFFS width and height from png_uint_32 to png_int_32. of png_write_oFFS width and height from png_uint_32 to png_int_32.
Updated example.c Updated example.c
Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
@ -1110,9 +1111,9 @@ Version 1.2.0beta5 [August 8, 2001]
Revised contrib/gregbook Revised contrib/gregbook
Revised makefile.gcmmx Revised makefile.gcmmx
Revised pnggccrd.c to conditionally compile some thread-unsafe code only Revised pnggccrd.c to conditionally compile some thread-unsafe code only
when PNG_THREAD_UNSAFE_OK is defined. when PNG_THREAD_UNSAFE_OK is defined.
Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with
value exceeding 2^bit_depth-1 value exceeding 2^bit_depth-1
Revised makefile.sgi and makefile.sggcc Revised makefile.sgi and makefile.sggcc
Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
Removed restriction that do_invert_mono only operate on 1-bit opaque files Removed restriction that do_invert_mono only operate on 1-bit opaque files
@ -1498,7 +1499,7 @@ Version 1.0.16rc4 and 1.2.6rc4 [August 10, 2004]
Version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004] Version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004]
Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED
section of png.h where they were inadvertently placed in version rc3. section of png.h where they were inadvertently placed in version rc3.
Version 1.2.6 and 1.0.16 [August 15, 2004] Version 1.2.6 and 1.0.16 [August 15, 2004]
Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1. Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1.
@ -1566,7 +1567,7 @@ Version 1.2.8rc2 [November 26, 2004]
Added two missing "\" in png.h Added two missing "\" in png.h
Change tests in pngread.c and pngpread.c to Change tests in pngread.c and pngpread.c to
if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))
png_do_read_transformations(png_ptr); png_do_read_transformations(png_ptr);
Version 1.2.8rc3 [November 28, 2004] Version 1.2.8rc3 [November 28, 2004]
Reverted pngrutil.c to version libpng-1.2.8beta5. Reverted pngrutil.c to version libpng-1.2.8beta5.
@ -2330,7 +2331,7 @@ Version 1.4.0beta63 [June 15, 2009]
Version 1.4.0beta64 [June 24, 2009] Version 1.4.0beta64 [June 24, 2009]
Eliminated PNG_LEGACY_SUPPORTED code. Eliminated PNG_LEGACY_SUPPORTED code.
Moved the various unknown chunk macro definitions outside of the Moved the various unknown chunk macro definitions outside of the
PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks. PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks.
Version 1.4.0beta65 [June 26, 2009] Version 1.4.0beta65 [June 26, 2009]
Added a reference to the libpng license in each file. Added a reference to the libpng license in each file.
@ -4570,7 +4571,7 @@ Version 1.7.0beta12 [April 30, 2013]
png_set_unknown_chunk_location(). png_set_unknown_chunk_location().
Expanded manual paragraph about writing private chunks. Expanded manual paragraph about writing private chunks.
Avoid dereferencing NULL pointer possibly returned from Avoid dereferencing NULL pointer possibly returned from
png_create_write_struct() (Andrew Church). png_create_write_struct() (Andrew Church).
Version 1.7.0beta13 [May 12, 2013] Version 1.7.0beta13 [May 12, 2013]
Revised contrib/pngminim/*/makefile to generate pnglibconf.h with the Revised contrib/pngminim/*/makefile to generate pnglibconf.h with the
@ -5130,7 +5131,7 @@ Version 1.7.0beta63 [June 6, 2015]
to compile them without the minimum required support enabled to compile them without the minimum required support enabled
(suggested by Flavio Medeiros). (suggested by Flavio Medeiros).
Version 1.7.0beta64 [June 10, 2015] Version 1.7.0beta64 [July 26, 2015]
Removed non-working progressive reader 'skip' function. This Removed non-working progressive reader 'skip' function. This
function has apparently never been used. It was implemented function has apparently never been used. It was implemented
to support back-door modification of png_struct in libpng-1.4.x to support back-door modification of png_struct in libpng-1.4.x
@ -5142,6 +5143,8 @@ Version 1.7.0beta64 [June 10, 2015]
file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will file handling, define PNG_USE_MKSTEMP, otherwise "tmpfile()" will
be used. be used.
Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h
Rearranged png.h to put the major sections in the same order as
in libpng16.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

151
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library /* png.h - header file for PNG reference library
* *
* libpng version 1.7.0beta64, June 10, 2015 * libpng version 1.7.0beta64, July 26, 2015
* *
* Copyright (c) 1998-2015 Glenn Randers-Pehrson * Copyright (c) 1998-2015 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -11,8 +11,8 @@
* *
* Authors and maintainers: * Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * 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.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.7.0beta64, June 10, 2015: Glenn * libpng versions 0.97, January 1998, through 1.7.0beta64, July 26, 2015: Glenn
* See also "Contributing Authors", below. * See also "Contributing Authors", below.
* *
* Note about libpng version numbers: * Note about libpng version numbers:
@ -214,7 +214,11 @@
* 1.6.16rc01-02 16 10616 16.so.16.16[.0] * 1.6.16rc01-02 16 10616 16.so.16.16[.0]
* 1.6.16 16 10616 16.so.16.16[.0] * 1.6.16 16 10616 16.so.16.16[.0]
* 1.6.17beta01-06 16 10617 16.so.16.17[.0] * 1.6.17beta01-06 16 10617 16.so.16.17[.0]
* 1.6.17rc01 16 10617 16.so.16.17[.0] * 1.6.17rc01-06 16 10617 16.so.16.17[.0]
* 1.6.17 16 10617 16.so.16.17[.0]
* 1.6.18beta01-09 16 10618 16.so.16.18[.0]
* 1.6.18rc01-03 16 10618 16.so.16.18[.0]
* 1.6.18 16 10618 16.so.16.18[.0]
* 1.7.0alpha01-10 17 10700 17.so.17.0[.0] * 1.7.0alpha01-10 17 10700 17.so.17.0[.0]
* 1.7.0beta01-64 17 10700 17.so.17.0[.0] * 1.7.0beta01-64 17 10700 17.so.17.0[.0]
* *
@ -248,21 +252,16 @@
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* *
* libpng versions 1.2.6, August 15, 2004, through 1.7.0beta64, June 10, 2015, are * libpng versions 1.0.7, July 1, 2000, through 1.7.0beta64, July 26, 2015, are
* Copyright (c) 2004, 2006-2015 Glenn Randers-Pehrson, and are * Copyright (c) 2000-2002, 2004, 2006-2015 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:
*
* Cosmin Truta
*
* libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are
* Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.0.6 * distributed according to the same disclaimer and license as libpng-1.0.6
* with the following individuals added to the list of Contributing Authors: * with the following individuals added to the list of Contributing Authors:
* *
* Simon-Pierre Cadieux * Simon-Pierre Cadieux
* Eric S. Raymond * Mans Rullgard
* Cosmin Truta
* Gilles Vollant * Gilles Vollant
* James Yu
* *
* and with the following additions to the disclaimer: * and with the following additions to the disclaimer:
* *
@ -274,17 +273,18 @@
* the user. * the user.
* *
* libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are * Copyright (c) 1998-2000 Glenn Randers-Pehrson, and are distributed according
* distributed according to the same disclaimer and license as libpng-0.96, * to the same disclaimer and license as libpng-0.96, with the following
* with the following individuals added to the list of Contributing Authors: * individuals added to the list of Contributing Authors:
* *
* Tom Lane * Tom Lane
* Glenn Randers-Pehrson * Glenn Randers-Pehrson
* Eric S. Raymond
* Willem van Schaik * Willem van Schaik
* *
* libpng versions 0.89, June 1996, through 0.96, May 1997, are * libpng versions 0.89, June 1996, through 0.96, May 1997, are
* Copyright (c) 1996, 1997 Andreas Dilger * Copyright (c) 1996-1997 Andreas Dilger, and are
* Distributed according to the same disclaimer and license as libpng-0.88, * distributed according to the same disclaimer and license as libpng-0.88,
* with the following individuals added to the list of Contributing Authors: * with the following individuals added to the list of Contributing Authors:
* *
* John Bowler * John Bowler
@ -295,7 +295,7 @@
* Tom Tanner * Tom Tanner
* *
* libpng versions 0.5, May 1995, through 0.88, January 1996, are * libpng versions 0.5, May 1995, through 0.88, January 1996, are
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* *
* For the purposes of this copyright and license, "Contributing Authors" * For the purposes of this copyright and license, "Contributing Authors"
* is defined as the following set of individuals: * is defined as the following set of individuals:
@ -323,8 +323,8 @@
* 2. Altered versions must be plainly marked as such and must not * 2. Altered versions must be plainly marked as such and must not
* be misrepresented as being the original source. * be misrepresented as being the original source.
* *
* 3. This Copyright notice may not be removed or altered from * 3. This Copyright notice may not be removed or altered from any
* any source or altered source distribution. * source or altered source distribution.
* *
* The Contributing Authors and Group 42, Inc. specifically permit, without * The Contributing Authors and Group 42, Inc. specifically permit, without
* fee, and encourage the use of this source code as a component to * fee, and encourage the use of this source code as a component to
@ -337,15 +337,16 @@
* A "png_get_copyright" function is available, for convenient use in "about" * A "png_get_copyright" function is available, for convenient use in "about"
* boxes and the like: * boxes and the like:
* *
* printf("%s", png_get_copyright(NULL)); * printf("%s", png_get_copyright(NULL));
* *
* Also, the PNG logo (in PNG format, of course) is supplied in the * Also, the PNG logo (in PNG format, of course) is supplied in the
* files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
*/ */
/* /*
* Libpng is OSI Certified Open Source Software. OSI Certified is a * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
* certification mark of the Open Source Initiative. * a certification mark of the Open Source Initiative. OSI has not addressed
* the additional disclaimers inserted at version 1.0.7.
*/ */
/* /*
@ -360,7 +361,7 @@
* Y2K compliance in libpng: * Y2K compliance in libpng:
* ========================= * =========================
* *
* June 10, 2015 * July 26, 2015
* *
* Since the PNG Development group is an ad-hoc body, we can't make * Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration. * an official declaration.
@ -430,7 +431,7 @@
/* Version information for png.h - this should match the version in png.c */ /* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.7.0beta64" #define PNG_LIBPNG_VER_STRING "1.7.0beta64"
#define PNG_HEADER_VERSION_STRING \ #define PNG_HEADER_VERSION_STRING \
" libpng version 1.7.0beta64 - June 10, 2015\n" " libpng version 1.7.0beta64 - July 26, 2015\n"
#define PNG_LIBPNG_VER_SONUM 17 #define PNG_LIBPNG_VER_SONUM 17
#define PNG_LIBPNG_VER_DLLNUM 17 #define PNG_LIBPNG_VER_DLLNUM 17
@ -529,6 +530,7 @@
* definitions. * definitions.
* 4. Exported library functions. * 4. Exported library functions.
* 5. Simplified API. * 5. Simplified API.
* 6. Implementation options
* *
* The library source code has additional files (principally pngpriv.h) that * The library source code has additional files (principally pngpriv.h) that
* allow configuration of the library. * allow configuration of the library.
@ -2855,53 +2857,6 @@ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structrp png_ptr,
# endif # endif
#endif /* CHECK_FOR_INVALID_INDEX */ #endif /* CHECK_FOR_INVALID_INDEX */
/*******************************************************************************
* IMPLEMENTATION OPTIONS
*******************************************************************************
*
* Support for arbitrary implementation-specific optimizations. The API allows
* particular options to be turned on or off. 'Option' is the number of the
* option and 'onoff' is 0 (off) or non-0 (on). The value returned is given
* by the PNG_OPTION_ defines below.
*
* HARDWARE: normally hardware capabilites, such as the Intel SSE instructions,
* are detected at run time, however sometimes it may be impossible
* to do this in user mode, in which case it is necessary to discover
* the capabilities in an OS specific way. Such capabilities are
* listed here when libpng has support for them and must be turned
* ON by the application if present.
*
* SOFTWARE: sometimes software optimizations actually result in performance
* decrease on some architectures or systems, or with some sets of
* PNG images. 'Software' options allow such optimizations to be
* selected at run time.
*/
#ifdef PNG_SET_OPTION_SUPPORTED
#ifdef PNG_ARM_NEON_API_SUPPORTED
# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */
#endif
#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */
#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */
#define PNG_OPTION_NEXT 6 /* Next option - numbers must be even */
/* Return values: NOTE: there are four values and 'off' is *not* zero */
#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
#define PNG_OPTION_INVALID 1 /* Option number out of range */
#define PNG_OPTION_OFF 2
#define PNG_OPTION_ON 3
PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
int onoff));
#endif
/*******************************************************************************
* END OF HARDWARE OPTIONS
******************************************************************************/
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
* defs
*/
/******************************************************************************* /*******************************************************************************
* Section 5: SIMPLIFIED API * Section 5: SIMPLIFIED API
******************************************************************************* *******************************************************************************
@ -3355,6 +3310,54 @@ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file,
* END OF SIMPLIFIED API * END OF SIMPLIFIED API
******************************************************************************/ ******************************************************************************/
/*******************************************************************************
* Section 6: IMPLEMENTATION OPTIONS
*******************************************************************************
*
* Support for arbitrary implementation-specific optimizations. The API allows
* particular options to be turned on or off. 'Option' is the number of the
* option and 'onoff' is 0 (off) or non-0 (on). The value returned is given
* by the PNG_OPTION_ defines below.
*
* HARDWARE: normally hardware capabilites, such as the Intel SSE instructions,
* are detected at run time, however sometimes it may be impossible
* to do this in user mode, in which case it is necessary to discover
* the capabilities in an OS specific way. Such capabilities are
* listed here when libpng has support for them and must be turned
* ON by the application if present.
*
* SOFTWARE: sometimes software optimizations actually result in performance
* decrease on some architectures or systems, or with some sets of
* PNG images. 'Software' options allow such optimizations to be
* selected at run time.
*/
#ifdef PNG_SET_OPTION_SUPPORTED
#ifdef PNG_ARM_NEON_API_SUPPORTED
# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */
#endif
#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */
#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */
#define PNG_OPTION_NEXT 6 /* Next option - numbers must be even */
/* Return values: NOTE: there are four values and 'off' is *not* zero */
#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
#define PNG_OPTION_INVALID 1 /* Option number out of range */
#define PNG_OPTION_OFF 2
#define PNG_OPTION_ON 3
PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
int onoff));
#endif
/*******************************************************************************
* END OF HARDWARE OPTIONS
******************************************************************************/
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
* defs
*/
/* The last ordinal number (this is the *last* one already used; the next /* The last ordinal number (this is the *last* one already used; the next
* one to use is one more than this.) Maintainer, remember to add an entry to * one to use is one more than this.) Maintainer, remember to add an entry to
* scripts/symbols.def as well. * scripts/symbols.def as well.