pngconf.h
Go to the documentation of this file.
00001 
00002 /* pngconf.h - machine configurable file for libpng
00003  *
00004  * libpng version 1.2.32 - September 18, 2008
00005  * For conditions of distribution and use, see copyright notice in png.h
00006  * Copyright (c) 1998-2008 Glenn Randers-Pehrson
00007  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
00008  * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
00009  */
00010 
00011 /* Any machine specific code is near the front of this file, so if you
00012  * are configuring libpng for a machine, you may want to read the section
00013  * starting here down to where it starts to typedef png_color, png_text,
00014  * and png_info.
00015  */
00016 
00017 #ifndef PNGCONF_H
00018 #define PNGCONF_H
00019 
00020 #define PNG_1_2_X
00021 
00022 /* 
00023  * PNG_USER_CONFIG has to be defined on the compiler command line. This
00024  * includes the resource compiler for Windows DLL configurations.
00025  */
00026 #ifdef PNG_USER_CONFIG
00027 #  ifndef PNG_USER_PRIVATEBUILD
00028 #    define PNG_USER_PRIVATEBUILD
00029 #  endif
00030 #include "pngusr.h"
00031 #endif
00032 
00033 /* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
00034 #ifdef PNG_CONFIGURE_LIBPNG
00035 #ifdef HAVE_CONFIG_H
00036 #include "config.h"
00037 #endif
00038 #endif
00039 
00040 /*
00041  * Added at libpng-1.2.8
00042  *  
00043  * If you create a private DLL you need to define in "pngusr.h" the followings:
00044  * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
00045  *        the DLL was built>
00046  *  e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
00047  * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to
00048  *        distinguish your DLL from those of the official release. These
00049  *        correspond to the trailing letters that come after the version
00050  *        number and must match your private DLL name>
00051  *  e.g. // private DLL "libpng13gx.dll"
00052  *       #define PNG_USER_DLLFNAME_POSTFIX "gx"
00053  * 
00054  * The following macros are also at your disposal if you want to complete the 
00055  * DLL VERSIONINFO structure.
00056  * - PNG_USER_VERSIONINFO_COMMENTS
00057  * - PNG_USER_VERSIONINFO_COMPANYNAME
00058  * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
00059  */
00060 
00061 #ifdef __STDC__
00062 #ifdef SPECIALBUILD
00063 #  pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
00064  are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
00065 #endif
00066 
00067 #ifdef PRIVATEBUILD
00068 # pragma message("PRIVATEBUILD is deprecated.\
00069  Use PNG_USER_PRIVATEBUILD instead.")
00070 # define PNG_USER_PRIVATEBUILD PRIVATEBUILD
00071 #endif
00072 #endif /* __STDC__ */
00073 
00074 #ifndef PNG_VERSION_INFO_ONLY
00075 
00076 /* End of material added to libpng-1.2.8 */
00077 
00078 /* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble
00079    Restored at libpng-1.2.21 */
00080 #if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \
00081     !defined(PNG_WARN_UNINITIALIZED_ROW)
00082 #  define PNG_WARN_UNINITIALIZED_ROW 1
00083 #endif
00084 /* End of material added at libpng-1.2.19/1.2.21 */
00085 
00086 /* This is the size of the compression buffer, and thus the size of
00087  * an IDAT chunk.  Make this whatever size you feel is best for your
00088  * machine.  One of these will be allocated per png_struct.  When this
00089  * is full, it writes the data to the disk, and does some other
00090  * calculations.  Making this an extremely small size will slow
00091  * the library down, but you may want to experiment to determine
00092  * where it becomes significant, if you are concerned with memory
00093  * usage.  Note that zlib allocates at least 32Kb also.  For readers,
00094  * this describes the size of the buffer available to read the data in.
00095  * Unless this gets smaller than the size of a row (compressed),
00096  * it should not make much difference how big this is.
00097  */
00098 
00099 #ifndef PNG_ZBUF_SIZE
00100 #  define PNG_ZBUF_SIZE 8192
00101 #endif
00102 
00103 /* Enable if you want a write-only libpng */
00104 
00105 #ifndef PNG_NO_READ_SUPPORTED
00106 #  define PNG_READ_SUPPORTED
00107 #endif
00108 
00109 /* Enable if you want a read-only libpng */
00110 
00111 #ifndef PNG_NO_WRITE_SUPPORTED
00112 #  define PNG_WRITE_SUPPORTED
00113 #endif
00114 
00115 /* Enabled by default in 1.2.0.  You can disable this if you don't need to
00116    support PNGs that are embedded in MNG datastreams */
00117 #if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
00118 #  ifndef PNG_MNG_FEATURES_SUPPORTED
00119 #    define PNG_MNG_FEATURES_SUPPORTED
00120 #  endif
00121 #endif
00122 
00123 #ifndef PNG_NO_FLOATING_POINT_SUPPORTED
00124 #  ifndef PNG_FLOATING_POINT_SUPPORTED
00125 #    define PNG_FLOATING_POINT_SUPPORTED
00126 #  endif
00127 #endif
00128 
00129 /* If you are running on a machine where you cannot allocate more
00130  * than 64K of memory at once, uncomment this.  While libpng will not
00131  * normally need that much memory in a chunk (unless you load up a very
00132  * large file), zlib needs to know how big of a chunk it can use, and
00133  * libpng thus makes sure to check any memory allocation to verify it
00134  * will fit into memory.
00135 #define PNG_MAX_MALLOC_64K
00136  */
00137 #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
00138 #  define PNG_MAX_MALLOC_64K
00139 #endif
00140 
00141 /* Special munging to support doing things the 'cygwin' way:
00142  * 'Normal' png-on-win32 defines/defaults:
00143  *   PNG_BUILD_DLL -- building dll
00144  *   PNG_USE_DLL   -- building an application, linking to dll
00145  *   (no define)   -- building static library, or building an
00146  *                    application and linking to the static lib
00147  * 'Cygwin' defines/defaults:
00148  *   PNG_BUILD_DLL -- (ignored) building the dll
00149  *   (no define)   -- (ignored) building an application, linking to the dll
00150  *   PNG_STATIC    -- (ignored) building the static lib, or building an 
00151  *                    application that links to the static lib.
00152  *   ALL_STATIC    -- (ignored) building various static libs, or building an 
00153  *                    application that links to the static libs.
00154  * Thus,
00155  * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
00156  * this bit of #ifdefs will define the 'correct' config variables based on
00157  * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
00158  * unnecessary.
00159  *
00160  * Also, the precedence order is:
00161  *   ALL_STATIC (since we can't #undef something outside our namespace)
00162  *   PNG_BUILD_DLL
00163  *   PNG_STATIC
00164  *   (nothing) == PNG_USE_DLL
00165  * 
00166  * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
00167  *   of auto-import in binutils, we no longer need to worry about 
00168  *   __declspec(dllexport) / __declspec(dllimport) and friends.  Therefore,
00169  *   we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
00170  *   to __declspec() stuff.  However, we DO need to worry about 
00171  *   PNG_BUILD_DLL and PNG_STATIC because those change some defaults
00172  *   such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
00173  */
00174 #if defined(__CYGWIN__)
00175 #  if defined(ALL_STATIC)
00176 #    if defined(PNG_BUILD_DLL)
00177 #      undef PNG_BUILD_DLL
00178 #    endif
00179 #    if defined(PNG_USE_DLL)
00180 #      undef PNG_USE_DLL
00181 #    endif
00182 #    if defined(PNG_DLL)
00183 #      undef PNG_DLL
00184 #    endif
00185 #    if !defined(PNG_STATIC)
00186 #      define PNG_STATIC
00187 #    endif
00188 #  else
00189 #    if defined (PNG_BUILD_DLL)
00190 #      if defined(PNG_STATIC)
00191 #        undef PNG_STATIC
00192 #      endif
00193 #      if defined(PNG_USE_DLL)
00194 #        undef PNG_USE_DLL
00195 #      endif
00196 #      if !defined(PNG_DLL)
00197 #        define PNG_DLL
00198 #      endif
00199 #    else
00200 #      if defined(PNG_STATIC)
00201 #        if defined(PNG_USE_DLL)
00202 #          undef PNG_USE_DLL
00203 #        endif
00204 #        if defined(PNG_DLL)
00205 #          undef PNG_DLL
00206 #        endif
00207 #      else
00208 #        if !defined(PNG_USE_DLL)
00209 #          define PNG_USE_DLL
00210 #        endif
00211 #        if !defined(PNG_DLL)
00212 #          define PNG_DLL
00213 #        endif
00214 #      endif  
00215 #    endif  
00216 #  endif
00217 #endif
00218 
00219 /* This protects us against compilers that run on a windowing system
00220  * and thus don't have or would rather us not use the stdio types:
00221  * stdin, stdout, and stderr.  The only one currently used is stderr
00222  * in png_error() and png_warning().  #defining PNG_NO_CONSOLE_IO will
00223  * prevent these from being compiled and used. #defining PNG_NO_STDIO
00224  * will also prevent these, plus will prevent the entire set of stdio
00225  * macros and functions (FILE *, printf, etc.) from being compiled and used,
00226  * unless (PNG_DEBUG > 0) has been #defined.
00227  *
00228  * #define PNG_NO_CONSOLE_IO
00229  * #define PNG_NO_STDIO
00230  */
00231 
00232 #if defined(_WIN32_WCE)
00233 #  include <windows.h>
00234    /* Console I/O functions are not supported on WindowsCE */
00235 #  define PNG_NO_CONSOLE_IO
00236 #  ifdef PNG_DEBUG
00237 #    undef PNG_DEBUG
00238 #  endif
00239 #endif
00240 
00241 #ifdef PNG_BUILD_DLL
00242 #  ifndef PNG_CONSOLE_IO_SUPPORTED
00243 #    ifndef PNG_NO_CONSOLE_IO
00244 #      define PNG_NO_CONSOLE_IO
00245 #    endif
00246 #  endif
00247 #endif
00248 
00249 #  ifdef PNG_NO_STDIO
00250 #    ifndef PNG_NO_CONSOLE_IO
00251 #      define PNG_NO_CONSOLE_IO
00252 #    endif
00253 #    ifdef PNG_DEBUG
00254 #      if (PNG_DEBUG > 0)
00255 #        include <stdio.h>
00256 #      endif
00257 #    endif
00258 #  else
00259 #    if !defined(_WIN32_WCE)
00260 /* "stdio.h" functions are not supported on WindowsCE */
00261 #      include <stdio.h>
00262 #    endif
00263 #  endif
00264 
00265 /* This macro protects us against machines that don't have function
00266  * prototypes (ie K&R style headers).  If your compiler does not handle
00267  * function prototypes, define this macro and use the included ansi2knr.
00268  * I've always been able to use _NO_PROTO as the indicator, but you may
00269  * need to drag the empty declaration out in front of here, or change the
00270  * ifdef to suit your own needs.
00271  */
00272 #ifndef PNGARG
00273 
00274 #ifdef OF /* zlib prototype munger */
00275 #  define PNGARG(arglist) OF(arglist)
00276 #else
00277 
00278 #ifdef _NO_PROTO
00279 #  define PNGARG(arglist) ()
00280 #  ifndef PNG_TYPECAST_NULL
00281 #     define PNG_TYPECAST_NULL
00282 #  endif
00283 #else
00284 #  define PNGARG(arglist) arglist
00285 #endif /* _NO_PROTO */
00286 
00287 
00288 #endif /* OF */
00289 
00290 #endif /* PNGARG */
00291 
00292 /* Try to determine if we are compiling on a Mac.  Note that testing for
00293  * just __MWERKS__ is not good enough, because the Codewarrior is now used
00294  * on non-Mac platforms.
00295  */
00296 #ifndef MACOS
00297 #  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
00298       defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
00299 #    define MACOS
00300 #  endif
00301 #endif
00302 
00303 /* enough people need this for various reasons to include it here */
00304 #if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
00305 #  include <sys/types.h>
00306 #endif
00307 
00308 #if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
00309 #  define PNG_SETJMP_SUPPORTED
00310 #endif
00311 
00312 #ifdef PNG_SETJMP_SUPPORTED
00313 /* This is an attempt to force a single setjmp behaviour on Linux.  If
00314  * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
00315  */
00316 
00317 #  ifdef __linux__
00318 #    ifdef _BSD_SOURCE
00319 #      define PNG_SAVE_BSD_SOURCE
00320 #      undef _BSD_SOURCE
00321 #    endif
00322 #    ifdef _SETJMP_H
00323      /* If you encounter a compiler error here, see the explanation
00324       * near the end of INSTALL.
00325       */
00326          __pngconf.h__ already includes setjmp.h;
00327          __dont__ include it again.;
00328 #    endif
00329 #  endif /* __linux__ */
00330 
00331    /* include setjmp.h for error handling */
00332 #  include <setjmp.h>
00333 
00334 #  ifdef __linux__
00335 #    ifdef PNG_SAVE_BSD_SOURCE
00336 #      ifndef _BSD_SOURCE
00337 #        define _BSD_SOURCE
00338 #      endif
00339 #      undef PNG_SAVE_BSD_SOURCE
00340 #    endif
00341 #  endif /* __linux__ */
00342 #endif /* PNG_SETJMP_SUPPORTED */
00343 
00344 #ifdef BSD
00345 #  include <strings.h>
00346 #else
00347 #  include <string.h>
00348 #endif
00349 
00350 /* Other defines for things like memory and the like can go here.  */
00351 #ifdef PNG_INTERNAL
00352 
00353 #include <stdlib.h>
00354 
00355 /* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
00356  * aren't usually used outside the library (as far as I know), so it is
00357  * debatable if they should be exported at all.  In the future, when it is
00358  * possible to have run-time registry of chunk-handling functions, some of
00359  * these will be made available again.
00360 #define PNG_EXTERN extern
00361  */
00362 #define PNG_EXTERN
00363 
00364 /* Other defines specific to compilers can go here.  Try to keep
00365  * them inside an appropriate ifdef/endif pair for portability.
00366  */
00367 
00368 #if defined(PNG_FLOATING_POINT_SUPPORTED)
00369 #  if defined(MACOS)
00370      /* We need to check that <math.h> hasn't already been included earlier
00371       * as it seems it doesn't agree with <fp.h>, yet we should really use
00372       * <fp.h> if possible.
00373       */
00374 #    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
00375 #      include <fp.h>
00376 #    endif
00377 #  else
00378 #    include <math.h>
00379 #  endif
00380 #  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
00381      /* Amiga SAS/C: We must include builtin FPU functions when compiling using
00382       * MATH=68881
00383       */
00384 #    include <m68881.h>
00385 #  endif
00386 #endif
00387 
00388 /* Codewarrior on NT has linking problems without this. */
00389 #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
00390 #  define PNG_ALWAYS_EXTERN
00391 #endif
00392 
00393 /* This provides the non-ANSI (far) memory allocation routines. */
00394 #if defined(__TURBOC__) && defined(__MSDOS__)
00395 #  include <mem.h>
00396 #  include <alloc.h>
00397 #endif
00398 
00399 /* I have no idea why is this necessary... */
00400 #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
00401     defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
00402 #  include <malloc.h>
00403 #endif
00404 
00405 /* This controls how fine the dithering gets.  As this allocates
00406  * a largish chunk of memory (32K), those who are not as concerned
00407  * with dithering quality can decrease some or all of these.
00408  */
00409 #ifndef PNG_DITHER_RED_BITS
00410 #  define PNG_DITHER_RED_BITS 5
00411 #endif
00412 #ifndef PNG_DITHER_GREEN_BITS
00413 #  define PNG_DITHER_GREEN_BITS 5
00414 #endif
00415 #ifndef PNG_DITHER_BLUE_BITS
00416 #  define PNG_DITHER_BLUE_BITS 5
00417 #endif
00418 
00419 /* This controls how fine the gamma correction becomes when you
00420  * are only interested in 8 bits anyway.  Increasing this value
00421  * results in more memory being used, and more pow() functions
00422  * being called to fill in the gamma tables.  Don't set this value
00423  * less then 8, and even that may not work (I haven't tested it).
00424  */
00425 
00426 #ifndef PNG_MAX_GAMMA_8
00427 #  define PNG_MAX_GAMMA_8 11
00428 #endif
00429 
00430 /* This controls how much a difference in gamma we can tolerate before
00431  * we actually start doing gamma conversion.
00432  */
00433 #ifndef PNG_GAMMA_THRESHOLD
00434 #  define PNG_GAMMA_THRESHOLD 0.05
00435 #endif
00436 
00437 #endif /* PNG_INTERNAL */
00438 
00439 /* The following uses const char * instead of char * for error
00440  * and warning message functions, so some compilers won't complain.
00441  * If you do not want to use const, define PNG_NO_CONST here.
00442  */
00443 
00444 #ifndef PNG_NO_CONST
00445 #  define PNG_CONST const
00446 #else
00447 #  define PNG_CONST
00448 #endif
00449 
00450 /* The following defines give you the ability to remove code from the
00451  * library that you will not be using.  I wish I could figure out how to
00452  * automate this, but I can't do that without making it seriously hard
00453  * on the users.  So if you are not using an ability, change the #define
00454  * to and #undef, and that part of the library will not be compiled.  If
00455  * your linker can't find a function, you may want to make sure the
00456  * ability is defined here.  Some of these depend upon some others being
00457  * defined.  I haven't figured out all the interactions here, so you may
00458  * have to experiment awhile to get everything to compile.  If you are
00459  * creating or using a shared library, you probably shouldn't touch this,
00460  * as it will affect the size of the structures, and this will cause bad
00461  * things to happen if the library and/or application ever change.
00462  */
00463 
00464 /* Any features you will not be using can be undef'ed here */
00465 
00466 /* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
00467  * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
00468  * on the compile line, then pick and choose which ones to define without
00469  * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
00470  * if you only want to have a png-compliant reader/writer but don't need
00471  * any of the extra transformations.  This saves about 80 kbytes in a
00472  * typical installation of the library. (PNG_NO_* form added in version
00473  * 1.0.1c, for consistency)
00474  */
00475 
00476 /* The size of the png_text structure changed in libpng-1.0.6 when
00477  * iTXt support was added.  iTXt support was turned off by default through
00478  * libpng-1.2.x, to support old apps that malloc the png_text structure
00479  * instead of calling png_set_text() and letting libpng malloc it.  It
00480  * was turned on by default in libpng-1.3.0.
00481  */
00482 
00483 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
00484 #  ifndef PNG_NO_iTXt_SUPPORTED
00485 #    define PNG_NO_iTXt_SUPPORTED
00486 #  endif
00487 #  ifndef PNG_NO_READ_iTXt
00488 #    define PNG_NO_READ_iTXt
00489 #  endif
00490 #  ifndef PNG_NO_WRITE_iTXt
00491 #    define PNG_NO_WRITE_iTXt
00492 #  endif
00493 #endif
00494 
00495 #if !defined(PNG_NO_iTXt_SUPPORTED)
00496 #  if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
00497 #    define PNG_READ_iTXt
00498 #  endif
00499 #  if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
00500 #    define PNG_WRITE_iTXt
00501 #  endif
00502 #endif
00503 
00504 /* The following support, added after version 1.0.0, can be turned off here en
00505  * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
00506  * with old applications that require the length of png_struct and png_info
00507  * to remain unchanged.
00508  */
00509 
00510 #ifdef PNG_LEGACY_SUPPORTED
00511 #  define PNG_NO_FREE_ME
00512 #  define PNG_NO_READ_UNKNOWN_CHUNKS
00513 #  define PNG_NO_WRITE_UNKNOWN_CHUNKS
00514 #  define PNG_NO_READ_USER_CHUNKS
00515 #  define PNG_NO_READ_iCCP
00516 #  define PNG_NO_WRITE_iCCP
00517 #  define PNG_NO_READ_iTXt
00518 #  define PNG_NO_WRITE_iTXt
00519 #  define PNG_NO_READ_sCAL
00520 #  define PNG_NO_WRITE_sCAL
00521 #  define PNG_NO_READ_sPLT
00522 #  define PNG_NO_WRITE_sPLT
00523 #  define PNG_NO_INFO_IMAGE
00524 #  define PNG_NO_READ_RGB_TO_GRAY
00525 #  define PNG_NO_READ_USER_TRANSFORM
00526 #  define PNG_NO_WRITE_USER_TRANSFORM
00527 #  define PNG_NO_USER_MEM
00528 #  define PNG_NO_READ_EMPTY_PLTE
00529 #  define PNG_NO_MNG_FEATURES
00530 #  define PNG_NO_FIXED_POINT_SUPPORTED
00531 #endif
00532 
00533 /* Ignore attempt to turn off both floating and fixed point support */
00534 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
00535     !defined(PNG_NO_FIXED_POINT_SUPPORTED)
00536 #  define PNG_FIXED_POINT_SUPPORTED
00537 #endif
00538 
00539 #ifndef PNG_NO_FREE_ME
00540 #  define PNG_FREE_ME_SUPPORTED
00541 #endif
00542 
00543 #if defined(PNG_READ_SUPPORTED)
00544 
00545 #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
00546       !defined(PNG_NO_READ_TRANSFORMS)
00547 #  define PNG_READ_TRANSFORMS_SUPPORTED
00548 #endif
00549 
00550 #ifdef PNG_READ_TRANSFORMS_SUPPORTED
00551 #  ifndef PNG_NO_READ_EXPAND
00552 #    define PNG_READ_EXPAND_SUPPORTED
00553 #  endif
00554 #  ifndef PNG_NO_READ_SHIFT
00555 #    define PNG_READ_SHIFT_SUPPORTED
00556 #  endif
00557 #  ifndef PNG_NO_READ_PACK
00558 #    define PNG_READ_PACK_SUPPORTED
00559 #  endif
00560 #  ifndef PNG_NO_READ_BGR
00561 #    define PNG_READ_BGR_SUPPORTED
00562 #  endif
00563 #  ifndef PNG_NO_READ_SWAP
00564 #    define PNG_READ_SWAP_SUPPORTED
00565 #  endif
00566 #  ifndef PNG_NO_READ_PACKSWAP
00567 #    define PNG_READ_PACKSWAP_SUPPORTED
00568 #  endif
00569 #  ifndef PNG_NO_READ_INVERT
00570 #    define PNG_READ_INVERT_SUPPORTED
00571 #  endif
00572 #  ifndef PNG_NO_READ_DITHER
00573 #    define PNG_READ_DITHER_SUPPORTED
00574 #  endif
00575 #  ifndef PNG_NO_READ_BACKGROUND
00576 #    define PNG_READ_BACKGROUND_SUPPORTED
00577 #  endif
00578 #  ifndef PNG_NO_READ_16_TO_8
00579 #    define PNG_READ_16_TO_8_SUPPORTED
00580 #  endif
00581 #  ifndef PNG_NO_READ_FILLER
00582 #    define PNG_READ_FILLER_SUPPORTED
00583 #  endif
00584 #  ifndef PNG_NO_READ_GAMMA
00585 #    define PNG_READ_GAMMA_SUPPORTED
00586 #  endif
00587 #  ifndef PNG_NO_READ_GRAY_TO_RGB
00588 #    define PNG_READ_GRAY_TO_RGB_SUPPORTED
00589 #  endif
00590 #  ifndef PNG_NO_READ_SWAP_ALPHA
00591 #    define PNG_READ_SWAP_ALPHA_SUPPORTED
00592 #  endif
00593 #  ifndef PNG_NO_READ_INVERT_ALPHA
00594 #    define PNG_READ_INVERT_ALPHA_SUPPORTED
00595 #  endif
00596 #  ifndef PNG_NO_READ_STRIP_ALPHA
00597 #    define PNG_READ_STRIP_ALPHA_SUPPORTED
00598 #  endif
00599 #  ifndef PNG_NO_READ_USER_TRANSFORM
00600 #    define PNG_READ_USER_TRANSFORM_SUPPORTED
00601 #  endif
00602 #  ifndef PNG_NO_READ_RGB_TO_GRAY
00603 #    define PNG_READ_RGB_TO_GRAY_SUPPORTED
00604 #  endif
00605 #endif /* PNG_READ_TRANSFORMS_SUPPORTED */
00606 
00607 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
00608  !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive   */
00609 #  define PNG_PROGRESSIVE_READ_SUPPORTED  /* reading.  This is not talking */
00610 #endif                            /* about interlacing capability!  You'll */
00611            /* still have interlacing unless you change the following line: */
00612 
00613 #define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */
00614 
00615 #ifndef PNG_NO_READ_COMPOSITE_NODIV
00616 #  ifndef PNG_NO_READ_COMPOSITED_NODIV  /* libpng-1.0.x misspelling */
00617 #    define PNG_READ_COMPOSITE_NODIV_SUPPORTED  /* well tested on Intel, SGI */
00618 #  endif
00619 #endif
00620 
00621 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
00622 /* Deprecated, will be removed from version 2.0.0.
00623    Use PNG_MNG_FEATURES_SUPPORTED instead. */
00624 #ifndef PNG_NO_READ_EMPTY_PLTE
00625 #  define PNG_READ_EMPTY_PLTE_SUPPORTED
00626 #endif
00627 #endif
00628 
00629 #endif /* PNG_READ_SUPPORTED */
00630 
00631 #if defined(PNG_WRITE_SUPPORTED)
00632 
00633 # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
00634     !defined(PNG_NO_WRITE_TRANSFORMS)
00635 #  define PNG_WRITE_TRANSFORMS_SUPPORTED
00636 #endif
00637 
00638 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
00639 #  ifndef PNG_NO_WRITE_SHIFT
00640 #    define PNG_WRITE_SHIFT_SUPPORTED
00641 #  endif
00642 #  ifndef PNG_NO_WRITE_PACK
00643 #    define PNG_WRITE_PACK_SUPPORTED
00644 #  endif
00645 #  ifndef PNG_NO_WRITE_BGR
00646 #    define PNG_WRITE_BGR_SUPPORTED
00647 #  endif
00648 #  ifndef PNG_NO_WRITE_SWAP
00649 #    define PNG_WRITE_SWAP_SUPPORTED
00650 #  endif
00651 #  ifndef PNG_NO_WRITE_PACKSWAP
00652 #    define PNG_WRITE_PACKSWAP_SUPPORTED
00653 #  endif
00654 #  ifndef PNG_NO_WRITE_INVERT
00655 #    define PNG_WRITE_INVERT_SUPPORTED
00656 #  endif
00657 #  ifndef PNG_NO_WRITE_FILLER
00658 #    define PNG_WRITE_FILLER_SUPPORTED   /* same as WRITE_STRIP_ALPHA */
00659 #  endif
00660 #  ifndef PNG_NO_WRITE_SWAP_ALPHA
00661 #    define PNG_WRITE_SWAP_ALPHA_SUPPORTED
00662 #  endif
00663 #  ifndef PNG_NO_WRITE_INVERT_ALPHA
00664 #    define PNG_WRITE_INVERT_ALPHA_SUPPORTED
00665 #  endif
00666 #  ifndef PNG_NO_WRITE_USER_TRANSFORM
00667 #    define PNG_WRITE_USER_TRANSFORM_SUPPORTED
00668 #  endif
00669 #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
00670 
00671 #if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
00672     !defined(PNG_WRITE_INTERLACING_SUPPORTED)
00673 #define PNG_WRITE_INTERLACING_SUPPORTED  /* not required for PNG-compliant
00674                                             encoders, but can cause trouble
00675                                             if left undefined */
00676 #endif
00677 
00678 #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
00679     !defined(PNG_WRITE_WEIGHTED_FILTER) && \
00680      defined(PNG_FLOATING_POINT_SUPPORTED)
00681 #  define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
00682 #endif
00683 
00684 #ifndef PNG_NO_WRITE_FLUSH
00685 #  define PNG_WRITE_FLUSH_SUPPORTED
00686 #endif
00687 
00688 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
00689 /* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
00690 #ifndef PNG_NO_WRITE_EMPTY_PLTE
00691 #  define PNG_WRITE_EMPTY_PLTE_SUPPORTED
00692 #endif
00693 #endif
00694 
00695 #endif /* PNG_WRITE_SUPPORTED */
00696 
00697 #ifndef PNG_1_0_X
00698 #  ifndef PNG_NO_ERROR_NUMBERS
00699 #    define PNG_ERROR_NUMBERS_SUPPORTED
00700 #  endif
00701 #endif /* PNG_1_0_X */
00702 
00703 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
00704     defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
00705 #  ifndef PNG_NO_USER_TRANSFORM_PTR
00706 #    define PNG_USER_TRANSFORM_PTR_SUPPORTED
00707 #  endif
00708 #endif
00709 
00710 #ifndef PNG_NO_STDIO
00711 #  define PNG_TIME_RFC1123_SUPPORTED
00712 #endif
00713 
00714 /* This adds extra functions in pngget.c for accessing data from the
00715  * info pointer (added in version 0.99)
00716  * png_get_image_width()
00717  * png_get_image_height()
00718  * png_get_bit_depth()
00719  * png_get_color_type()
00720  * png_get_compression_type()
00721  * png_get_filter_type()
00722  * png_get_interlace_type()
00723  * png_get_pixel_aspect_ratio()
00724  * png_get_pixels_per_meter()
00725  * png_get_x_offset_pixels()
00726  * png_get_y_offset_pixels()
00727  * png_get_x_offset_microns()
00728  * png_get_y_offset_microns()
00729  */
00730 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
00731 #  define PNG_EASY_ACCESS_SUPPORTED
00732 #endif
00733 
00734 /* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 
00735  * and removed from version 1.2.20.  The following will be removed
00736  * from libpng-1.4.0
00737 */
00738 
00739 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)
00740 #  ifndef PNG_OPTIMIZED_CODE_SUPPORTED
00741 #    define PNG_OPTIMIZED_CODE_SUPPORTED
00742 #  endif
00743 #endif
00744 
00745 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
00746 #  ifndef PNG_ASSEMBLER_CODE_SUPPORTED
00747 #    define PNG_ASSEMBLER_CODE_SUPPORTED
00748 #  endif
00749 
00750 #  if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)
00751      /* work around 64-bit gcc compiler bugs in gcc-3.x */
00752 #    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00753 #      define PNG_NO_MMX_CODE
00754 #    endif
00755 #  endif
00756 
00757 #  if defined(__APPLE__)
00758 #    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00759 #      define PNG_NO_MMX_CODE
00760 #    endif
00761 #  endif
00762 
00763 #  if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))
00764 #    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00765 #      define PNG_NO_MMX_CODE
00766 #    endif
00767 #  endif
00768 
00769 #  if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00770 #    define PNG_MMX_CODE_SUPPORTED
00771 #  endif
00772 
00773 #endif
00774 /* end of obsolete code to be removed from libpng-1.4.0 */
00775 
00776 #if !defined(PNG_1_0_X)
00777 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
00778 #  define PNG_USER_MEM_SUPPORTED
00779 #endif
00780 #endif /* PNG_1_0_X */
00781 
00782 /* Added at libpng-1.2.6 */
00783 #if !defined(PNG_1_0_X)
00784 #ifndef PNG_SET_USER_LIMITS_SUPPORTED
00785 #if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)
00786 #  define PNG_SET_USER_LIMITS_SUPPORTED
00787 #endif
00788 #endif
00789 #endif /* PNG_1_0_X */
00790 
00791 /* Added at libpng-1.0.16 and 1.2.6.  To accept all valid PNGS no matter
00792  * how large, set these limits to 0x7fffffffL
00793  */
00794 #ifndef PNG_USER_WIDTH_MAX
00795 #  define PNG_USER_WIDTH_MAX 1000000L
00796 #endif
00797 #ifndef PNG_USER_HEIGHT_MAX
00798 #  define PNG_USER_HEIGHT_MAX 1000000L
00799 #endif
00800 
00801 /* These are currently experimental features, define them if you want */
00802 
00803 /* very little testing */
00804 /*
00805 #ifdef PNG_READ_SUPPORTED
00806 #  ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
00807 #    define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
00808 #  endif
00809 #endif
00810 */
00811 
00812 /* This is only for PowerPC big-endian and 680x0 systems */
00813 /* some testing */
00814 /*
00815 #ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
00816 #  define PNG_READ_BIG_ENDIAN_SUPPORTED
00817 #endif
00818 */
00819 
00820 /* Buggy compilers (e.g., gcc 2.7.2.2) need this */
00821 /*
00822 #define PNG_NO_POINTER_INDEXING
00823 */
00824 
00825 /* These functions are turned off by default, as they will be phased out. */
00826 /*
00827 #define  PNG_USELESS_TESTS_SUPPORTED
00828 #define  PNG_CORRECT_PALETTE_SUPPORTED
00829 */
00830 
00831 /* Any chunks you are not interested in, you can undef here.  The
00832  * ones that allocate memory may be expecially important (hIST,
00833  * tEXt, zTXt, tRNS, pCAL).  Others will just save time and make png_info
00834  * a bit smaller.
00835  */
00836 
00837 #if defined(PNG_READ_SUPPORTED) && \
00838     !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00839     !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
00840 #  define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00841 #endif
00842 
00843 #if defined(PNG_WRITE_SUPPORTED) && \
00844     !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00845     !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
00846 #  define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00847 #endif
00848 
00849 #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00850 
00851 #ifdef PNG_NO_READ_TEXT
00852 #  define PNG_NO_READ_iTXt
00853 #  define PNG_NO_READ_tEXt
00854 #  define PNG_NO_READ_zTXt
00855 #endif
00856 #ifndef PNG_NO_READ_bKGD
00857 #  define PNG_READ_bKGD_SUPPORTED
00858 #  define PNG_bKGD_SUPPORTED
00859 #endif
00860 #ifndef PNG_NO_READ_cHRM
00861 #  define PNG_READ_cHRM_SUPPORTED
00862 #  define PNG_cHRM_SUPPORTED
00863 #endif
00864 #ifndef PNG_NO_READ_gAMA
00865 #  define PNG_READ_gAMA_SUPPORTED
00866 #  define PNG_gAMA_SUPPORTED
00867 #endif
00868 #ifndef PNG_NO_READ_hIST
00869 #  define PNG_READ_hIST_SUPPORTED
00870 #  define PNG_hIST_SUPPORTED
00871 #endif
00872 #ifndef PNG_NO_READ_iCCP
00873 #  define PNG_READ_iCCP_SUPPORTED
00874 #  define PNG_iCCP_SUPPORTED
00875 #endif
00876 #ifndef PNG_NO_READ_iTXt
00877 #  ifndef PNG_READ_iTXt_SUPPORTED
00878 #    define PNG_READ_iTXt_SUPPORTED
00879 #  endif
00880 #  ifndef PNG_iTXt_SUPPORTED
00881 #    define PNG_iTXt_SUPPORTED
00882 #  endif
00883 #endif
00884 #ifndef PNG_NO_READ_oFFs
00885 #  define PNG_READ_oFFs_SUPPORTED
00886 #  define PNG_oFFs_SUPPORTED
00887 #endif
00888 #ifndef PNG_NO_READ_pCAL
00889 #  define PNG_READ_pCAL_SUPPORTED
00890 #  define PNG_pCAL_SUPPORTED
00891 #endif
00892 #ifndef PNG_NO_READ_sCAL
00893 #  define PNG_READ_sCAL_SUPPORTED
00894 #  define PNG_sCAL_SUPPORTED
00895 #endif
00896 #ifndef PNG_NO_READ_pHYs
00897 #  define PNG_READ_pHYs_SUPPORTED
00898 #  define PNG_pHYs_SUPPORTED
00899 #endif
00900 #ifndef PNG_NO_READ_sBIT
00901 #  define PNG_READ_sBIT_SUPPORTED
00902 #  define PNG_sBIT_SUPPORTED
00903 #endif
00904 #ifndef PNG_NO_READ_sPLT
00905 #  define PNG_READ_sPLT_SUPPORTED
00906 #  define PNG_sPLT_SUPPORTED
00907 #endif
00908 #ifndef PNG_NO_READ_sRGB
00909 #  define PNG_READ_sRGB_SUPPORTED
00910 #  define PNG_sRGB_SUPPORTED
00911 #endif
00912 #ifndef PNG_NO_READ_tEXt
00913 #  define PNG_READ_tEXt_SUPPORTED
00914 #  define PNG_tEXt_SUPPORTED
00915 #endif
00916 #ifndef PNG_NO_READ_tIME
00917 #  define PNG_READ_tIME_SUPPORTED
00918 #  define PNG_tIME_SUPPORTED
00919 #endif
00920 #ifndef PNG_NO_READ_tRNS
00921 #  define PNG_READ_tRNS_SUPPORTED
00922 #  define PNG_tRNS_SUPPORTED
00923 #endif
00924 #ifndef PNG_NO_READ_zTXt
00925 #  define PNG_READ_zTXt_SUPPORTED
00926 #  define PNG_zTXt_SUPPORTED
00927 #endif
00928 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
00929 #  define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
00930 #  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
00931 #    define PNG_UNKNOWN_CHUNKS_SUPPORTED
00932 #  endif
00933 #  ifndef PNG_NO_HANDLE_AS_UNKNOWN
00934 #    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
00935 #  endif
00936 #endif
00937 #if !defined(PNG_NO_READ_USER_CHUNKS) && \
00938      defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
00939 #  define PNG_READ_USER_CHUNKS_SUPPORTED
00940 #  define PNG_USER_CHUNKS_SUPPORTED
00941 #  ifdef PNG_NO_READ_UNKNOWN_CHUNKS
00942 #    undef PNG_NO_READ_UNKNOWN_CHUNKS
00943 #  endif
00944 #  ifdef PNG_NO_HANDLE_AS_UNKNOWN
00945 #    undef PNG_NO_HANDLE_AS_UNKNOWN
00946 #  endif
00947 #endif
00948 #ifndef PNG_NO_READ_OPT_PLTE
00949 #  define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
00950 #endif                      /* optional PLTE chunk in RGB and RGBA images */
00951 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
00952     defined(PNG_READ_zTXt_SUPPORTED)
00953 #  define PNG_READ_TEXT_SUPPORTED
00954 #  define PNG_TEXT_SUPPORTED
00955 #endif
00956 
00957 #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
00958 
00959 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00960 
00961 #ifdef PNG_NO_WRITE_TEXT
00962 #  define PNG_NO_WRITE_iTXt
00963 #  define PNG_NO_WRITE_tEXt
00964 #  define PNG_NO_WRITE_zTXt
00965 #endif
00966 #ifndef PNG_NO_WRITE_bKGD
00967 #  define PNG_WRITE_bKGD_SUPPORTED
00968 #  ifndef PNG_bKGD_SUPPORTED
00969 #    define PNG_bKGD_SUPPORTED
00970 #  endif
00971 #endif
00972 #ifndef PNG_NO_WRITE_cHRM
00973 #  define PNG_WRITE_cHRM_SUPPORTED
00974 #  ifndef PNG_cHRM_SUPPORTED
00975 #    define PNG_cHRM_SUPPORTED
00976 #  endif
00977 #endif
00978 #ifndef PNG_NO_WRITE_gAMA
00979 #  define PNG_WRITE_gAMA_SUPPORTED
00980 #  ifndef PNG_gAMA_SUPPORTED
00981 #    define PNG_gAMA_SUPPORTED
00982 #  endif
00983 #endif
00984 #ifndef PNG_NO_WRITE_hIST
00985 #  define PNG_WRITE_hIST_SUPPORTED
00986 #  ifndef PNG_hIST_SUPPORTED
00987 #    define PNG_hIST_SUPPORTED
00988 #  endif
00989 #endif
00990 #ifndef PNG_NO_WRITE_iCCP
00991 #  define PNG_WRITE_iCCP_SUPPORTED
00992 #  ifndef PNG_iCCP_SUPPORTED
00993 #    define PNG_iCCP_SUPPORTED
00994 #  endif
00995 #endif
00996 #ifndef PNG_NO_WRITE_iTXt
00997 #  ifndef PNG_WRITE_iTXt_SUPPORTED
00998 #    define PNG_WRITE_iTXt_SUPPORTED
00999 #  endif
01000 #  ifndef PNG_iTXt_SUPPORTED
01001 #    define PNG_iTXt_SUPPORTED
01002 #  endif
01003 #endif
01004 #ifndef PNG_NO_WRITE_oFFs
01005 #  define PNG_WRITE_oFFs_SUPPORTED
01006 #  ifndef PNG_oFFs_SUPPORTED
01007 #    define PNG_oFFs_SUPPORTED
01008 #  endif
01009 #endif
01010 #ifndef PNG_NO_WRITE_pCAL
01011 #  define PNG_WRITE_pCAL_SUPPORTED
01012 #  ifndef PNG_pCAL_SUPPORTED
01013 #    define PNG_pCAL_SUPPORTED
01014 #  endif
01015 #endif
01016 #ifndef PNG_NO_WRITE_sCAL
01017 #  define PNG_WRITE_sCAL_SUPPORTED
01018 #  ifndef PNG_sCAL_SUPPORTED
01019 #    define PNG_sCAL_SUPPORTED
01020 #  endif
01021 #endif
01022 #ifndef PNG_NO_WRITE_pHYs
01023 #  define PNG_WRITE_pHYs_SUPPORTED
01024 #  ifndef PNG_pHYs_SUPPORTED
01025 #    define PNG_pHYs_SUPPORTED
01026 #  endif
01027 #endif
01028 #ifndef PNG_NO_WRITE_sBIT
01029 #  define PNG_WRITE_sBIT_SUPPORTED
01030 #  ifndef PNG_sBIT_SUPPORTED
01031 #    define PNG_sBIT_SUPPORTED
01032 #  endif
01033 #endif
01034 #ifndef PNG_NO_WRITE_sPLT
01035 #  define PNG_WRITE_sPLT_SUPPORTED
01036 #  ifndef PNG_sPLT_SUPPORTED
01037 #    define PNG_sPLT_SUPPORTED
01038 #  endif
01039 #endif
01040 #ifndef PNG_NO_WRITE_sRGB
01041 #  define PNG_WRITE_sRGB_SUPPORTED
01042 #  ifndef PNG_sRGB_SUPPORTED
01043 #    define PNG_sRGB_SUPPORTED
01044 #  endif
01045 #endif
01046 #ifndef PNG_NO_WRITE_tEXt
01047 #  define PNG_WRITE_tEXt_SUPPORTED
01048 #  ifndef PNG_tEXt_SUPPORTED
01049 #    define PNG_tEXt_SUPPORTED
01050 #  endif
01051 #endif
01052 #ifndef PNG_NO_WRITE_tIME
01053 #  define PNG_WRITE_tIME_SUPPORTED
01054 #  ifndef PNG_tIME_SUPPORTED
01055 #    define PNG_tIME_SUPPORTED
01056 #  endif
01057 #endif
01058 #ifndef PNG_NO_WRITE_tRNS
01059 #  define PNG_WRITE_tRNS_SUPPORTED
01060 #  ifndef PNG_tRNS_SUPPORTED
01061 #    define PNG_tRNS_SUPPORTED
01062 #  endif
01063 #endif
01064 #ifndef PNG_NO_WRITE_zTXt
01065 #  define PNG_WRITE_zTXt_SUPPORTED
01066 #  ifndef PNG_zTXt_SUPPORTED
01067 #    define PNG_zTXt_SUPPORTED
01068 #  endif
01069 #endif
01070 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
01071 #  define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
01072 #  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
01073 #    define PNG_UNKNOWN_CHUNKS_SUPPORTED
01074 #  endif
01075 #  ifndef PNG_NO_HANDLE_AS_UNKNOWN
01076 #     ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
01077 #       define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
01078 #     endif
01079 #  endif
01080 #endif
01081 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
01082     defined(PNG_WRITE_zTXt_SUPPORTED)
01083 #  define PNG_WRITE_TEXT_SUPPORTED
01084 #  ifndef PNG_TEXT_SUPPORTED
01085 #    define PNG_TEXT_SUPPORTED
01086 #  endif
01087 #endif
01088 
01089 #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
01090 
01091 /* Turn this off to disable png_read_png() and
01092  * png_write_png() and leave the row_pointers member
01093  * out of the info structure.
01094  */
01095 #ifndef PNG_NO_INFO_IMAGE
01096 #  define PNG_INFO_IMAGE_SUPPORTED
01097 #endif
01098 
01099 /* need the time information for reading tIME chunks */
01100 #if defined(PNG_tIME_SUPPORTED)
01101 #  if !defined(_WIN32_WCE)
01102      /* "time.h" functions are not supported on WindowsCE */
01103 #    include <time.h>
01104 #  endif
01105 #endif
01106 
01107 /* Some typedefs to get us started.  These should be safe on most of the
01108  * common platforms.  The typedefs should be at least as large as the
01109  * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
01110  * don't have to be exactly that size.  Some compilers dislike passing
01111  * unsigned shorts as function parameters, so you may be better off using
01112  * unsigned int for png_uint_16.  Likewise, for 64-bit systems, you may
01113  * want to have unsigned int for png_uint_32 instead of unsigned long.
01114  */
01115 
01116 typedef unsigned long png_uint_32;
01117 typedef long png_int_32;
01118 typedef unsigned short png_uint_16;
01119 typedef short png_int_16;
01120 typedef unsigned char png_byte;
01121 
01122 /* This is usually size_t.  It is typedef'ed just in case you need it to
01123    change (I'm not sure if you will or not, so I thought I'd be safe) */
01124 #ifdef PNG_SIZE_T
01125    typedef PNG_SIZE_T png_size_t;
01126 #  define png_sizeof(x) png_convert_size(sizeof(x))
01127 #else
01128    typedef size_t png_size_t;
01129 #  define png_sizeof(x) sizeof(x)
01130 #endif
01131 
01132 /* The following is needed for medium model support.  It cannot be in the
01133  * PNG_INTERNAL section.  Needs modification for other compilers besides
01134  * MSC.  Model independent support declares all arrays and pointers to be
01135  * large using the far keyword.  The zlib version used must also support
01136  * model independent data.  As of version zlib 1.0.4, the necessary changes
01137  * have been made in zlib.  The USE_FAR_KEYWORD define triggers other
01138  * changes that are needed. (Tim Wegner)
01139  */
01140 
01141 /* Separate compiler dependencies (problem here is that zlib.h always
01142    defines FAR. (SJT) */
01143 #ifdef __BORLANDC__
01144 #  if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
01145 #    define LDATA 1
01146 #  else
01147 #    define LDATA 0
01148 #  endif
01149    /* GRR:  why is Cygwin in here?  Cygwin is not Borland C... */
01150 #  if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
01151 #    define PNG_MAX_MALLOC_64K
01152 #    if (LDATA != 1)
01153 #      ifndef FAR
01154 #        define FAR __far
01155 #      endif
01156 #      define USE_FAR_KEYWORD
01157 #    endif   /* LDATA != 1 */
01158      /* Possibly useful for moving data out of default segment.
01159       * Uncomment it if you want. Could also define FARDATA as
01160       * const if your compiler supports it. (SJT)
01161 #    define FARDATA FAR
01162       */
01163 #  endif  /* __WIN32__, __FLAT__, __CYGWIN__ */
01164 #endif   /* __BORLANDC__ */
01165 
01166 
01167 /* Suggest testing for specific compiler first before testing for
01168  * FAR.  The Watcom compiler defines both __MEDIUM__ and M_I86MM,
01169  * making reliance oncertain keywords suspect. (SJT)
01170  */
01171 
01172 /* MSC Medium model */
01173 #if defined(FAR)
01174 #  if defined(M_I86MM)
01175 #    define USE_FAR_KEYWORD
01176 #    define FARDATA FAR
01177 #    include <dos.h>
01178 #  endif
01179 #endif
01180 
01181 /* SJT: default case */
01182 #ifndef FAR
01183 #  define FAR
01184 #endif
01185 
01186 /* At this point FAR is always defined */
01187 #ifndef FARDATA
01188 #  define FARDATA
01189 #endif
01190 
01191 /* Typedef for floating-point numbers that are converted
01192    to fixed-point with a multiple of 100,000, e.g., int_gamma */
01193 typedef png_int_32 png_fixed_point;
01194 
01195 /* Add typedefs for pointers */
01196 typedef void            FAR * png_voidp;
01197 typedef png_byte        FAR * png_bytep;
01198 typedef png_uint_32     FAR * png_uint_32p;
01199 typedef png_int_32      FAR * png_int_32p;
01200 typedef png_uint_16     FAR * png_uint_16p;
01201 typedef png_int_16      FAR * png_int_16p;
01202 typedef PNG_CONST char  FAR * png_const_charp;
01203 typedef char            FAR * png_charp;
01204 typedef png_fixed_point FAR * png_fixed_point_p;
01205 
01206 #ifndef PNG_NO_STDIO
01207 #if defined(_WIN32_WCE)
01208 typedef HANDLE                png_FILE_p;
01209 #else
01210 typedef FILE                * png_FILE_p;
01211 #endif
01212 #endif
01213 
01214 #ifdef PNG_FLOATING_POINT_SUPPORTED
01215 typedef double          FAR * png_doublep;
01216 #endif
01217 
01218 /* Pointers to pointers; i.e. arrays */
01219 typedef png_byte        FAR * FAR * png_bytepp;
01220 typedef png_uint_32     FAR * FAR * png_uint_32pp;
01221 typedef png_int_32      FAR * FAR * png_int_32pp;
01222 typedef png_uint_16     FAR * FAR * png_uint_16pp;
01223 typedef png_int_16      FAR * FAR * png_int_16pp;
01224 typedef PNG_CONST char  FAR * FAR * png_const_charpp;
01225 typedef char            FAR * FAR * png_charpp;
01226 typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
01227 #ifdef PNG_FLOATING_POINT_SUPPORTED
01228 typedef double          FAR * FAR * png_doublepp;
01229 #endif
01230 
01231 /* Pointers to pointers to pointers; i.e., pointer to array */
01232 typedef char            FAR * FAR * FAR * png_charppp;
01233 
01234 #if defined(PNG_1_0_X) || defined(PNG_1_2_X)
01235 /* SPC -  Is this stuff deprecated? */
01236 /* It'll be removed as of libpng-1.3.0 - GR-P */
01237 /* libpng typedefs for types in zlib. If zlib changes
01238  * or another compression library is used, then change these.
01239  * Eliminates need to change all the source files.
01240  */
01241 typedef charf *         png_zcharp;
01242 typedef charf * FAR *   png_zcharpp;
01243 typedef z_stream FAR *  png_zstreamp;
01244 #endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */
01245 
01246 /*
01247  * Define PNG_BUILD_DLL if the module being built is a Windows
01248  * LIBPNG DLL.
01249  *
01250  * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
01251  * It is equivalent to Microsoft predefined macro _DLL that is
01252  * automatically defined when you compile using the share
01253  * version of the CRT (C Run-Time library)
01254  *
01255  * The cygwin mods make this behavior a little different:
01256  * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
01257  * Define PNG_STATIC if you are building a static library for use with cygwin,
01258  *   -or- if you are building an application that you want to link to the
01259  *   static library.
01260  * PNG_USE_DLL is defined by default (no user action needed) unless one of
01261  *   the other flags is defined.
01262  */
01263 
01264 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
01265 #  define PNG_DLL
01266 #endif
01267 /* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
01268  * When building a static lib, default to no GLOBAL ARRAYS, but allow
01269  * command-line override
01270  */
01271 #if defined(__CYGWIN__)
01272 #  if !defined(PNG_STATIC)
01273 #    if defined(PNG_USE_GLOBAL_ARRAYS)
01274 #      undef PNG_USE_GLOBAL_ARRAYS
01275 #    endif
01276 #    if !defined(PNG_USE_LOCAL_ARRAYS)
01277 #      define PNG_USE_LOCAL_ARRAYS
01278 #    endif
01279 #  else
01280 #    if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
01281 #      if defined(PNG_USE_GLOBAL_ARRAYS)
01282 #        undef PNG_USE_GLOBAL_ARRAYS
01283 #      endif
01284 #    endif
01285 #  endif
01286 #  if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01287 #    define PNG_USE_LOCAL_ARRAYS
01288 #  endif
01289 #endif
01290 
01291 /* Do not use global arrays (helps with building DLL's)
01292  * They are no longer used in libpng itself, since version 1.0.5c,
01293  * but might be required for some pre-1.0.5c applications.
01294  */
01295 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01296 #  if defined(PNG_NO_GLOBAL_ARRAYS) || \
01297       (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)
01298 #    define PNG_USE_LOCAL_ARRAYS
01299 #  else
01300 #    define PNG_USE_GLOBAL_ARRAYS
01301 #  endif
01302 #endif
01303 
01304 #if defined(__CYGWIN__)
01305 #  undef PNGAPI
01306 #  define PNGAPI __cdecl
01307 #  undef PNG_IMPEXP
01308 #  define PNG_IMPEXP
01309 #endif  
01310 
01311 /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
01312  * you may get warnings regarding the linkage of png_zalloc and png_zfree.
01313  * Don't ignore those warnings; you must also reset the default calling
01314  * convention in your compiler to match your PNGAPI, and you must build
01315  * zlib and your applications the same way you build libpng.
01316  */
01317 
01318 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
01319 #  ifndef PNG_NO_MODULEDEF
01320 #    define PNG_NO_MODULEDEF
01321 #  endif
01322 #endif
01323 
01324 #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
01325 #  define PNG_IMPEXP
01326 #endif
01327 
01328 #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
01329     (( defined(_Windows) || defined(_WINDOWS) || \
01330        defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
01331 
01332 #  ifndef PNGAPI
01333 #     if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
01334 #        define PNGAPI __cdecl
01335 #     else
01336 #        define PNGAPI _cdecl
01337 #     endif
01338 #  endif
01339 
01340 #  if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
01341        0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
01342 #     define PNG_IMPEXP
01343 #  endif
01344 
01345 #  if !defined(PNG_IMPEXP)
01346 
01347 #     define PNG_EXPORT_TYPE1(type,symbol)  PNG_IMPEXP type PNGAPI symbol
01348 #     define PNG_EXPORT_TYPE2(type,symbol)  type PNG_IMPEXP PNGAPI symbol
01349 
01350       /* Borland/Microsoft */
01351 #     if defined(_MSC_VER) || defined(__BORLANDC__)
01352 #        if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
01353 #           define PNG_EXPORT PNG_EXPORT_TYPE1
01354 #        else
01355 #           define PNG_EXPORT PNG_EXPORT_TYPE2
01356 #           if defined(PNG_BUILD_DLL)
01357 #              define PNG_IMPEXP __export
01358 #           else
01359 #              define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
01360                                                  VC++ */
01361 #           endif                             /* Exists in Borland C++ for
01362                                                  C++ classes (== huge) */
01363 #        endif
01364 #     endif
01365 
01366 #     if !defined(PNG_IMPEXP)
01367 #        if defined(PNG_BUILD_DLL)
01368 #           define PNG_IMPEXP __declspec(dllexport)
01369 #        else
01370 #           define PNG_IMPEXP __declspec(dllimport)
01371 #        endif
01372 #     endif
01373 #  endif  /* PNG_IMPEXP */
01374 #else /* !(DLL || non-cygwin WINDOWS) */
01375 #   if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
01376 #      ifndef PNGAPI
01377 #         define PNGAPI _System
01378 #      endif
01379 #   else
01380 #      if 0 /* ... other platforms, with other meanings */
01381 #      endif
01382 #   endif
01383 #endif
01384 
01385 #ifndef PNGAPI
01386 #  define PNGAPI
01387 #endif
01388 #ifndef PNG_IMPEXP
01389 #  define PNG_IMPEXP
01390 #endif
01391 
01392 #ifdef PNG_BUILDSYMS
01393 #  ifndef PNG_EXPORT
01394 #    define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
01395 #  endif
01396 #  ifdef PNG_USE_GLOBAL_ARRAYS
01397 #    ifndef PNG_EXPORT_VAR
01398 #      define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
01399 #    endif
01400 #  endif
01401 #endif
01402 
01403 #ifndef PNG_EXPORT
01404 #  define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
01405 #endif
01406 
01407 #ifdef PNG_USE_GLOBAL_ARRAYS
01408 #  ifndef PNG_EXPORT_VAR
01409 #    define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
01410 #  endif
01411 #endif
01412 
01413 /* User may want to use these so they are not in PNG_INTERNAL. Any library
01414  * functions that are passed far data must be model independent.
01415  */
01416 
01417 #ifndef PNG_ABORT
01418 #  define PNG_ABORT() abort()
01419 #endif
01420 
01421 #ifdef PNG_SETJMP_SUPPORTED
01422 #  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
01423 #else
01424 #  define png_jmpbuf(png_ptr) \
01425    (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
01426 #endif
01427 
01428 #if defined(USE_FAR_KEYWORD)  /* memory model independent fns */
01429 /* use this to make far-to-near assignments */
01430 #  define CHECK   1
01431 #  define NOCHECK 0
01432 #  define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
01433 #  define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
01434 #  define png_snprintf _fsnprintf   /* Added to v 1.2.19 */
01435 #  define png_strlen  _fstrlen
01436 #  define png_memcmp  _fmemcmp    /* SJT: added */
01437 #  define png_memcpy  _fmemcpy
01438 #  define png_memset  _fmemset
01439 #else /* use the usual functions */
01440 #  define CVT_PTR(ptr)         (ptr)
01441 #  define CVT_PTR_NOCHECK(ptr) (ptr)
01442 #  ifndef PNG_NO_SNPRINTF
01443 #    ifdef _MSC_VER
01444 #      define png_snprintf _snprintf   /* Added to v 1.2.19 */
01445 #      define png_snprintf2 _snprintf
01446 #      define png_snprintf6 _snprintf
01447 #    else
01448 #      define png_snprintf snprintf   /* Added to v 1.2.19 */
01449 #      define png_snprintf2 snprintf
01450 #      define png_snprintf6 snprintf
01451 #    endif
01452 #  else
01453      /* You don't have or don't want to use snprintf().  Caution: Using
01454       * sprintf instead of snprintf exposes your application to accidental
01455       * or malevolent buffer overflows.  If you don't have snprintf()
01456       * as a general rule you should provide one (you can get one from
01457       * Portable OpenSSH). */
01458 #    define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
01459 #    define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
01460 #    define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
01461         sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
01462 #  endif
01463 #  define png_strlen  strlen
01464 #  define png_memcmp  memcmp      /* SJT: added */
01465 #  define png_memcpy  memcpy
01466 #  define png_memset  memset
01467 #endif
01468 /* End of memory model independent support */
01469 
01470 /* Just a little check that someone hasn't tried to define something
01471  * contradictory.
01472  */
01473 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
01474 #  undef PNG_ZBUF_SIZE
01475 #  define PNG_ZBUF_SIZE 65536L
01476 #endif
01477 
01478 /* Added at libpng-1.2.8 */
01479 #endif /* PNG_VERSION_INFO_ONLY */
01480 
01481 #endif /* PNGCONF_H */


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:18