--- /dev/null
+\r
+/* pngconf.h - machine configurable file for libpng\r
+ *\r
+ * libpng version 1.2.33 - October 31, 2008\r
+ * For conditions of distribution and use, see copyright notice in png.h\r
+ * Copyright (c) 1998-2008 Glenn Randers-Pehrson\r
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\r
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\r
+ */\r
+\r
+/* Any machine specific code is near the front of this file, so if you\r
+ * are configuring libpng for a machine, you may want to read the section\r
+ * starting here down to where it starts to typedef png_color, png_text,\r
+ * and png_info.\r
+ */\r
+\r
+#ifndef PNGCONF_H\r
+#define PNGCONF_H\r
+\r
+#define PNG_1_2_X\r
+\r
+/* \r
+ * PNG_USER_CONFIG has to be defined on the compiler command line. This\r
+ * includes the resource compiler for Windows DLL configurations.\r
+ */\r
+#ifdef PNG_USER_CONFIG\r
+# ifndef PNG_USER_PRIVATEBUILD\r
+# define PNG_USER_PRIVATEBUILD\r
+# endif\r
+#include "pngusr.h"\r
+#endif\r
+\r
+/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */\r
+#ifdef PNG_CONFIGURE_LIBPNG\r
+#ifdef HAVE_CONFIG_H\r
+#include "config.h"\r
+#endif\r
+#endif\r
+\r
+/*\r
+ * Added at libpng-1.2.8\r
+ * \r
+ * If you create a private DLL you need to define in "pngusr.h" the followings:\r
+ * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of\r
+ * the DLL was built>\r
+ * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."\r
+ * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to\r
+ * distinguish your DLL from those of the official release. These\r
+ * correspond to the trailing letters that come after the version\r
+ * number and must match your private DLL name>\r
+ * e.g. // private DLL "libpng13gx.dll"\r
+ * #define PNG_USER_DLLFNAME_POSTFIX "gx"\r
+ * \r
+ * The following macros are also at your disposal if you want to complete the \r
+ * DLL VERSIONINFO structure.\r
+ * - PNG_USER_VERSIONINFO_COMMENTS\r
+ * - PNG_USER_VERSIONINFO_COMPANYNAME\r
+ * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS\r
+ */\r
+\r
+#ifdef __STDC__\r
+#ifdef SPECIALBUILD\r
+# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\\r
+ are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")\r
+#endif\r
+\r
+#ifdef PRIVATEBUILD\r
+# pragma message("PRIVATEBUILD is deprecated.\\r
+ Use PNG_USER_PRIVATEBUILD instead.")\r
+# define PNG_USER_PRIVATEBUILD PRIVATEBUILD\r
+#endif\r
+#endif /* __STDC__ */\r
+\r
+#ifndef PNG_VERSION_INFO_ONLY\r
+\r
+/* End of material added to libpng-1.2.8 */\r
+\r
+/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble\r
+ Restored at libpng-1.2.21 */\r
+#if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \\r
+ !defined(PNG_WARN_UNINITIALIZED_ROW)\r
+# define PNG_WARN_UNINITIALIZED_ROW 1\r
+#endif\r
+/* End of material added at libpng-1.2.19/1.2.21 */\r
+\r
+/* This is the size of the compression buffer, and thus the size of\r
+ * an IDAT chunk. Make this whatever size you feel is best for your\r
+ * machine. One of these will be allocated per png_struct. When this\r
+ * is full, it writes the data to the disk, and does some other\r
+ * calculations. Making this an extremely small size will slow\r
+ * the library down, but you may want to experiment to determine\r
+ * where it becomes significant, if you are concerned with memory\r
+ * usage. Note that zlib allocates at least 32Kb also. For readers,\r
+ * this describes the size of the buffer available to read the data in.\r
+ * Unless this gets smaller than the size of a row (compressed),\r
+ * it should not make much difference how big this is.\r
+ */\r
+\r
+#ifndef PNG_ZBUF_SIZE\r
+# define PNG_ZBUF_SIZE 8192\r
+#endif\r
+\r
+/* Enable if you want a write-only libpng */\r
+\r
+#ifndef PNG_NO_READ_SUPPORTED\r
+# define PNG_READ_SUPPORTED\r
+#endif\r
+\r
+/* Enable if you want a read-only libpng */\r
+\r
+#ifndef PNG_NO_WRITE_SUPPORTED\r
+# define PNG_WRITE_SUPPORTED\r
+#endif\r
+\r
+/* Enabled by default in 1.2.0. You can disable this if you don't need to\r
+ support PNGs that are embedded in MNG datastreams */\r
+#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)\r
+# ifndef PNG_MNG_FEATURES_SUPPORTED\r
+# define PNG_MNG_FEATURES_SUPPORTED\r
+# endif\r
+#endif\r
+\r
+#ifndef PNG_NO_FLOATING_POINT_SUPPORTED\r
+# ifndef PNG_FLOATING_POINT_SUPPORTED\r
+# define PNG_FLOATING_POINT_SUPPORTED\r
+# endif\r
+#endif\r
+\r
+/* If you are running on a machine where you cannot allocate more\r
+ * than 64K of memory at once, uncomment this. While libpng will not\r
+ * normally need that much memory in a chunk (unless you load up a very\r
+ * large file), zlib needs to know how big of a chunk it can use, and\r
+ * libpng thus makes sure to check any memory allocation to verify it\r
+ * will fit into memory.\r
+#define PNG_MAX_MALLOC_64K\r
+ */\r
+#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)\r
+# define PNG_MAX_MALLOC_64K\r
+#endif\r
+\r
+/* Special munging to support doing things the 'cygwin' way:\r
+ * 'Normal' png-on-win32 defines/defaults:\r
+ * PNG_BUILD_DLL -- building dll\r
+ * PNG_USE_DLL -- building an application, linking to dll\r
+ * (no define) -- building static library, or building an\r
+ * application and linking to the static lib\r
+ * 'Cygwin' defines/defaults:\r
+ * PNG_BUILD_DLL -- (ignored) building the dll\r
+ * (no define) -- (ignored) building an application, linking to the dll\r
+ * PNG_STATIC -- (ignored) building the static lib, or building an \r
+ * application that links to the static lib.\r
+ * ALL_STATIC -- (ignored) building various static libs, or building an \r
+ * application that links to the static libs.\r
+ * Thus,\r
+ * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and\r
+ * this bit of #ifdefs will define the 'correct' config variables based on\r
+ * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but\r
+ * unnecessary.\r
+ *\r
+ * Also, the precedence order is:\r
+ * ALL_STATIC (since we can't #undef something outside our namespace)\r
+ * PNG_BUILD_DLL\r
+ * PNG_STATIC\r
+ * (nothing) == PNG_USE_DLL\r
+ * \r
+ * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent\r
+ * of auto-import in binutils, we no longer need to worry about \r
+ * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,\r
+ * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes\r
+ * to __declspec() stuff. However, we DO need to worry about \r
+ * PNG_BUILD_DLL and PNG_STATIC because those change some defaults\r
+ * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.\r
+ */\r
+#if defined(__CYGWIN__)\r
+# if defined(ALL_STATIC)\r
+# if defined(PNG_BUILD_DLL)\r
+# undef PNG_BUILD_DLL\r
+# endif\r
+# if defined(PNG_USE_DLL)\r
+# undef PNG_USE_DLL\r
+# endif\r
+# if defined(PNG_DLL)\r
+# undef PNG_DLL\r
+# endif\r
+# if !defined(PNG_STATIC)\r
+# define PNG_STATIC\r
+# endif\r
+# else\r
+# if defined (PNG_BUILD_DLL)\r
+# if defined(PNG_STATIC)\r
+# undef PNG_STATIC\r
+# endif\r
+# if defined(PNG_USE_DLL)\r
+# undef PNG_USE_DLL\r
+# endif\r
+# if !defined(PNG_DLL)\r
+# define PNG_DLL\r
+# endif\r
+# else\r
+# if defined(PNG_STATIC)\r
+# if defined(PNG_USE_DLL)\r
+# undef PNG_USE_DLL\r
+# endif\r
+# if defined(PNG_DLL)\r
+# undef PNG_DLL\r
+# endif\r
+# else\r
+# if !defined(PNG_USE_DLL)\r
+# define PNG_USE_DLL\r
+# endif\r
+# if !defined(PNG_DLL)\r
+# define PNG_DLL\r
+# endif\r
+# endif \r
+# endif \r
+# endif\r
+#endif\r
+\r
+/* This protects us against compilers that run on a windowing system\r
+ * and thus don't have or would rather us not use the stdio types:\r
+ * stdin, stdout, and stderr. The only one currently used is stderr\r
+ * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will\r
+ * prevent these from being compiled and used. #defining PNG_NO_STDIO\r
+ * will also prevent these, plus will prevent the entire set of stdio\r
+ * macros and functions (FILE *, printf, etc.) from being compiled and used,\r
+ * unless (PNG_DEBUG > 0) has been #defined.\r
+ *\r
+ * #define PNG_NO_CONSOLE_IO\r
+ * #define PNG_NO_STDIO\r
+ */\r
+\r
+#if defined(_WIN32_WCE)\r
+# include <windows.h>\r
+ /* Console I/O functions are not supported on WindowsCE */\r
+# define PNG_NO_CONSOLE_IO\r
+# ifdef PNG_DEBUG\r
+# undef PNG_DEBUG\r
+# endif\r
+#endif\r
+\r
+#ifdef PNG_BUILD_DLL\r
+# ifndef PNG_CONSOLE_IO_SUPPORTED\r
+# ifndef PNG_NO_CONSOLE_IO\r
+# define PNG_NO_CONSOLE_IO\r
+# endif\r
+# endif\r
+#endif\r
+\r
+# ifdef PNG_NO_STDIO\r
+# ifndef PNG_NO_CONSOLE_IO\r
+# define PNG_NO_CONSOLE_IO\r
+# endif\r
+# ifdef PNG_DEBUG\r
+# if (PNG_DEBUG > 0)\r
+# include <stdio.h>\r
+# endif\r
+# endif\r
+# else\r
+# if !defined(_WIN32_WCE)\r
+/* "stdio.h" functions are not supported on WindowsCE */\r
+# include <stdio.h>\r
+# endif\r
+# endif\r
+\r
+/* This macro protects us against machines that don't have function\r
+ * prototypes (ie K&R style headers). If your compiler does not handle\r
+ * function prototypes, define this macro and use the included ansi2knr.\r
+ * I've always been able to use _NO_PROTO as the indicator, but you may\r
+ * need to drag the empty declaration out in front of here, or change the\r
+ * ifdef to suit your own needs.\r
+ */\r
+#ifndef PNGARG\r
+\r
+#ifdef OF /* zlib prototype munger */\r
+# define PNGARG(arglist) OF(arglist)\r
+#else\r
+\r
+#ifdef _NO_PROTO\r
+# define PNGARG(arglist) ()\r
+# ifndef PNG_TYPECAST_NULL\r
+# define PNG_TYPECAST_NULL\r
+# endif\r
+#else\r
+# define PNGARG(arglist) arglist\r
+#endif /* _NO_PROTO */\r
+\r
+\r
+#endif /* OF */\r
+\r
+#endif /* PNGARG */\r
+\r
+/* Try to determine if we are compiling on a Mac. Note that testing for\r
+ * just __MWERKS__ is not good enough, because the Codewarrior is now used\r
+ * on non-Mac platforms.\r
+ */\r
+#ifndef MACOS\r
+# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \\r
+ defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)\r
+# define MACOS\r
+# endif\r
+#endif\r
+\r
+/* enough people need this for various reasons to include it here */\r
+#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)\r
+# include <sys/types.h>\r
+#endif\r
+\r
+#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)\r
+# define PNG_SETJMP_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_SETJMP_SUPPORTED\r
+/* This is an attempt to force a single setjmp behaviour on Linux. If\r
+ * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.\r
+ */\r
+\r
+# ifdef __linux__\r
+# ifdef _BSD_SOURCE\r
+# define PNG_SAVE_BSD_SOURCE\r
+# undef _BSD_SOURCE\r
+# endif\r
+# ifdef _SETJMP_H\r
+ /* If you encounter a compiler error here, see the explanation\r
+ * near the end of INSTALL.\r
+ */\r
+ __pngconf.h__ already includes setjmp.h;\r
+ __dont__ include it again.;\r
+# endif\r
+# endif /* __linux__ */\r
+\r
+ /* include setjmp.h for error handling */\r
+# include <setjmp.h>\r
+\r
+# ifdef __linux__\r
+# ifdef PNG_SAVE_BSD_SOURCE\r
+# ifndef _BSD_SOURCE\r
+# define _BSD_SOURCE\r
+# endif\r
+# undef PNG_SAVE_BSD_SOURCE\r
+# endif\r
+# endif /* __linux__ */\r
+#endif /* PNG_SETJMP_SUPPORTED */\r
+\r
+#ifdef BSD\r
+# include <strings.h>\r
+#else\r
+# include <string.h>\r
+#endif\r
+\r
+/* Other defines for things like memory and the like can go here. */\r
+#ifdef PNG_INTERNAL\r
+\r
+#include <stdlib.h>\r
+\r
+/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which\r
+ * aren't usually used outside the library (as far as I know), so it is\r
+ * debatable if they should be exported at all. In the future, when it is\r
+ * possible to have run-time registry of chunk-handling functions, some of\r
+ * these will be made available again.\r
+#define PNG_EXTERN extern\r
+ */\r
+#define PNG_EXTERN\r
+\r
+/* Other defines specific to compilers can go here. Try to keep\r
+ * them inside an appropriate ifdef/endif pair for portability.\r
+ */\r
+\r
+#if defined(PNG_FLOATING_POINT_SUPPORTED)\r
+# if defined(MACOS)\r
+ /* We need to check that <math.h> hasn't already been included earlier\r
+ * as it seems it doesn't agree with <fp.h>, yet we should really use\r
+ * <fp.h> if possible.\r
+ */\r
+# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)\r
+# include <fp.h>\r
+# endif\r
+# else\r
+# include <math.h>\r
+# endif\r
+# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)\r
+ /* Amiga SAS/C: We must include builtin FPU functions when compiling using\r
+ * MATH=68881\r
+ */\r
+# include <m68881.h>\r
+# endif\r
+#endif\r
+\r
+/* Codewarrior on NT has linking problems without this. */\r
+#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)\r
+# define PNG_ALWAYS_EXTERN\r
+#endif\r
+\r
+/* This provides the non-ANSI (far) memory allocation routines. */\r
+#if defined(__TURBOC__) && defined(__MSDOS__)\r
+# include <mem.h>\r
+# include <alloc.h>\r
+#endif\r
+\r
+/* I have no idea why is this necessary... */\r
+#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \\r
+ defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))\r
+# include <malloc.h>\r
+#endif\r
+\r
+/* This controls how fine the dithering gets. As this allocates\r
+ * a largish chunk of memory (32K), those who are not as concerned\r
+ * with dithering quality can decrease some or all of these.\r
+ */\r
+#ifndef PNG_DITHER_RED_BITS\r
+# define PNG_DITHER_RED_BITS 5\r
+#endif\r
+#ifndef PNG_DITHER_GREEN_BITS\r
+# define PNG_DITHER_GREEN_BITS 5\r
+#endif\r
+#ifndef PNG_DITHER_BLUE_BITS\r
+# define PNG_DITHER_BLUE_BITS 5\r
+#endif\r
+\r
+/* This controls how fine the gamma correction becomes when you\r
+ * are only interested in 8 bits anyway. Increasing this value\r
+ * results in more memory being used, and more pow() functions\r
+ * being called to fill in the gamma tables. Don't set this value\r
+ * less then 8, and even that may not work (I haven't tested it).\r
+ */\r
+\r
+#ifndef PNG_MAX_GAMMA_8\r
+# define PNG_MAX_GAMMA_8 11\r
+#endif\r
+\r
+/* This controls how much a difference in gamma we can tolerate before\r
+ * we actually start doing gamma conversion.\r
+ */\r
+#ifndef PNG_GAMMA_THRESHOLD\r
+# define PNG_GAMMA_THRESHOLD 0.05\r
+#endif\r
+\r
+#endif /* PNG_INTERNAL */\r
+\r
+/* The following uses const char * instead of char * for error\r
+ * and warning message functions, so some compilers won't complain.\r
+ * If you do not want to use const, define PNG_NO_CONST here.\r
+ */\r
+\r
+#ifndef PNG_NO_CONST\r
+# define PNG_CONST const\r
+#else\r
+# define PNG_CONST\r
+#endif\r
+\r
+/* The following defines give you the ability to remove code from the\r
+ * library that you will not be using. I wish I could figure out how to\r
+ * automate this, but I can't do that without making it seriously hard\r
+ * on the users. So if you are not using an ability, change the #define\r
+ * to and #undef, and that part of the library will not be compiled. If\r
+ * your linker can't find a function, you may want to make sure the\r
+ * ability is defined here. Some of these depend upon some others being\r
+ * defined. I haven't figured out all the interactions here, so you may\r
+ * have to experiment awhile to get everything to compile. If you are\r
+ * creating or using a shared library, you probably shouldn't touch this,\r
+ * as it will affect the size of the structures, and this will cause bad\r
+ * things to happen if the library and/or application ever change.\r
+ */\r
+\r
+/* Any features you will not be using can be undef'ed here */\r
+\r
+/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user\r
+ * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS\r
+ * on the compile line, then pick and choose which ones to define without\r
+ * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED\r
+ * if you only want to have a png-compliant reader/writer but don't need\r
+ * any of the extra transformations. This saves about 80 kbytes in a\r
+ * typical installation of the library. (PNG_NO_* form added in version\r
+ * 1.0.1c, for consistency)\r
+ */\r
+\r
+/* The size of the png_text structure changed in libpng-1.0.6 when\r
+ * iTXt support was added. iTXt support was turned off by default through\r
+ * libpng-1.2.x, to support old apps that malloc the png_text structure\r
+ * instead of calling png_set_text() and letting libpng malloc it. It\r
+ * was turned on by default in libpng-1.3.0.\r
+ */\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+# ifndef PNG_NO_iTXt_SUPPORTED\r
+# define PNG_NO_iTXt_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_iTXt\r
+# define PNG_NO_READ_iTXt\r
+# endif\r
+# ifndef PNG_NO_WRITE_iTXt\r
+# define PNG_NO_WRITE_iTXt\r
+# endif\r
+#endif\r
+\r
+#if !defined(PNG_NO_iTXt_SUPPORTED)\r
+# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)\r
+# define PNG_READ_iTXt\r
+# endif\r
+# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)\r
+# define PNG_WRITE_iTXt\r
+# endif\r
+#endif\r
+\r
+/* The following support, added after version 1.0.0, can be turned off here en\r
+ * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility\r
+ * with old applications that require the length of png_struct and png_info\r
+ * to remain unchanged.\r
+ */\r
+\r
+#ifdef PNG_LEGACY_SUPPORTED\r
+# define PNG_NO_FREE_ME\r
+# define PNG_NO_READ_UNKNOWN_CHUNKS\r
+# define PNG_NO_WRITE_UNKNOWN_CHUNKS\r
+# define PNG_NO_READ_USER_CHUNKS\r
+# define PNG_NO_READ_iCCP\r
+# define PNG_NO_WRITE_iCCP\r
+# define PNG_NO_READ_iTXt\r
+# define PNG_NO_WRITE_iTXt\r
+# define PNG_NO_READ_sCAL\r
+# define PNG_NO_WRITE_sCAL\r
+# define PNG_NO_READ_sPLT\r
+# define PNG_NO_WRITE_sPLT\r
+# define PNG_NO_INFO_IMAGE\r
+# define PNG_NO_READ_RGB_TO_GRAY\r
+# define PNG_NO_READ_USER_TRANSFORM\r
+# define PNG_NO_WRITE_USER_TRANSFORM\r
+# define PNG_NO_USER_MEM\r
+# define PNG_NO_READ_EMPTY_PLTE\r
+# define PNG_NO_MNG_FEATURES\r
+# define PNG_NO_FIXED_POINT_SUPPORTED\r
+#endif\r
+\r
+/* Ignore attempt to turn off both floating and fixed point support */\r
+#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \\r
+ !defined(PNG_NO_FIXED_POINT_SUPPORTED)\r
+# define PNG_FIXED_POINT_SUPPORTED\r
+#endif\r
+\r
+#ifndef PNG_NO_FREE_ME\r
+# define PNG_FREE_ME_SUPPORTED\r
+#endif\r
+\r
+#if defined(PNG_READ_SUPPORTED)\r
+\r
+#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \\r
+ !defined(PNG_NO_READ_TRANSFORMS)\r
+# define PNG_READ_TRANSFORMS_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_READ_TRANSFORMS_SUPPORTED\r
+# ifndef PNG_NO_READ_EXPAND\r
+# define PNG_READ_EXPAND_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_SHIFT\r
+# define PNG_READ_SHIFT_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_PACK\r
+# define PNG_READ_PACK_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_BGR\r
+# define PNG_READ_BGR_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_SWAP\r
+# define PNG_READ_SWAP_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_PACKSWAP\r
+# define PNG_READ_PACKSWAP_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_INVERT\r
+# define PNG_READ_INVERT_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_DITHER\r
+# define PNG_READ_DITHER_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_BACKGROUND\r
+# define PNG_READ_BACKGROUND_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_16_TO_8\r
+# define PNG_READ_16_TO_8_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_FILLER\r
+# define PNG_READ_FILLER_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_GAMMA\r
+# define PNG_READ_GAMMA_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_GRAY_TO_RGB\r
+# define PNG_READ_GRAY_TO_RGB_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_SWAP_ALPHA\r
+# define PNG_READ_SWAP_ALPHA_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_INVERT_ALPHA\r
+# define PNG_READ_INVERT_ALPHA_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_STRIP_ALPHA\r
+# define PNG_READ_STRIP_ALPHA_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_USER_TRANSFORM\r
+# define PNG_READ_USER_TRANSFORM_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_READ_RGB_TO_GRAY\r
+# define PNG_READ_RGB_TO_GRAY_SUPPORTED\r
+# endif\r
+#endif /* PNG_READ_TRANSFORMS_SUPPORTED */\r
+\r
+#if !defined(PNG_NO_PROGRESSIVE_READ) && \\r
+ !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive */\r
+# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */\r
+#endif /* about interlacing capability! You'll */\r
+ /* still have interlacing unless you change the following line: */\r
+\r
+#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */\r
+\r
+#ifndef PNG_NO_READ_COMPOSITE_NODIV\r
+# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */\r
+# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */\r
+# endif\r
+#endif\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+/* Deprecated, will be removed from version 2.0.0.\r
+ Use PNG_MNG_FEATURES_SUPPORTED instead. */\r
+#ifndef PNG_NO_READ_EMPTY_PLTE\r
+# define PNG_READ_EMPTY_PLTE_SUPPORTED\r
+#endif\r
+#endif\r
+\r
+#endif /* PNG_READ_SUPPORTED */\r
+\r
+#if defined(PNG_WRITE_SUPPORTED)\r
+\r
+# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \\r
+ !defined(PNG_NO_WRITE_TRANSFORMS)\r
+# define PNG_WRITE_TRANSFORMS_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED\r
+# ifndef PNG_NO_WRITE_SHIFT\r
+# define PNG_WRITE_SHIFT_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_WRITE_PACK\r
+# define PNG_WRITE_PACK_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_WRITE_BGR\r
+# define PNG_WRITE_BGR_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_WRITE_SWAP\r
+# define PNG_WRITE_SWAP_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_WRITE_PACKSWAP\r
+# define PNG_WRITE_PACKSWAP_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_WRITE_INVERT\r
+# define PNG_WRITE_INVERT_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_WRITE_FILLER\r
+# define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */\r
+# endif\r
+# ifndef PNG_NO_WRITE_SWAP_ALPHA\r
+# define PNG_WRITE_SWAP_ALPHA_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_WRITE_INVERT_ALPHA\r
+# define PNG_WRITE_INVERT_ALPHA_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_WRITE_USER_TRANSFORM\r
+# define PNG_WRITE_USER_TRANSFORM_SUPPORTED\r
+# endif\r
+#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */\r
+\r
+#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \\r
+ !defined(PNG_WRITE_INTERLACING_SUPPORTED)\r
+#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant\r
+ encoders, but can cause trouble\r
+ if left undefined */\r
+#endif\r
+\r
+#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \\r
+ !defined(PNG_WRITE_WEIGHTED_FILTER) && \\r
+ defined(PNG_FLOATING_POINT_SUPPORTED)\r
+# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\r
+#endif\r
+\r
+#ifndef PNG_NO_WRITE_FLUSH\r
+# define PNG_WRITE_FLUSH_SUPPORTED\r
+#endif\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */\r
+#ifndef PNG_NO_WRITE_EMPTY_PLTE\r
+# define PNG_WRITE_EMPTY_PLTE_SUPPORTED\r
+#endif\r
+#endif\r
+\r
+#endif /* PNG_WRITE_SUPPORTED */\r
+\r
+#ifndef PNG_1_0_X\r
+# ifndef PNG_NO_ERROR_NUMBERS\r
+# define PNG_ERROR_NUMBERS_SUPPORTED\r
+# endif\r
+#endif /* PNG_1_0_X */\r
+\r
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\r
+ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)\r
+# ifndef PNG_NO_USER_TRANSFORM_PTR\r
+# define PNG_USER_TRANSFORM_PTR_SUPPORTED\r
+# endif\r
+#endif\r
+\r
+#ifndef PNG_NO_STDIO\r
+# define PNG_TIME_RFC1123_SUPPORTED\r
+#endif\r
+\r
+/* This adds extra functions in pngget.c for accessing data from the\r
+ * info pointer (added in version 0.99)\r
+ * png_get_image_width()\r
+ * png_get_image_height()\r
+ * png_get_bit_depth()\r
+ * png_get_color_type()\r
+ * png_get_compression_type()\r
+ * png_get_filter_type()\r
+ * png_get_interlace_type()\r
+ * png_get_pixel_aspect_ratio()\r
+ * png_get_pixels_per_meter()\r
+ * png_get_x_offset_pixels()\r
+ * png_get_y_offset_pixels()\r
+ * png_get_x_offset_microns()\r
+ * png_get_y_offset_microns()\r
+ */\r
+#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)\r
+# define PNG_EASY_ACCESS_SUPPORTED\r
+#endif\r
+\r
+/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 \r
+ * and removed from version 1.2.20. The following will be removed\r
+ * from libpng-1.4.0\r
+*/\r
+\r
+#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)\r
+# ifndef PNG_OPTIMIZED_CODE_SUPPORTED\r
+# define PNG_OPTIMIZED_CODE_SUPPORTED\r
+# endif\r
+#endif\r
+\r
+#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)\r
+# ifndef PNG_ASSEMBLER_CODE_SUPPORTED\r
+# define PNG_ASSEMBLER_CODE_SUPPORTED\r
+# endif\r
+\r
+# if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)\r
+ /* work around 64-bit gcc compiler bugs in gcc-3.x */\r
+# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\r
+# define PNG_NO_MMX_CODE\r
+# endif\r
+# endif\r
+\r
+# if defined(__APPLE__)\r
+# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\r
+# define PNG_NO_MMX_CODE\r
+# endif\r
+# endif\r
+\r
+# if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))\r
+# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\r
+# define PNG_NO_MMX_CODE\r
+# endif\r
+# endif\r
+\r
+# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\r
+# define PNG_MMX_CODE_SUPPORTED\r
+# endif\r
+\r
+#endif\r
+/* end of obsolete code to be removed from libpng-1.4.0 */\r
+\r
+#if !defined(PNG_1_0_X)\r
+#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)\r
+# define PNG_USER_MEM_SUPPORTED\r
+#endif\r
+#endif /* PNG_1_0_X */\r
+\r
+/* Added at libpng-1.2.6 */\r
+#if !defined(PNG_1_0_X)\r
+#ifndef PNG_SET_USER_LIMITS_SUPPORTED\r
+#if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)\r
+# define PNG_SET_USER_LIMITS_SUPPORTED\r
+#endif\r
+#endif\r
+#endif /* PNG_1_0_X */\r
+\r
+/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGS no matter\r
+ * how large, set these limits to 0x7fffffffL\r
+ */\r
+#ifndef PNG_USER_WIDTH_MAX\r
+# define PNG_USER_WIDTH_MAX 1000000L\r
+#endif\r
+#ifndef PNG_USER_HEIGHT_MAX\r
+# define PNG_USER_HEIGHT_MAX 1000000L\r
+#endif\r
+\r
+/* These are currently experimental features, define them if you want */\r
+\r
+/* very little testing */\r
+/*\r
+#ifdef PNG_READ_SUPPORTED\r
+# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED\r
+# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED\r
+# endif\r
+#endif\r
+*/\r
+\r
+/* This is only for PowerPC big-endian and 680x0 systems */\r
+/* some testing */\r
+/*\r
+#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED\r
+# define PNG_READ_BIG_ENDIAN_SUPPORTED\r
+#endif\r
+*/\r
+\r
+/* Buggy compilers (e.g., gcc 2.7.2.2) need this */\r
+/*\r
+#define PNG_NO_POINTER_INDEXING\r
+*/\r
+\r
+/* These functions are turned off by default, as they will be phased out. */\r
+/*\r
+#define PNG_USELESS_TESTS_SUPPORTED\r
+#define PNG_CORRECT_PALETTE_SUPPORTED\r
+*/\r
+\r
+/* Any chunks you are not interested in, you can undef here. The\r
+ * ones that allocate memory may be expecially important (hIST,\r
+ * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info\r
+ * a bit smaller.\r
+ */\r
+\r
+#if defined(PNG_READ_SUPPORTED) && \\r
+ !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \\r
+ !defined(PNG_NO_READ_ANCILLARY_CHUNKS)\r
+# define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED\r
+#endif\r
+\r
+#if defined(PNG_WRITE_SUPPORTED) && \\r
+ !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \\r
+ !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)\r
+# define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED\r
+\r
+#ifdef PNG_NO_READ_TEXT\r
+# define PNG_NO_READ_iTXt\r
+# define PNG_NO_READ_tEXt\r
+# define PNG_NO_READ_zTXt\r
+#endif\r
+#ifndef PNG_NO_READ_bKGD\r
+# define PNG_READ_bKGD_SUPPORTED\r
+# define PNG_bKGD_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_cHRM\r
+# define PNG_READ_cHRM_SUPPORTED\r
+# define PNG_cHRM_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_gAMA\r
+# define PNG_READ_gAMA_SUPPORTED\r
+# define PNG_gAMA_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_hIST\r
+# define PNG_READ_hIST_SUPPORTED\r
+# define PNG_hIST_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_iCCP\r
+# define PNG_READ_iCCP_SUPPORTED\r
+# define PNG_iCCP_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_iTXt\r
+# ifndef PNG_READ_iTXt_SUPPORTED\r
+# define PNG_READ_iTXt_SUPPORTED\r
+# endif\r
+# ifndef PNG_iTXt_SUPPORTED\r
+# define PNG_iTXt_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_READ_oFFs\r
+# define PNG_READ_oFFs_SUPPORTED\r
+# define PNG_oFFs_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_pCAL\r
+# define PNG_READ_pCAL_SUPPORTED\r
+# define PNG_pCAL_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_sCAL\r
+# define PNG_READ_sCAL_SUPPORTED\r
+# define PNG_sCAL_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_pHYs\r
+# define PNG_READ_pHYs_SUPPORTED\r
+# define PNG_pHYs_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_sBIT\r
+# define PNG_READ_sBIT_SUPPORTED\r
+# define PNG_sBIT_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_sPLT\r
+# define PNG_READ_sPLT_SUPPORTED\r
+# define PNG_sPLT_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_sRGB\r
+# define PNG_READ_sRGB_SUPPORTED\r
+# define PNG_sRGB_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_tEXt\r
+# define PNG_READ_tEXt_SUPPORTED\r
+# define PNG_tEXt_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_tIME\r
+# define PNG_READ_tIME_SUPPORTED\r
+# define PNG_tIME_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_tRNS\r
+# define PNG_READ_tRNS_SUPPORTED\r
+# define PNG_tRNS_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_zTXt\r
+# define PNG_READ_zTXt_SUPPORTED\r
+# define PNG_zTXt_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_UNKNOWN_CHUNKS\r
+# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED\r
+# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+# define PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_HANDLE_AS_UNKNOWN\r
+# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+# endif\r
+#endif\r
+#if !defined(PNG_NO_READ_USER_CHUNKS) && \\r
+ defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)\r
+# define PNG_READ_USER_CHUNKS_SUPPORTED\r
+# define PNG_USER_CHUNKS_SUPPORTED\r
+# ifdef PNG_NO_READ_UNKNOWN_CHUNKS\r
+# undef PNG_NO_READ_UNKNOWN_CHUNKS\r
+# endif\r
+# ifdef PNG_NO_HANDLE_AS_UNKNOWN\r
+# undef PNG_NO_HANDLE_AS_UNKNOWN\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_READ_OPT_PLTE\r
+# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */\r
+#endif /* optional PLTE chunk in RGB and RGBA images */\r
+#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \\r
+ defined(PNG_READ_zTXt_SUPPORTED)\r
+# define PNG_READ_TEXT_SUPPORTED\r
+# define PNG_TEXT_SUPPORTED\r
+#endif\r
+\r
+#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */\r
+\r
+#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED\r
+\r
+#ifdef PNG_NO_WRITE_TEXT\r
+# define PNG_NO_WRITE_iTXt\r
+# define PNG_NO_WRITE_tEXt\r
+# define PNG_NO_WRITE_zTXt\r
+#endif\r
+#ifndef PNG_NO_WRITE_bKGD\r
+# define PNG_WRITE_bKGD_SUPPORTED\r
+# ifndef PNG_bKGD_SUPPORTED\r
+# define PNG_bKGD_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_cHRM\r
+# define PNG_WRITE_cHRM_SUPPORTED\r
+# ifndef PNG_cHRM_SUPPORTED\r
+# define PNG_cHRM_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_gAMA\r
+# define PNG_WRITE_gAMA_SUPPORTED\r
+# ifndef PNG_gAMA_SUPPORTED\r
+# define PNG_gAMA_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_hIST\r
+# define PNG_WRITE_hIST_SUPPORTED\r
+# ifndef PNG_hIST_SUPPORTED\r
+# define PNG_hIST_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_iCCP\r
+# define PNG_WRITE_iCCP_SUPPORTED\r
+# ifndef PNG_iCCP_SUPPORTED\r
+# define PNG_iCCP_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_iTXt\r
+# ifndef PNG_WRITE_iTXt_SUPPORTED\r
+# define PNG_WRITE_iTXt_SUPPORTED\r
+# endif\r
+# ifndef PNG_iTXt_SUPPORTED\r
+# define PNG_iTXt_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_oFFs\r
+# define PNG_WRITE_oFFs_SUPPORTED\r
+# ifndef PNG_oFFs_SUPPORTED\r
+# define PNG_oFFs_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_pCAL\r
+# define PNG_WRITE_pCAL_SUPPORTED\r
+# ifndef PNG_pCAL_SUPPORTED\r
+# define PNG_pCAL_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_sCAL\r
+# define PNG_WRITE_sCAL_SUPPORTED\r
+# ifndef PNG_sCAL_SUPPORTED\r
+# define PNG_sCAL_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_pHYs\r
+# define PNG_WRITE_pHYs_SUPPORTED\r
+# ifndef PNG_pHYs_SUPPORTED\r
+# define PNG_pHYs_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_sBIT\r
+# define PNG_WRITE_sBIT_SUPPORTED\r
+# ifndef PNG_sBIT_SUPPORTED\r
+# define PNG_sBIT_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_sPLT\r
+# define PNG_WRITE_sPLT_SUPPORTED\r
+# ifndef PNG_sPLT_SUPPORTED\r
+# define PNG_sPLT_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_sRGB\r
+# define PNG_WRITE_sRGB_SUPPORTED\r
+# ifndef PNG_sRGB_SUPPORTED\r
+# define PNG_sRGB_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_tEXt\r
+# define PNG_WRITE_tEXt_SUPPORTED\r
+# ifndef PNG_tEXt_SUPPORTED\r
+# define PNG_tEXt_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_tIME\r
+# define PNG_WRITE_tIME_SUPPORTED\r
+# ifndef PNG_tIME_SUPPORTED\r
+# define PNG_tIME_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_tRNS\r
+# define PNG_WRITE_tRNS_SUPPORTED\r
+# ifndef PNG_tRNS_SUPPORTED\r
+# define PNG_tRNS_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_zTXt\r
+# define PNG_WRITE_zTXt_SUPPORTED\r
+# ifndef PNG_zTXt_SUPPORTED\r
+# define PNG_zTXt_SUPPORTED\r
+# endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS\r
+# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\r
+# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+# define PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+# endif\r
+# ifndef PNG_NO_HANDLE_AS_UNKNOWN\r
+# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+# endif\r
+# endif\r
+#endif\r
+#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \\r
+ defined(PNG_WRITE_zTXt_SUPPORTED)\r
+# define PNG_WRITE_TEXT_SUPPORTED\r
+# ifndef PNG_TEXT_SUPPORTED\r
+# define PNG_TEXT_SUPPORTED\r
+# endif\r
+#endif\r
+\r
+#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */\r
+\r
+/* Turn this off to disable png_read_png() and\r
+ * png_write_png() and leave the row_pointers member\r
+ * out of the info structure.\r
+ */\r
+#ifndef PNG_NO_INFO_IMAGE\r
+# define PNG_INFO_IMAGE_SUPPORTED\r
+#endif\r
+\r
+/* need the time information for reading tIME chunks */\r
+#if defined(PNG_tIME_SUPPORTED)\r
+# if !defined(_WIN32_WCE)\r
+ /* "time.h" functions are not supported on WindowsCE */\r
+# include <time.h>\r
+# endif\r
+#endif\r
+\r
+/* Some typedefs to get us started. These should be safe on most of the\r
+ * common platforms. The typedefs should be at least as large as the\r
+ * numbers suggest (a png_uint_32 must be at least 32 bits long), but they\r
+ * don't have to be exactly that size. Some compilers dislike passing\r
+ * unsigned shorts as function parameters, so you may be better off using\r
+ * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may\r
+ * want to have unsigned int for png_uint_32 instead of unsigned long.\r
+ */\r
+\r
+typedef unsigned long png_uint_32;\r
+typedef long png_int_32;\r
+typedef unsigned short png_uint_16;\r
+typedef short png_int_16;\r
+typedef unsigned char png_byte;\r
+\r
+/* This is usually size_t. It is typedef'ed just in case you need it to\r
+ change (I'm not sure if you will or not, so I thought I'd be safe) */\r
+#ifdef PNG_SIZE_T\r
+ typedef PNG_SIZE_T png_size_t;\r
+# define png_sizeof(x) png_convert_size(sizeof(x))\r
+#else\r
+ typedef size_t png_size_t;\r
+# define png_sizeof(x) sizeof(x)\r
+#endif\r
+\r
+/* The following is needed for medium model support. It cannot be in the\r
+ * PNG_INTERNAL section. Needs modification for other compilers besides\r
+ * MSC. Model independent support declares all arrays and pointers to be\r
+ * large using the far keyword. The zlib version used must also support\r
+ * model independent data. As of version zlib 1.0.4, the necessary changes\r
+ * have been made in zlib. The USE_FAR_KEYWORD define triggers other\r
+ * changes that are needed. (Tim Wegner)\r
+ */\r
+\r
+/* Separate compiler dependencies (problem here is that zlib.h always\r
+ defines FAR. (SJT) */\r
+#ifdef __BORLANDC__\r
+# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)\r
+# define LDATA 1\r
+# else\r
+# define LDATA 0\r
+# endif\r
+ /* GRR: why is Cygwin in here? Cygwin is not Borland C... */\r
+# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)\r
+# define PNG_MAX_MALLOC_64K\r
+# if (LDATA != 1)\r
+# ifndef FAR\r
+# define FAR __far\r
+# endif\r
+# define USE_FAR_KEYWORD\r
+# endif /* LDATA != 1 */\r
+ /* Possibly useful for moving data out of default segment.\r
+ * Uncomment it if you want. Could also define FARDATA as\r
+ * const if your compiler supports it. (SJT)\r
+# define FARDATA FAR\r
+ */\r
+# endif /* __WIN32__, __FLAT__, __CYGWIN__ */\r
+#endif /* __BORLANDC__ */\r
+\r
+\r
+/* Suggest testing for specific compiler first before testing for\r
+ * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM,\r
+ * making reliance oncertain keywords suspect. (SJT)\r
+ */\r
+\r
+/* MSC Medium model */\r
+#if defined(FAR)\r
+# if defined(M_I86MM)\r
+# define USE_FAR_KEYWORD\r
+# define FARDATA FAR\r
+# include <dos.h>\r
+# endif\r
+#endif\r
+\r
+/* SJT: default case */\r
+#ifndef FAR\r
+# define FAR\r
+#endif\r
+\r
+/* At this point FAR is always defined */\r
+#ifndef FARDATA\r
+# define FARDATA\r
+#endif\r
+\r
+/* Typedef for floating-point numbers that are converted\r
+ to fixed-point with a multiple of 100,000, e.g., int_gamma */\r
+typedef png_int_32 png_fixed_point;\r
+\r
+/* Add typedefs for pointers */\r
+typedef void FAR * png_voidp;\r
+typedef png_byte FAR * png_bytep;\r
+typedef png_uint_32 FAR * png_uint_32p;\r
+typedef png_int_32 FAR * png_int_32p;\r
+typedef png_uint_16 FAR * png_uint_16p;\r
+typedef png_int_16 FAR * png_int_16p;\r
+typedef PNG_CONST char FAR * png_const_charp;\r
+typedef char FAR * png_charp;\r
+typedef png_fixed_point FAR * png_fixed_point_p;\r
+\r
+#ifndef PNG_NO_STDIO\r
+#if defined(_WIN32_WCE)\r
+typedef HANDLE png_FILE_p;\r
+#else\r
+typedef FILE * png_FILE_p;\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+typedef double FAR * png_doublep;\r
+#endif\r
+\r
+/* Pointers to pointers; i.e. arrays */\r
+typedef png_byte FAR * FAR * png_bytepp;\r
+typedef png_uint_32 FAR * FAR * png_uint_32pp;\r
+typedef png_int_32 FAR * FAR * png_int_32pp;\r
+typedef png_uint_16 FAR * FAR * png_uint_16pp;\r
+typedef png_int_16 FAR * FAR * png_int_16pp;\r
+typedef PNG_CONST char FAR * FAR * png_const_charpp;\r
+typedef char FAR * FAR * png_charpp;\r
+typedef png_fixed_point FAR * FAR * png_fixed_point_pp;\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+typedef double FAR * FAR * png_doublepp;\r
+#endif\r
+\r
+/* Pointers to pointers to pointers; i.e., pointer to array */\r
+typedef char FAR * FAR * FAR * png_charppp;\r
+\r
+#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\r
+/* SPC - Is this stuff deprecated? */\r
+/* It'll be removed as of libpng-1.3.0 - GR-P */\r
+/* libpng typedefs for types in zlib. If zlib changes\r
+ * or another compression library is used, then change these.\r
+ * Eliminates need to change all the source files.\r
+ */\r
+typedef charf * png_zcharp;\r
+typedef charf * FAR * png_zcharpp;\r
+typedef z_stream FAR * png_zstreamp;\r
+#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */\r
+\r
+/*\r
+ * Define PNG_BUILD_DLL if the module being built is a Windows\r
+ * LIBPNG DLL.\r
+ *\r
+ * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.\r
+ * It is equivalent to Microsoft predefined macro _DLL that is\r
+ * automatically defined when you compile using the share\r
+ * version of the CRT (C Run-Time library)\r
+ *\r
+ * The cygwin mods make this behavior a little different:\r
+ * Define PNG_BUILD_DLL if you are building a dll for use with cygwin\r
+ * Define PNG_STATIC if you are building a static library for use with cygwin,\r
+ * -or- if you are building an application that you want to link to the\r
+ * static library.\r
+ * PNG_USE_DLL is defined by default (no user action needed) unless one of\r
+ * the other flags is defined.\r
+ */\r
+\r
+#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))\r
+# define PNG_DLL\r
+#endif\r
+/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.\r
+ * When building a static lib, default to no GLOBAL ARRAYS, but allow\r
+ * command-line override\r
+ */\r
+#if defined(__CYGWIN__)\r
+# if !defined(PNG_STATIC)\r
+# if defined(PNG_USE_GLOBAL_ARRAYS)\r
+# undef PNG_USE_GLOBAL_ARRAYS\r
+# endif\r
+# if !defined(PNG_USE_LOCAL_ARRAYS)\r
+# define PNG_USE_LOCAL_ARRAYS\r
+# endif\r
+# else\r
+# if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)\r
+# if defined(PNG_USE_GLOBAL_ARRAYS)\r
+# undef PNG_USE_GLOBAL_ARRAYS\r
+# endif\r
+# endif\r
+# endif\r
+# if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)\r
+# define PNG_USE_LOCAL_ARRAYS\r
+# endif\r
+#endif\r
+\r
+/* Do not use global arrays (helps with building DLL's)\r
+ * They are no longer used in libpng itself, since version 1.0.5c,\r
+ * but might be required for some pre-1.0.5c applications.\r
+ */\r
+#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)\r
+# if defined(PNG_NO_GLOBAL_ARRAYS) || \\r
+ (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)\r
+# define PNG_USE_LOCAL_ARRAYS\r
+# else\r
+# define PNG_USE_GLOBAL_ARRAYS\r
+# endif\r
+#endif\r
+\r
+#if defined(__CYGWIN__)\r
+# undef PNGAPI\r
+# define PNGAPI __cdecl\r
+# undef PNG_IMPEXP\r
+# define PNG_IMPEXP\r
+#endif \r
+\r
+/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",\r
+ * you may get warnings regarding the linkage of png_zalloc and png_zfree.\r
+ * Don't ignore those warnings; you must also reset the default calling\r
+ * convention in your compiler to match your PNGAPI, and you must build\r
+ * zlib and your applications the same way you build libpng.\r
+ */\r
+\r
+#if defined(__MINGW32__) && !defined(PNG_MODULEDEF)\r
+# ifndef PNG_NO_MODULEDEF\r
+# define PNG_NO_MODULEDEF\r
+# endif\r
+#endif\r
+\r
+#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)\r
+# define PNG_IMPEXP\r
+#endif\r
+\r
+#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \\r
+ (( defined(_Windows) || defined(_WINDOWS) || \\r
+ defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))\r
+\r
+# ifndef PNGAPI\r
+# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))\r
+# define PNGAPI __cdecl\r
+# else\r
+# define PNGAPI _cdecl\r
+# endif\r
+# endif\r
+\r
+# if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \\r
+ 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)\r
+# define PNG_IMPEXP\r
+# endif\r
+\r
+# if !defined(PNG_IMPEXP)\r
+\r
+# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol\r
+# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol\r
+\r
+ /* Borland/Microsoft */\r
+# if defined(_MSC_VER) || defined(__BORLANDC__)\r
+# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)\r
+# define PNG_EXPORT PNG_EXPORT_TYPE1\r
+# else\r
+# define PNG_EXPORT PNG_EXPORT_TYPE2\r
+# if defined(PNG_BUILD_DLL)\r
+# define PNG_IMPEXP __export\r
+# else\r
+# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in\r
+ VC++ */\r
+# endif /* Exists in Borland C++ for\r
+ C++ classes (== huge) */\r
+# endif\r
+# endif\r
+\r
+# if !defined(PNG_IMPEXP)\r
+# if defined(PNG_BUILD_DLL)\r
+# define PNG_IMPEXP __declspec(dllexport)\r
+# else\r
+# define PNG_IMPEXP __declspec(dllimport)\r
+# endif\r
+# endif\r
+# endif /* PNG_IMPEXP */\r
+#else /* !(DLL || non-cygwin WINDOWS) */\r
+# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)\r
+# ifndef PNGAPI\r
+# define PNGAPI _System\r
+# endif\r
+# else\r
+# if 0 /* ... other platforms, with other meanings */\r
+# endif\r
+# endif\r
+#endif\r
+\r
+#ifndef PNGAPI\r
+# define PNGAPI\r
+#endif\r
+#ifndef PNG_IMPEXP\r
+# define PNG_IMPEXP\r
+#endif\r
+\r
+#ifdef PNG_BUILDSYMS\r
+# ifndef PNG_EXPORT\r
+# define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END\r
+# endif\r
+# ifdef PNG_USE_GLOBAL_ARRAYS\r
+# ifndef PNG_EXPORT_VAR\r
+# define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT\r
+# endif\r
+# endif\r
+#endif\r
+\r
+#ifndef PNG_EXPORT\r
+# define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol\r
+#endif\r
+\r
+#ifdef PNG_USE_GLOBAL_ARRAYS\r
+# ifndef PNG_EXPORT_VAR\r
+# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type\r
+# endif\r
+#endif\r
+\r
+/* User may want to use these so they are not in PNG_INTERNAL. Any library\r
+ * functions that are passed far data must be model independent.\r
+ */\r
+\r
+#ifndef PNG_ABORT\r
+# define PNG_ABORT() abort()\r
+#endif\r
+\r
+#ifdef PNG_SETJMP_SUPPORTED\r
+# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)\r
+#else\r
+# define png_jmpbuf(png_ptr) \\r
+ (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)\r
+#endif\r
+\r
+#if defined(USE_FAR_KEYWORD) /* memory model independent fns */\r
+/* use this to make far-to-near assignments */\r
+# define CHECK 1\r
+# define NOCHECK 0\r
+# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))\r
+# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))\r
+# define png_snprintf _fsnprintf /* Added to v 1.2.19 */\r
+# define png_strlen _fstrlen\r
+# define png_memcmp _fmemcmp /* SJT: added */\r
+# define png_memcpy _fmemcpy\r
+# define png_memset _fmemset\r
+#else /* use the usual functions */\r
+# define CVT_PTR(ptr) (ptr)\r
+# define CVT_PTR_NOCHECK(ptr) (ptr)\r
+# ifndef PNG_NO_SNPRINTF\r
+# ifdef _MSC_VER\r
+# define png_snprintf _snprintf /* Added to v 1.2.19 */\r
+# define png_snprintf2 _snprintf\r
+# define png_snprintf6 _snprintf\r
+# else\r
+# define png_snprintf snprintf /* Added to v 1.2.19 */\r
+# define png_snprintf2 snprintf\r
+# define png_snprintf6 snprintf\r
+# endif\r
+# else\r
+ /* You don't have or don't want to use snprintf(). Caution: Using\r
+ * sprintf instead of snprintf exposes your application to accidental\r
+ * or malevolent buffer overflows. If you don't have snprintf()\r
+ * as a general rule you should provide one (you can get one from\r
+ * Portable OpenSSH). */\r
+# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)\r
+# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)\r
+# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \\r
+ sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)\r
+# endif\r
+# define png_strlen strlen\r
+# define png_memcmp memcmp /* SJT: added */\r
+# define png_memcpy memcpy\r
+# define png_memset memset\r
+#endif\r
+/* End of memory model independent support */\r
+\r
+/* Just a little check that someone hasn't tried to define something\r
+ * contradictory.\r
+ */\r
+#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)\r
+# undef PNG_ZBUF_SIZE\r
+# define PNG_ZBUF_SIZE 65536L\r
+#endif\r
+\r
+/* Added at libpng-1.2.8 */\r
+#endif /* PNG_VERSION_INFO_ONLY */\r
+\r
+#endif /* PNGCONF_H */\r