pngconf.h

Go to the documentation of this file.
00001 
00002 /* pngconf.h - machine configurable file for libpng
00003  *
00004  * libpng version 1.2.23 - November 6, 2007
00005  * For conditions of distribution and use, see copyright notice in png.h
00006  * Copyright (c) 1998-2007 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          __png.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 #      define _BSD_SOURCE
00337 #      undef PNG_SAVE_BSD_SOURCE
00338 #    endif
00339 #  endif /* __linux__ */
00340 #endif /* PNG_SETJMP_SUPPORTED */
00341 
00342 #ifdef BSD
00343 #  include <strings.h>
00344 #else
00345 #  include <string.h>
00346 #endif
00347 
00348 /* Other defines for things like memory and the like can go here.  */
00349 #ifdef PNG_INTERNAL
00350 
00351 #include <stdlib.h>
00352 
00353 /* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
00354  * aren't usually used outside the library (as far as I know), so it is
00355  * debatable if they should be exported at all.  In the future, when it is
00356  * possible to have run-time registry of chunk-handling functions, some of
00357  * these will be made available again.
00358 #define PNG_EXTERN extern
00359  */
00360 #define PNG_EXTERN
00361 
00362 /* Other defines specific to compilers can go here.  Try to keep
00363  * them inside an appropriate ifdef/endif pair for portability.
00364  */
00365 
00366 #if defined(PNG_FLOATING_POINT_SUPPORTED)
00367 #  if defined(MACOS)
00368      /* We need to check that <math.h> hasn't already been included earlier
00369       * as it seems it doesn't agree with <fp.h>, yet we should really use
00370       * <fp.h> if possible.
00371       */
00372 #    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
00373 #      include <fp.h>
00374 #    endif
00375 #  else
00376 #    include <math.h>
00377 #  endif
00378 #  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
00379      /* Amiga SAS/C: We must include builtin FPU functions when compiling using
00380       * MATH=68881
00381       */
00382 #    include <m68881.h>
00383 #  endif
00384 #endif
00385 
00386 /* Codewarrior on NT has linking problems without this. */
00387 #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
00388 #  define PNG_ALWAYS_EXTERN
00389 #endif
00390 
00391 /* This provides the non-ANSI (far) memory allocation routines. */
00392 #if defined(__TURBOC__) && defined(__MSDOS__)
00393 #  include <mem.h>
00394 #  include <alloc.h>
00395 #endif
00396 
00397 /* I have no idea why is this necessary... */
00398 #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
00399     defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
00400 #  include <malloc.h>
00401 #endif
00402 
00403 /* This controls how fine the dithering gets.  As this allocates
00404  * a largish chunk of memory (32K), those who are not as concerned
00405  * with dithering quality can decrease some or all of these.
00406  */
00407 #ifndef PNG_DITHER_RED_BITS
00408 #  define PNG_DITHER_RED_BITS 5
00409 #endif
00410 #ifndef PNG_DITHER_GREEN_BITS
00411 #  define PNG_DITHER_GREEN_BITS 5
00412 #endif
00413 #ifndef PNG_DITHER_BLUE_BITS
00414 #  define PNG_DITHER_BLUE_BITS 5
00415 #endif
00416 
00417 /* This controls how fine the gamma correction becomes when you
00418  * are only interested in 8 bits anyway.  Increasing this value
00419  * results in more memory being used, and more pow() functions
00420  * being called to fill in the gamma tables.  Don't set this value
00421  * less then 8, and even that may not work (I haven't tested it).
00422  */
00423 
00424 #ifndef PNG_MAX_GAMMA_8
00425 #  define PNG_MAX_GAMMA_8 11
00426 #endif
00427 
00428 /* This controls how much a difference in gamma we can tolerate before
00429  * we actually start doing gamma conversion.
00430  */
00431 #ifndef PNG_GAMMA_THRESHOLD
00432 #  define PNG_GAMMA_THRESHOLD 0.05
00433 #endif
00434 
00435 #endif /* PNG_INTERNAL */
00436 
00437 /* The following uses const char * instead of char * for error
00438  * and warning message functions, so some compilers won't complain.
00439  * If you do not want to use const, define PNG_NO_CONST here.
00440  */
00441 
00442 #ifndef PNG_NO_CONST
00443 #  define PNG_CONST const
00444 #else
00445 #  define PNG_CONST
00446 #endif
00447 
00448 /* The following defines give you the ability to remove code from the
00449  * library that you will not be using.  I wish I could figure out how to
00450  * automate this, but I can't do that without making it seriously hard
00451  * on the users.  So if you are not using an ability, change the #define
00452  * to and #undef, and that part of the library will not be compiled.  If
00453  * your linker can't find a function, you may want to make sure the
00454  * ability is defined here.  Some of these depend upon some others being
00455  * defined.  I haven't figured out all the interactions here, so you may
00456  * have to experiment awhile to get everything to compile.  If you are
00457  * creating or using a shared library, you probably shouldn't touch this,
00458  * as it will affect the size of the structures, and this will cause bad
00459  * things to happen if the library and/or application ever change.
00460  */
00461 
00462 /* Any features you will not be using can be undef'ed here */
00463 
00464 /* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
00465  * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
00466  * on the compile line, then pick and choose which ones to define without
00467  * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
00468  * if you only want to have a png-compliant reader/writer but don't need
00469  * any of the extra transformations.  This saves about 80 kbytes in a
00470  * typical installation of the library. (PNG_NO_* form added in version
00471  * 1.0.1c, for consistency)
00472  */
00473 
00474 /* The size of the png_text structure changed in libpng-1.0.6 when
00475  * iTXt support was added.  iTXt support was turned off by default through
00476  * libpng-1.2.x, to support old apps that malloc the png_text structure
00477  * instead of calling png_set_text() and letting libpng malloc it.  It
00478  * was turned on by default in libpng-1.3.0.
00479  */
00480 
00481 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
00482 #  ifndef PNG_NO_iTXt_SUPPORTED
00483 #    define PNG_NO_iTXt_SUPPORTED
00484 #  endif
00485 #  ifndef PNG_NO_READ_iTXt
00486 #    define PNG_NO_READ_iTXt
00487 #  endif
00488 #  ifndef PNG_NO_WRITE_iTXt
00489 #    define PNG_NO_WRITE_iTXt
00490 #  endif
00491 #endif
00492 
00493 #if !defined(PNG_NO_iTXt_SUPPORTED)
00494 #  if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
00495 #    define PNG_READ_iTXt
00496 #  endif
00497 #  if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
00498 #    define PNG_WRITE_iTXt
00499 #  endif
00500 #endif
00501 
00502 /* The following support, added after version 1.0.0, can be turned off here en
00503  * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
00504  * with old applications that require the length of png_struct and png_info
00505  * to remain unchanged.
00506  */
00507 
00508 #ifdef PNG_LEGACY_SUPPORTED
00509 #  define PNG_NO_FREE_ME
00510 #  define PNG_NO_READ_UNKNOWN_CHUNKS
00511 #  define PNG_NO_WRITE_UNKNOWN_CHUNKS
00512 #  define PNG_NO_READ_USER_CHUNKS
00513 #  define PNG_NO_READ_iCCP
00514 #  define PNG_NO_WRITE_iCCP
00515 #  define PNG_NO_READ_iTXt
00516 #  define PNG_NO_WRITE_iTXt
00517 #  define PNG_NO_READ_sCAL
00518 #  define PNG_NO_WRITE_sCAL
00519 #  define PNG_NO_READ_sPLT
00520 #  define PNG_NO_WRITE_sPLT
00521 #  define PNG_NO_INFO_IMAGE
00522 #  define PNG_NO_READ_RGB_TO_GRAY
00523 #  define PNG_NO_READ_USER_TRANSFORM
00524 #  define PNG_NO_WRITE_USER_TRANSFORM
00525 #  define PNG_NO_USER_MEM
00526 #  define PNG_NO_READ_EMPTY_PLTE
00527 #  define PNG_NO_MNG_FEATURES
00528 #  define PNG_NO_FIXED_POINT_SUPPORTED
00529 #endif
00530 
00531 /* Ignore attempt to turn off both floating and fixed point support */
00532 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
00533     !defined(PNG_NO_FIXED_POINT_SUPPORTED)
00534 #  define PNG_FIXED_POINT_SUPPORTED
00535 #endif
00536 
00537 #ifndef PNG_NO_FREE_ME
00538 #  define PNG_FREE_ME_SUPPORTED
00539 #endif
00540 
00541 #if defined(PNG_READ_SUPPORTED)
00542 
00543 #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
00544       !defined(PNG_NO_READ_TRANSFORMS)
00545 #  define PNG_READ_TRANSFORMS_SUPPORTED
00546 #endif
00547 
00548 #ifdef PNG_READ_TRANSFORMS_SUPPORTED
00549 #  ifndef PNG_NO_READ_EXPAND
00550 #    define PNG_READ_EXPAND_SUPPORTED
00551 #  endif
00552 #  ifndef PNG_NO_READ_SHIFT
00553 #    define PNG_READ_SHIFT_SUPPORTED
00554 #  endif
00555 #  ifndef PNG_NO_READ_PACK
00556 #    define PNG_READ_PACK_SUPPORTED
00557 #  endif
00558 #  ifndef PNG_NO_READ_BGR
00559 #    define PNG_READ_BGR_SUPPORTED
00560 #  endif
00561 #  ifndef PNG_NO_READ_SWAP
00562 #    define PNG_READ_SWAP_SUPPORTED
00563 #  endif
00564 #  ifndef PNG_NO_READ_PACKSWAP
00565 #    define PNG_READ_PACKSWAP_SUPPORTED
00566 #  endif
00567 #  ifndef PNG_NO_READ_INVERT
00568 #    define PNG_READ_INVERT_SUPPORTED
00569 #  endif
00570 #  ifndef PNG_NO_READ_DITHER
00571 #    define PNG_READ_DITHER_SUPPORTED
00572 #  endif
00573 #  ifndef PNG_NO_READ_BACKGROUND
00574 #    define PNG_READ_BACKGROUND_SUPPORTED
00575 #  endif
00576 #  ifndef PNG_NO_READ_16_TO_8
00577 #    define PNG_READ_16_TO_8_SUPPORTED
00578 #  endif
00579 #  ifndef PNG_NO_READ_FILLER
00580 #    define PNG_READ_FILLER_SUPPORTED
00581 #  endif
00582 #  ifndef PNG_NO_READ_GAMMA
00583 #    define PNG_READ_GAMMA_SUPPORTED
00584 #  endif
00585 #  ifndef PNG_NO_READ_GRAY_TO_RGB
00586 #    define PNG_READ_GRAY_TO_RGB_SUPPORTED
00587 #  endif
00588 #  ifndef PNG_NO_READ_SWAP_ALPHA
00589 #    define PNG_READ_SWAP_ALPHA_SUPPORTED
00590 #  endif
00591 #  ifndef PNG_NO_READ_INVERT_ALPHA
00592 #    define PNG_READ_INVERT_ALPHA_SUPPORTED
00593 #  endif
00594 #  ifndef PNG_NO_READ_STRIP_ALPHA
00595 #    define PNG_READ_STRIP_ALPHA_SUPPORTED
00596 #  endif
00597 #  ifndef PNG_NO_READ_USER_TRANSFORM
00598 #    define PNG_READ_USER_TRANSFORM_SUPPORTED
00599 #  endif
00600 #  ifndef PNG_NO_READ_RGB_TO_GRAY
00601 #    define PNG_READ_RGB_TO_GRAY_SUPPORTED
00602 #  endif
00603 #endif /* PNG_READ_TRANSFORMS_SUPPORTED */
00604 
00605 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
00606  !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive   */
00607 #  define PNG_PROGRESSIVE_READ_SUPPORTED  /* reading.  This is not talking */
00608 #endif                            /* about interlacing capability!  You'll */
00609            /* still have interlacing unless you change the following line: */
00610 
00611 #define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */
00612 
00613 #ifndef PNG_NO_READ_COMPOSITE_NODIV
00614 #  ifndef PNG_NO_READ_COMPOSITED_NODIV  /* libpng-1.0.x misspelling */
00615 #    define PNG_READ_COMPOSITE_NODIV_SUPPORTED  /* well tested on Intel, SGI */
00616 #  endif
00617 #endif
00618 
00619 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
00620 /* Deprecated, will be removed from version 2.0.0.
00621    Use PNG_MNG_FEATURES_SUPPORTED instead. */
00622 #ifndef PNG_NO_READ_EMPTY_PLTE
00623 #  define PNG_READ_EMPTY_PLTE_SUPPORTED
00624 #endif
00625 #endif
00626 
00627 #endif /* PNG_READ_SUPPORTED */
00628 
00629 #if defined(PNG_WRITE_SUPPORTED)
00630 
00631 # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
00632     !defined(PNG_NO_WRITE_TRANSFORMS)
00633 #  define PNG_WRITE_TRANSFORMS_SUPPORTED
00634 #endif
00635 
00636 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
00637 #  ifndef PNG_NO_WRITE_SHIFT
00638 #    define PNG_WRITE_SHIFT_SUPPORTED
00639 #  endif
00640 #  ifndef PNG_NO_WRITE_PACK
00641 #    define PNG_WRITE_PACK_SUPPORTED
00642 #  endif
00643 #  ifndef PNG_NO_WRITE_BGR
00644 #    define PNG_WRITE_BGR_SUPPORTED
00645 #  endif
00646 #  ifndef PNG_NO_WRITE_SWAP
00647 #    define PNG_WRITE_SWAP_SUPPORTED
00648 #  endif
00649 #  ifndef PNG_NO_WRITE_PACKSWAP
00650 #    define PNG_WRITE_PACKSWAP_SUPPORTED
00651 #  endif
00652 #  ifndef PNG_NO_WRITE_INVERT
00653 #    define PNG_WRITE_INVERT_SUPPORTED
00654 #  endif
00655 #  ifndef PNG_NO_WRITE_FILLER
00656 #    define PNG_WRITE_FILLER_SUPPORTED   /* same as WRITE_STRIP_ALPHA */
00657 #  endif
00658 #  ifndef PNG_NO_WRITE_SWAP_ALPHA
00659 #    define PNG_WRITE_SWAP_ALPHA_SUPPORTED
00660 #  endif
00661 #  ifndef PNG_NO_WRITE_INVERT_ALPHA
00662 #    define PNG_WRITE_INVERT_ALPHA_SUPPORTED
00663 #  endif
00664 #  ifndef PNG_NO_WRITE_USER_TRANSFORM
00665 #    define PNG_WRITE_USER_TRANSFORM_SUPPORTED
00666 #  endif
00667 #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
00668 
00669 #if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
00670     !defined(PNG_WRITE_INTERLACING_SUPPORTED)
00671 #define PNG_WRITE_INTERLACING_SUPPORTED  /* not required for PNG-compliant
00672                                             encoders, but can cause trouble
00673                                             if left undefined */
00674 #endif
00675 
00676 #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
00677     !defined(PNG_WRITE_WEIGHTED_FILTER) && \
00678      defined(PNG_FLOATING_POINT_SUPPORTED)
00679 #  define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
00680 #endif
00681 
00682 #ifndef PNG_NO_WRITE_FLUSH
00683 #  define PNG_WRITE_FLUSH_SUPPORTED
00684 #endif
00685 
00686 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
00687 /* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
00688 #ifndef PNG_NO_WRITE_EMPTY_PLTE
00689 #  define PNG_WRITE_EMPTY_PLTE_SUPPORTED
00690 #endif
00691 #endif
00692 
00693 #endif /* PNG_WRITE_SUPPORTED */
00694 
00695 #ifndef PNG_1_0_X
00696 #  ifndef PNG_NO_ERROR_NUMBERS
00697 #    define PNG_ERROR_NUMBERS_SUPPORTED
00698 #  endif
00699 #endif /* PNG_1_0_X */
00700 
00701 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
00702     defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
00703 #  ifndef PNG_NO_USER_TRANSFORM_PTR
00704 #    define PNG_USER_TRANSFORM_PTR_SUPPORTED
00705 #  endif
00706 #endif
00707 
00708 #ifndef PNG_NO_STDIO
00709 #  define PNG_TIME_RFC1123_SUPPORTED
00710 #endif
00711 
00712 /* This adds extra functions in pngget.c for accessing data from the
00713  * info pointer (added in version 0.99)
00714  * png_get_image_width()
00715  * png_get_image_height()
00716  * png_get_bit_depth()
00717  * png_get_color_type()
00718  * png_get_compression_type()
00719  * png_get_filter_type()
00720  * png_get_interlace_type()
00721  * png_get_pixel_aspect_ratio()
00722  * png_get_pixels_per_meter()
00723  * png_get_x_offset_pixels()
00724  * png_get_y_offset_pixels()
00725  * png_get_x_offset_microns()
00726  * png_get_y_offset_microns()
00727  */
00728 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
00729 #  define PNG_EASY_ACCESS_SUPPORTED
00730 #endif
00731 
00732 /* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 
00733  * and removed from version 1.2.20.  The following will be removed
00734  * from libpng-1.4.0
00735 */
00736 
00737 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)
00738 #  ifndef PNG_OPTIMIZED_CODE_SUPPORTED
00739 #    define PNG_OPTIMIZED_CODE_SUPPORTED
00740 #  endif
00741 #endif
00742 
00743 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
00744 #  ifndef PNG_ASSEMBLER_CODE_SUPPORTED
00745 #    define PNG_ASSEMBLER_CODE_SUPPORTED
00746 #  endif
00747 
00748 #  if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)
00749      /* work around 64-bit gcc compiler bugs in gcc-3.x */
00750 #    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00751 #      define PNG_NO_MMX_CODE
00752 #    endif
00753 #  endif
00754 
00755 #  if defined(__APPLE__)
00756 #    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00757 #      define PNG_NO_MMX_CODE
00758 #    endif
00759 #  endif
00760 
00761 #  if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))
00762 #    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00763 #      define PNG_NO_MMX_CODE
00764 #    endif
00765 #  endif
00766 
00767 #  if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00768 #    define PNG_MMX_CODE_SUPPORTED
00769 #  endif
00770 
00771 #endif
00772 /* end of obsolete code to be removed from libpng-1.4.0 */
00773 
00774 #if !defined(PNG_1_0_X)
00775 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
00776 #  define PNG_USER_MEM_SUPPORTED
00777 #endif
00778 #endif /* PNG_1_0_X */
00779 
00780 /* Added at libpng-1.2.6 */
00781 #if !defined(PNG_1_0_X)
00782 #ifndef PNG_SET_USER_LIMITS_SUPPORTED
00783 #if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)
00784 #  define PNG_SET_USER_LIMITS_SUPPORTED
00785 #endif
00786 #endif
00787 #endif /* PNG_1_0_X */
00788 
00789 /* Added at libpng-1.0.16 and 1.2.6.  To accept all valid PNGS no matter
00790  * how large, set these limits to 0x7fffffffL
00791  */
00792 #ifndef PNG_USER_WIDTH_MAX
00793 #  define PNG_USER_WIDTH_MAX 1000000L
00794 #endif
00795 #ifndef PNG_USER_HEIGHT_MAX
00796 #  define PNG_USER_HEIGHT_MAX 1000000L
00797 #endif
00798 
00799 /* These are currently experimental features, define them if you want */
00800 
00801 /* very little testing */
00802 /*
00803 #ifdef PNG_READ_SUPPORTED
00804 #  ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
00805 #    define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
00806 #  endif
00807 #endif
00808 */
00809 
00810 /* This is only for PowerPC big-endian and 680x0 systems */
00811 /* some testing */
00812 /*
00813 #ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
00814 #  define PNG_READ_BIG_ENDIAN_SUPPORTED
00815 #endif
00816 */
00817 
00818 /* Buggy compilers (e.g., gcc 2.7.2.2) need this */
00819 /*
00820 #define PNG_NO_POINTER_INDEXING
00821 */
00822 
00823 /* These functions are turned off by default, as they will be phased out. */
00824 /*
00825 #define  PNG_USELESS_TESTS_SUPPORTED
00826 #define  PNG_CORRECT_PALETTE_SUPPORTED
00827 */
00828 
00829 /* Any chunks you are not interested in, you can undef here.  The
00830  * ones that allocate memory may be expecially important (hIST,
00831  * tEXt, zTXt, tRNS, pCAL).  Others will just save time and make png_info
00832  * a bit smaller.
00833  */
00834 
00835 #if defined(PNG_READ_SUPPORTED) && \
00836     !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00837     !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
00838 #  define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00839 #endif
00840 
00841 #if defined(PNG_WRITE_SUPPORTED) && \
00842     !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00843     !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
00844 #  define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00845 #endif
00846 
00847 #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00848 
00849 #ifdef PNG_NO_READ_TEXT
00850 #  define PNG_NO_READ_iTXt
00851 #  define PNG_NO_READ_tEXt
00852 #  define PNG_NO_READ_zTXt
00853 #endif
00854 #ifndef PNG_NO_READ_bKGD
00855 #  define PNG_READ_bKGD_SUPPORTED
00856 #  define PNG_bKGD_SUPPORTED
00857 #endif
00858 #ifndef PNG_NO_READ_cHRM
00859 #  define PNG_READ_cHRM_SUPPORTED
00860 #  define PNG_cHRM_SUPPORTED
00861 #endif
00862 #ifndef PNG_NO_READ_gAMA
00863 #  define PNG_READ_gAMA_SUPPORTED
00864 #  define PNG_gAMA_SUPPORTED
00865 #endif
00866 #ifndef PNG_NO_READ_hIST
00867 #  define PNG_READ_hIST_SUPPORTED
00868 #  define PNG_hIST_SUPPORTED
00869 #endif
00870 #ifndef PNG_NO_READ_iCCP
00871 #  define PNG_READ_iCCP_SUPPORTED
00872 #  define PNG_iCCP_SUPPORTED
00873 #endif
00874 #ifndef PNG_NO_READ_iTXt
00875 #  ifndef PNG_READ_iTXt_SUPPORTED
00876 #    define PNG_READ_iTXt_SUPPORTED
00877 #  endif
00878 #  ifndef PNG_iTXt_SUPPORTED
00879 #    define PNG_iTXt_SUPPORTED
00880 #  endif
00881 #endif
00882 #ifndef PNG_NO_READ_oFFs
00883 #  define PNG_READ_oFFs_SUPPORTED
00884 #  define PNG_oFFs_SUPPORTED
00885 #endif
00886 #ifndef PNG_NO_READ_pCAL
00887 #  define PNG_READ_pCAL_SUPPORTED
00888 #  define PNG_pCAL_SUPPORTED
00889 #endif
00890 #ifndef PNG_NO_READ_sCAL
00891 #  define PNG_READ_sCAL_SUPPORTED
00892 #  define PNG_sCAL_SUPPORTED
00893 #endif
00894 #ifndef PNG_NO_READ_pHYs
00895 #  define PNG_READ_pHYs_SUPPORTED
00896 #  define PNG_pHYs_SUPPORTED
00897 #endif
00898 #ifndef PNG_NO_READ_sBIT
00899 #  define PNG_READ_sBIT_SUPPORTED
00900 #  define PNG_sBIT_SUPPORTED
00901 #endif
00902 #ifndef PNG_NO_READ_sPLT
00903 #  define PNG_READ_sPLT_SUPPORTED
00904 #  define PNG_sPLT_SUPPORTED
00905 #endif
00906 #ifndef PNG_NO_READ_sRGB
00907 #  define PNG_READ_sRGB_SUPPORTED
00908 #  define PNG_sRGB_SUPPORTED
00909 #endif
00910 #ifndef PNG_NO_READ_tEXt
00911 #  define PNG_READ_tEXt_SUPPORTED
00912 #  define PNG_tEXt_SUPPORTED
00913 #endif
00914 #ifndef PNG_NO_READ_tIME
00915 #  define PNG_READ_tIME_SUPPORTED
00916 #  define PNG_tIME_SUPPORTED
00917 #endif
00918 #ifndef PNG_NO_READ_tRNS
00919 #  define PNG_READ_tRNS_SUPPORTED
00920 #  define PNG_tRNS_SUPPORTED
00921 #endif
00922 #ifndef PNG_NO_READ_zTXt
00923 #  define PNG_READ_zTXt_SUPPORTED
00924 #  define PNG_zTXt_SUPPORTED
00925 #endif
00926 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
00927 #  define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
00928 #  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
00929 #    define PNG_UNKNOWN_CHUNKS_SUPPORTED
00930 #  endif
00931 #  ifndef PNG_NO_HANDLE_AS_UNKNOWN
00932 #    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
00933 #  endif
00934 #endif
00935 #if !defined(PNG_NO_READ_USER_CHUNKS) && \
00936      defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
00937 #  define PNG_READ_USER_CHUNKS_SUPPORTED
00938 #  define PNG_USER_CHUNKS_SUPPORTED
00939 #  ifdef PNG_NO_READ_UNKNOWN_CHUNKS
00940 #    undef PNG_NO_READ_UNKNOWN_CHUNKS
00941 #  endif
00942 #  ifdef PNG_NO_HANDLE_AS_UNKNOWN
00943 #    undef PNG_NO_HANDLE_AS_UNKNOWN
00944 #  endif
00945 #endif
00946 #ifndef PNG_NO_READ_OPT_PLTE
00947 #  define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
00948 #endif                      /* optional PLTE chunk in RGB and RGBA images */
00949 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
00950     defined(PNG_READ_zTXt_SUPPORTED)
00951 #  define PNG_READ_TEXT_SUPPORTED
00952 #  define PNG_TEXT_SUPPORTED
00953 #endif
00954 
00955 #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
00956 
00957 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00958 
00959 #ifdef PNG_NO_WRITE_TEXT
00960 #  define PNG_NO_WRITE_iTXt
00961 #  define PNG_NO_WRITE_tEXt
00962 #  define PNG_NO_WRITE_zTXt
00963 #endif
00964 #ifndef PNG_NO_WRITE_bKGD
00965 #  define PNG_WRITE_bKGD_SUPPORTED
00966 #  ifndef PNG_bKGD_SUPPORTED
00967 #    define PNG_bKGD_SUPPORTED
00968 #  endif
00969 #endif
00970 #ifndef PNG_NO_WRITE_cHRM
00971 #  define PNG_WRITE_cHRM_SUPPORTED
00972 #  ifndef PNG_cHRM_SUPPORTED
00973 #    define PNG_cHRM_SUPPORTED
00974 #  endif
00975 #endif
00976 #ifndef PNG_NO_WRITE_gAMA
00977 #  define PNG_WRITE_gAMA_SUPPORTED
00978 #  ifndef PNG_gAMA_SUPPORTED
00979 #    define PNG_gAMA_SUPPORTED
00980 #  endif
00981 #endif
00982 #ifndef PNG_NO_WRITE_hIST
00983 #  define PNG_WRITE_hIST_SUPPORTED
00984 #  ifndef PNG_hIST_SUPPORTED
00985 #    define PNG_hIST_SUPPORTED
00986 #  endif
00987 #endif
00988 #ifndef PNG_NO_WRITE_iCCP
00989 #  define PNG_WRITE_iCCP_SUPPORTED
00990 #  ifndef PNG_iCCP_SUPPORTED
00991 #    define PNG_iCCP_SUPPORTED
00992 #  endif
00993 #endif
00994 #ifndef PNG_NO_WRITE_iTXt
00995 #  ifndef PNG_WRITE_iTXt_SUPPORTED
00996 #    define PNG_WRITE_iTXt_SUPPORTED
00997 #  endif
00998 #  ifndef PNG_iTXt_SUPPORTED
00999 #    define PNG_iTXt_SUPPORTED
01000 #  endif
01001 #endif
01002 #ifndef PNG_NO_WRITE_oFFs
01003 #  define PNG_WRITE_oFFs_SUPPORTED
01004 #  ifndef PNG_oFFs_SUPPORTED
01005 #    define PNG_oFFs_SUPPORTED
01006 #  endif
01007 #endif
01008 #ifndef PNG_NO_WRITE_pCAL
01009 #  define PNG_WRITE_pCAL_SUPPORTED
01010 #  ifndef PNG_pCAL_SUPPORTED
01011 #    define PNG_pCAL_SUPPORTED
01012 #  endif
01013 #endif
01014 #ifndef PNG_NO_WRITE_sCAL
01015 #  define PNG_WRITE_sCAL_SUPPORTED
01016 #  ifndef PNG_sCAL_SUPPORTED
01017 #    define PNG_sCAL_SUPPORTED
01018 #  endif
01019 #endif
01020 #ifndef PNG_NO_WRITE_pHYs
01021 #  define PNG_WRITE_pHYs_SUPPORTED
01022 #  ifndef PNG_pHYs_SUPPORTED
01023 #    define PNG_pHYs_SUPPORTED
01024 #  endif
01025 #endif
01026 #ifndef PNG_NO_WRITE_sBIT
01027 #  define PNG_WRITE_sBIT_SUPPORTED
01028 #  ifndef PNG_sBIT_SUPPORTED
01029 #    define PNG_sBIT_SUPPORTED
01030 #  endif
01031 #endif
01032 #ifndef PNG_NO_WRITE_sPLT
01033 #  define PNG_WRITE_sPLT_SUPPORTED
01034 #  ifndef PNG_sPLT_SUPPORTED
01035 #    define PNG_sPLT_SUPPORTED
01036 #  endif
01037 #endif
01038 #ifndef PNG_NO_WRITE_sRGB
01039 #  define PNG_WRITE_sRGB_SUPPORTED
01040 #  ifndef PNG_sRGB_SUPPORTED
01041 #    define PNG_sRGB_SUPPORTED
01042 #  endif
01043 #endif
01044 #ifndef PNG_NO_WRITE_tEXt
01045 #  define PNG_WRITE_tEXt_SUPPORTED
01046 #  ifndef PNG_tEXt_SUPPORTED
01047 #    define PNG_tEXt_SUPPORTED
01048 #  endif
01049 #endif
01050 #ifndef PNG_NO_WRITE_tIME
01051 #  define PNG_WRITE_tIME_SUPPORTED
01052 #  ifndef PNG_tIME_SUPPORTED
01053 #    define PNG_tIME_SUPPORTED
01054 #  endif
01055 #endif
01056 #ifndef PNG_NO_WRITE_tRNS
01057 #  define PNG_WRITE_tRNS_SUPPORTED
01058 #  ifndef PNG_tRNS_SUPPORTED
01059 #    define PNG_tRNS_SUPPORTED
01060 #  endif
01061 #endif
01062 #ifndef PNG_NO_WRITE_zTXt
01063 #  define PNG_WRITE_zTXt_SUPPORTED
01064 #  ifndef PNG_zTXt_SUPPORTED
01065 #    define PNG_zTXt_SUPPORTED
01066 #  endif
01067 #endif
01068 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
01069 #  define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
01070 #  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
01071 #    define PNG_UNKNOWN_CHUNKS_SUPPORTED
01072 #  endif
01073 #  ifndef PNG_NO_HANDLE_AS_UNKNOWN
01074 #     ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
01075 #       define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
01076 #     endif
01077 #  endif
01078 #endif
01079 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
01080     defined(PNG_WRITE_zTXt_SUPPORTED)
01081 #  define PNG_WRITE_TEXT_SUPPORTED
01082 #  ifndef PNG_TEXT_SUPPORTED
01083 #    define PNG_TEXT_SUPPORTED
01084 #  endif
01085 #endif
01086 
01087 #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
01088 
01089 /* Turn this off to disable png_read_png() and
01090  * png_write_png() and leave the row_pointers member
01091  * out of the info structure.
01092  */
01093 #ifndef PNG_NO_INFO_IMAGE
01094 #  define PNG_INFO_IMAGE_SUPPORTED
01095 #endif
01096 
01097 /* need the time information for reading tIME chunks */
01098 #if defined(PNG_tIME_SUPPORTED)
01099 #  if !defined(_WIN32_WCE)
01100      /* "time.h" functions are not supported on WindowsCE */
01101 #    include <time.h>
01102 #  endif
01103 #endif
01104 
01105 /* Some typedefs to get us started.  These should be safe on most of the
01106  * common platforms.  The typedefs should be at least as large as the
01107  * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
01108  * don't have to be exactly that size.  Some compilers dislike passing
01109  * unsigned shorts as function parameters, so you may be better off using
01110  * unsigned int for png_uint_16.  Likewise, for 64-bit systems, you may
01111  * want to have unsigned int for png_uint_32 instead of unsigned long.
01112  */
01113 
01114 typedef unsigned long png_uint_32;
01115 typedef long png_int_32;
01116 typedef unsigned short png_uint_16;
01117 typedef short png_int_16;
01118 typedef unsigned char png_byte;
01119 
01120 /* This is usually size_t.  It is typedef'ed just in case you need it to
01121    change (I'm not sure if you will or not, so I thought I'd be safe) */
01122 #ifdef PNG_SIZE_T
01123    typedef PNG_SIZE_T png_size_t;
01124 #  define png_sizeof(x) png_convert_size(sizeof (x))
01125 #else
01126    typedef size_t png_size_t;
01127 #  define png_sizeof(x) sizeof (x)
01128 #endif
01129 
01130 /* The following is needed for medium model support.  It cannot be in the
01131  * PNG_INTERNAL section.  Needs modification for other compilers besides
01132  * MSC.  Model independent support declares all arrays and pointers to be
01133  * large using the far keyword.  The zlib version used must also support
01134  * model independent data.  As of version zlib 1.0.4, the necessary changes
01135  * have been made in zlib.  The USE_FAR_KEYWORD define triggers other
01136  * changes that are needed. (Tim Wegner)
01137  */
01138 
01139 /* Separate compiler dependencies (problem here is that zlib.h always
01140    defines FAR. (SJT) */
01141 #ifdef __BORLANDC__
01142 #  if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
01143 #    define LDATA 1
01144 #  else
01145 #    define LDATA 0
01146 #  endif
01147    /* GRR:  why is Cygwin in here?  Cygwin is not Borland C... */
01148 #  if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
01149 #    define PNG_MAX_MALLOC_64K
01150 #    if (LDATA != 1)
01151 #      ifndef FAR
01152 #        define FAR __far
01153 #      endif
01154 #      define USE_FAR_KEYWORD
01155 #    endif   /* LDATA != 1 */
01156      /* Possibly useful for moving data out of default segment.
01157       * Uncomment it if you want. Could also define FARDATA as
01158       * const if your compiler supports it. (SJT)
01159 #    define FARDATA FAR
01160       */
01161 #  endif  /* __WIN32__, __FLAT__, __CYGWIN__ */
01162 #endif   /* __BORLANDC__ */
01163 
01164 
01165 /* Suggest testing for specific compiler first before testing for
01166  * FAR.  The Watcom compiler defines both __MEDIUM__ and M_I86MM,
01167  * making reliance oncertain keywords suspect. (SJT)
01168  */
01169 
01170 /* MSC Medium model */
01171 #if defined(FAR)
01172 #  if defined(M_I86MM)
01173 #    define USE_FAR_KEYWORD
01174 #    define FARDATA FAR
01175 #    include <dos.h>
01176 #  endif
01177 #endif
01178 
01179 /* SJT: default case */
01180 #ifndef FAR
01181 #  define FAR
01182 #endif
01183 
01184 /* At this point FAR is always defined */
01185 #ifndef FARDATA
01186 #  define FARDATA
01187 #endif
01188 
01189 /* Typedef for floating-point numbers that are converted
01190    to fixed-point with a multiple of 100,000, e.g., int_gamma */
01191 typedef png_int_32 png_fixed_point;
01192 
01193 /* Add typedefs for pointers */
01194 typedef void            FAR * png_voidp;
01195 typedef png_byte        FAR * png_bytep;
01196 typedef png_uint_32     FAR * png_uint_32p;
01197 typedef png_int_32      FAR * png_int_32p;
01198 typedef png_uint_16     FAR * png_uint_16p;
01199 typedef png_int_16      FAR * png_int_16p;
01200 typedef PNG_CONST char  FAR * png_const_charp;
01201 typedef char            FAR * png_charp;
01202 typedef png_fixed_point FAR * png_fixed_point_p;
01203 
01204 #ifndef PNG_NO_STDIO
01205 #if defined(_WIN32_WCE)
01206 typedef HANDLE                png_FILE_p;
01207 #else
01208 typedef FILE                * png_FILE_p;
01209 #endif
01210 #endif
01211 
01212 #ifdef PNG_FLOATING_POINT_SUPPORTED
01213 typedef double          FAR * png_doublep;
01214 #endif
01215 
01216 /* Pointers to pointers; i.e. arrays */
01217 typedef png_byte        FAR * FAR * png_bytepp;
01218 typedef png_uint_32     FAR * FAR * png_uint_32pp;
01219 typedef png_int_32      FAR * FAR * png_int_32pp;
01220 typedef png_uint_16     FAR * FAR * png_uint_16pp;
01221 typedef png_int_16      FAR * FAR * png_int_16pp;
01222 typedef PNG_CONST char  FAR * FAR * png_const_charpp;
01223 typedef char            FAR * FAR * png_charpp;
01224 typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
01225 #ifdef PNG_FLOATING_POINT_SUPPORTED
01226 typedef double          FAR * FAR * png_doublepp;
01227 #endif
01228 
01229 /* Pointers to pointers to pointers; i.e., pointer to array */
01230 typedef char            FAR * FAR * FAR * png_charppp;
01231 
01232 #if defined(PNG_1_0_X) || defined(PNG_1_2_X)
01233 /* SPC -  Is this stuff deprecated? */
01234 /* It'll be removed as of libpng-1.3.0 - GR-P */
01235 /* libpng typedefs for types in zlib. If zlib changes
01236  * or another compression library is used, then change these.
01237  * Eliminates need to change all the source files.
01238  */
01239 typedef charf *         png_zcharp;
01240 typedef charf * FAR *   png_zcharpp;
01241 typedef z_stream FAR *  png_zstreamp;
01242 #endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */
01243 
01244 /*
01245  * Define PNG_BUILD_DLL if the module being built is a Windows
01246  * LIBPNG DLL.
01247  *
01248  * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
01249  * It is equivalent to Microsoft predefined macro _DLL that is
01250  * automatically defined when you compile using the share
01251  * version of the CRT (C Run-Time library)
01252  *
01253  * The cygwin mods make this behavior a little different:
01254  * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
01255  * Define PNG_STATIC if you are building a static library for use with cygwin,
01256  *   -or- if you are building an application that you want to link to the
01257  *   static library.
01258  * PNG_USE_DLL is defined by default (no user action needed) unless one of
01259  *   the other flags is defined.
01260  */
01261 
01262 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
01263 #  define PNG_DLL
01264 #endif
01265 /* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
01266  * When building a static lib, default to no GLOBAL ARRAYS, but allow
01267  * command-line override
01268  */
01269 #if defined(__CYGWIN__)
01270 #  if !defined(PNG_STATIC)
01271 #    if defined(PNG_USE_GLOBAL_ARRAYS)
01272 #      undef PNG_USE_GLOBAL_ARRAYS
01273 #    endif
01274 #    if !defined(PNG_USE_LOCAL_ARRAYS)
01275 #      define PNG_USE_LOCAL_ARRAYS
01276 #    endif
01277 #  else
01278 #    if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
01279 #      if defined(PNG_USE_GLOBAL_ARRAYS)
01280 #        undef PNG_USE_GLOBAL_ARRAYS
01281 #      endif
01282 #    endif
01283 #  endif
01284 #  if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01285 #    define PNG_USE_LOCAL_ARRAYS
01286 #  endif
01287 #endif
01288 
01289 /* Do not use global arrays (helps with building DLL's)
01290  * They are no longer used in libpng itself, since version 1.0.5c,
01291  * but might be required for some pre-1.0.5c applications.
01292  */
01293 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01294 #  if defined(PNG_NO_GLOBAL_ARRAYS) || \
01295       (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)
01296 #    define PNG_USE_LOCAL_ARRAYS
01297 #  else
01298 #    define PNG_USE_GLOBAL_ARRAYS
01299 #  endif
01300 #endif
01301 
01302 #if defined(__CYGWIN__)
01303 #  undef PNGAPI
01304 #  define PNGAPI __cdecl
01305 #  undef PNG_IMPEXP
01306 #  define PNG_IMPEXP
01307 #endif  
01308 
01309 /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
01310  * you may get warnings regarding the linkage of png_zalloc and png_zfree.
01311  * Don't ignore those warnings; you must also reset the default calling
01312  * convention in your compiler to match your PNGAPI, and you must build
01313  * zlib and your applications the same way you build libpng.
01314  */
01315 
01316 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
01317 #  ifndef PNG_NO_MODULEDEF
01318 #    define PNG_NO_MODULEDEF
01319 #  endif
01320 #endif
01321 
01322 #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
01323 #  define PNG_IMPEXP
01324 #endif
01325 
01326 #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
01327     (( defined(_Windows) || defined(_WINDOWS) || \
01328        defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
01329 
01330 #  ifndef PNGAPI
01331 #     if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
01332 #        define PNGAPI __cdecl
01333 #     else
01334 #        define PNGAPI _cdecl
01335 #     endif
01336 #  endif
01337 
01338 #  if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
01339        0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
01340 #     define PNG_IMPEXP
01341 #  endif
01342 
01343 #  if !defined(PNG_IMPEXP)
01344 
01345 #     define PNG_EXPORT_TYPE1(type,symbol)  PNG_IMPEXP type PNGAPI symbol
01346 #     define PNG_EXPORT_TYPE2(type,symbol)  type PNG_IMPEXP PNGAPI symbol
01347 
01348       /* Borland/Microsoft */
01349 #     if defined(_MSC_VER) || defined(__BORLANDC__)
01350 #        if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
01351 #           define PNG_EXPORT PNG_EXPORT_TYPE1
01352 #        else
01353 #           define PNG_EXPORT PNG_EXPORT_TYPE2
01354 #           if defined(PNG_BUILD_DLL)
01355 #              define PNG_IMPEXP __export
01356 #           else
01357 #              define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
01358                                                  VC++ */
01359 #           endif                             /* Exists in Borland C++ for
01360                                                  C++ classes (== huge) */
01361 #        endif
01362 #     endif
01363 
01364 #     if !defined(PNG_IMPEXP)
01365 #        if defined(PNG_BUILD_DLL)
01366 #           define PNG_IMPEXP __declspec(dllexport)
01367 #        else
01368 #           define PNG_IMPEXP __declspec(dllimport)
01369 #        endif
01370 #     endif
01371 #  endif  /* PNG_IMPEXP */
01372 #else /* !(DLL || non-cygwin WINDOWS) */
01373 #   if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
01374 #      ifndef PNGAPI
01375 #         define PNGAPI _System
01376 #      endif
01377 #   else
01378 #      if 0 /* ... other platforms, with other meanings */
01379 #      endif
01380 #   endif
01381 #endif
01382 
01383 #ifndef PNGAPI
01384 #  define PNGAPI
01385 #endif
01386 #ifndef PNG_IMPEXP
01387 #  define PNG_IMPEXP
01388 #endif
01389 
01390 #ifdef PNG_BUILDSYMS
01391 #  ifndef PNG_EXPORT
01392 #    define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
01393 #  endif
01394 #  ifdef PNG_USE_GLOBAL_ARRAYS
01395 #    ifndef PNG_EXPORT_VAR
01396 #      define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
01397 #    endif
01398 #  endif
01399 #endif
01400 
01401 #ifndef PNG_EXPORT
01402 #  define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
01403 #endif
01404 
01405 #ifdef PNG_USE_GLOBAL_ARRAYS
01406 #  ifndef PNG_EXPORT_VAR
01407 #    define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
01408 #  endif
01409 #endif
01410 
01411 /* User may want to use these so they are not in PNG_INTERNAL. Any library
01412  * functions that are passed far data must be model independent.
01413  */
01414 
01415 #ifndef PNG_ABORT
01416 #  define PNG_ABORT() abort()
01417 #endif
01418 
01419 #ifdef PNG_SETJMP_SUPPORTED
01420 #  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
01421 #else
01422 #  define png_jmpbuf(png_ptr) \
01423    (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
01424 #endif
01425 
01426 #if defined(USE_FAR_KEYWORD)  /* memory model independent fns */
01427 /* use this to make far-to-near assignments */
01428 #  define CHECK   1
01429 #  define NOCHECK 0
01430 #  define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
01431 #  define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
01432 #  define png_snprintf _fsnprintf   /* Added to v 1.2.19 */
01433 #  define png_strlen  _fstrlen
01434 #  define png_memcmp  _fmemcmp    /* SJT: added */
01435 #  define png_memcpy  _fmemcpy
01436 #  define png_memset  _fmemset
01437 #else /* use the usual functions */
01438 #  define CVT_PTR(ptr)         (ptr)
01439 #  define CVT_PTR_NOCHECK(ptr) (ptr)
01440 #  ifndef PNG_NO_SNPRINTF
01441 #    ifdef _MSC_VER
01442 #      define png_snprintf _snprintf   /* Added to v 1.2.19 */
01443 #      define png_snprintf2 _snprintf
01444 #      define png_snprintf6 _snprintf
01445 #    else
01446 #      define png_snprintf snprintf   /* Added to v 1.2.19 */
01447 #      define png_snprintf2 snprintf
01448 #      define png_snprintf6 snprintf
01449 #    endif
01450 #  else
01451      /* You don't have or don't want to use snprintf().  Caution: Using
01452       * sprintf instead of snprintf exposes your application to accidental
01453       * or malevolent buffer overflows.  If you don't have snprintf()
01454       * as a general rule you should provide one (you can get one from
01455       * Portable OpenSSH). */
01456 #    define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
01457 #    define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
01458 #    define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
01459         sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
01460 #  endif
01461 #  define png_strlen  strlen
01462 #  define png_memcmp  memcmp      /* SJT: added */
01463 #  define png_memcpy  memcpy
01464 #  define png_memset  memset
01465 #endif
01466 /* End of memory model independent support */
01467 
01468 /* Just a little check that someone hasn't tried to define something
01469  * contradictory.
01470  */
01471 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
01472 #  undef PNG_ZBUF_SIZE
01473 #  define PNG_ZBUF_SIZE 65536L
01474 #endif
01475 
01476 /* Added at libpng-1.2.8 */
01477 #endif /* PNG_VERSION_INFO_ONLY */
01478 
01479 #endif /* PNGCONF_H */

Generated on Tue Jul 5 14:13:31 2011 for ROOT_528-00b_version by  doxygen 1.5.1