Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef PNGCONF_H
00018 #define PNGCONF_H
00019
00020 #define PNG_1_2_X
00021
00022
00023
00024
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
00034 #ifdef PNG_CONFIGURE_LIBPNG
00035 #ifdef HAVE_CONFIG_H
00036 #include "config.h"
00037 #endif
00038 #endif
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
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
00073
00074 #ifndef PNG_VERSION_INFO_ONLY
00075
00076
00077
00078
00079
00080 #if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \
00081 !defined(PNG_WARN_UNINITIALIZED_ROW)
00082 # define PNG_WARN_UNINITIALIZED_ROW 1
00083 #endif
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099 #ifndef PNG_ZBUF_SIZE
00100 # define PNG_ZBUF_SIZE 8192
00101 #endif
00102
00103
00104
00105 #ifndef PNG_NO_READ_SUPPORTED
00106 # define PNG_READ_SUPPORTED
00107 #endif
00108
00109
00110
00111 #ifndef PNG_NO_WRITE_SUPPORTED
00112 # define PNG_WRITE_SUPPORTED
00113 #endif
00114
00115
00116
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
00130
00131
00132
00133
00134
00135
00136
00137 #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
00138 # define PNG_MAX_MALLOC_64K
00139 #endif
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
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
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232 #if defined(_WIN32_WCE)
00233 # include <windows.h>
00234
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
00261 # include <stdio.h>
00262 # endif
00263 # endif
00264
00265
00266
00267
00268
00269
00270
00271
00272 #ifndef PNGARG
00273
00274 #ifdef OF
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
00286
00287
00288 #endif
00289
00290 #endif
00291
00292
00293
00294
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
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
00314
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
00324
00325
00326 __pngconf.h__ already includes setjmp.h;
00327 __dont__ include it again.;
00328 # endif
00329 # endif
00330
00331
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
00342 #endif
00343
00344 #ifdef BSD
00345 # include <strings.h>
00346 #else
00347 # include <string.h>
00348 #endif
00349
00350
00351 #ifdef PNG_INTERNAL
00352
00353 #include <stdlib.h>
00354
00355
00356
00357
00358
00359
00360
00361
00362 #define PNG_EXTERN
00363
00364
00365
00366
00367
00368 #if defined(PNG_FLOATING_POINT_SUPPORTED)
00369 # if defined(MACOS)
00370
00371
00372
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
00382
00383
00384 # include <m68881.h>
00385 # endif
00386 #endif
00387
00388
00389 #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
00390 # define PNG_ALWAYS_EXTERN
00391 #endif
00392
00393
00394 #if defined(__TURBOC__) && defined(__MSDOS__)
00395 # include <mem.h>
00396 # include <alloc.h>
00397 #endif
00398
00399
00400 #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
00401 defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
00402 # include <malloc.h>
00403 #endif
00404
00405
00406
00407
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
00420
00421
00422
00423
00424
00425
00426 #ifndef PNG_MAX_GAMMA_8
00427 # define PNG_MAX_GAMMA_8 11
00428 #endif
00429
00430
00431
00432
00433 #ifndef PNG_GAMMA_THRESHOLD
00434 # define PNG_GAMMA_THRESHOLD 0.05
00435 #endif
00436
00437 #endif
00438
00439
00440
00441
00442
00443
00444 #ifndef PNG_NO_CONST
00445 # define PNG_CONST const
00446 #else
00447 # define PNG_CONST
00448 #endif
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
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
00505
00506
00507
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
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
00606
00607 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
00608 !defined(PNG_PROGRESSIVE_READ_SUPPORTED)
00609 # define PNG_PROGRESSIVE_READ_SUPPORTED
00610 #endif
00611
00612
00613 #define PNG_READ_INTERLACING_SUPPORTED
00614
00615 #ifndef PNG_NO_READ_COMPOSITE_NODIV
00616 # ifndef PNG_NO_READ_COMPOSITED_NODIV
00617 # define PNG_READ_COMPOSITE_NODIV_SUPPORTED
00618 # endif
00619 #endif
00620
00621 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
00622
00623
00624 #ifndef PNG_NO_READ_EMPTY_PLTE
00625 # define PNG_READ_EMPTY_PLTE_SUPPORTED
00626 #endif
00627 #endif
00628
00629 #endif
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
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
00670
00671 #if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
00672 !defined(PNG_WRITE_INTERLACING_SUPPORTED)
00673 #define PNG_WRITE_INTERLACING_SUPPORTED
00674
00675
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
00690 #ifndef PNG_NO_WRITE_EMPTY_PLTE
00691 # define PNG_WRITE_EMPTY_PLTE_SUPPORTED
00692 #endif
00693 #endif
00694
00695 #endif
00696
00697 #ifndef PNG_1_0_X
00698 # ifndef PNG_NO_ERROR_NUMBERS
00699 # define PNG_ERROR_NUMBERS_SUPPORTED
00700 # endif
00701 #endif
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
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
00731 # define PNG_EASY_ACCESS_SUPPORTED
00732 #endif
00733
00734
00735
00736
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
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
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
00781
00782
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
00790
00791
00792
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
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
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
00950 #endif
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
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
01090
01091
01092
01093
01094
01095 #ifndef PNG_NO_INFO_IMAGE
01096 # define PNG_INFO_IMAGE_SUPPORTED
01097 #endif
01098
01099
01100 #if defined(PNG_tIME_SUPPORTED)
01101 # if !defined(_WIN32_WCE)
01102
01103 # include <time.h>
01104 # endif
01105 #endif
01106
01107
01108
01109
01110
01111
01112
01113
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
01123
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
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143 #ifdef __BORLANDC__
01144 # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
01145 # define LDATA 1
01146 # else
01147 # define LDATA 0
01148 # endif
01149
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
01158
01159
01160
01161
01162
01163 # endif
01164 #endif
01165
01166
01167
01168
01169
01170
01171
01172
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
01182 #ifndef FAR
01183 # define FAR
01184 #endif
01185
01186
01187 #ifndef FARDATA
01188 # define FARDATA
01189 #endif
01190
01191
01192
01193 typedef png_int_32 png_fixed_point;
01194
01195
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
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
01232 typedef char FAR * FAR * FAR * png_charppp;
01233
01234 #if defined(PNG_1_0_X) || defined(PNG_1_2_X)
01235
01236
01237
01238
01239
01240
01241 typedef charf * png_zcharp;
01242 typedef charf * FAR * png_zcharpp;
01243 typedef z_stream FAR * png_zstreamp;
01244 #endif
01245
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261
01262
01263
01264 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
01265 # define PNG_DLL
01266 #endif
01267
01268
01269
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
01292
01293
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
01312
01313
01314
01315
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 )
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
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
01360
01361 # endif
01362
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
01374 #else
01375 # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
01376 # ifndef PNGAPI
01377 # define PNGAPI _System
01378 # endif
01379 # else
01380 # if 0
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
01414
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)
01429
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
01435 # define png_strlen _fstrlen
01436 # define png_memcmp _fmemcmp
01437 # define png_memcpy _fmemcpy
01438 # define png_memset _fmemset
01439 #else
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
01445 # define png_snprintf2 _snprintf
01446 # define png_snprintf6 _snprintf
01447 # else
01448 # define png_snprintf snprintf
01449 # define png_snprintf2 snprintf
01450 # define png_snprintf6 snprintf
01451 # endif
01452 # else
01453
01454
01455
01456
01457
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
01465 # define png_memcpy memcpy
01466 # define png_memset memset
01467 #endif
01468
01469
01470
01471
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
01479 #endif
01480
01481 #endif