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 #include "pngusr.h"
00028 #endif
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #ifdef __STDC__
00052 #ifdef SPECIALBUILD
00053 # pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
00054 are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
00055 #endif
00056
00057 #ifdef PRIVATEBUILD
00058 # pragma message("PRIVATEBUILD is deprecated. Use\
00059 PNG_USER_PRIVATEBUILD instead.")
00060 # define PNG_USER_PRIVATEBUILD PRIVATEBUILD
00061 #endif
00062 #endif
00063
00064 #ifndef PNG_VERSION_INFO_ONLY
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 #ifndef PNG_ZBUF_SIZE
00082 # define PNG_ZBUF_SIZE 8192
00083 #endif
00084
00085
00086
00087 #ifndef PNG_NO_READ_SUPPORTED
00088 # define PNG_READ_SUPPORTED
00089 #endif
00090
00091
00092
00093 #ifndef PNG_NO_WRITE_SUPPORTED
00094 # define PNG_WRITE_SUPPORTED
00095 #endif
00096
00097
00098
00099 #if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
00100 # ifndef PNG_MNG_FEATURES_SUPPORTED
00101 # define PNG_MNG_FEATURES_SUPPORTED
00102 # endif
00103 #endif
00104
00105 #ifndef PNG_NO_FLOATING_POINT_SUPPORTED
00106 # ifndef PNG_FLOATING_POINT_SUPPORTED
00107 # define PNG_FLOATING_POINT_SUPPORTED
00108 # endif
00109 #endif
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
00120 # define PNG_MAX_MALLOC_64K
00121 #endif
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156 #if defined(__CYGWIN__)
00157 # if defined(ALL_STATIC)
00158 # if defined(PNG_BUILD_DLL)
00159 # undef PNG_BUILD_DLL
00160 # endif
00161 # if defined(PNG_USE_DLL)
00162 # undef PNG_USE_DLL
00163 # endif
00164 # if defined(PNG_DLL)
00165 # undef PNG_DLL
00166 # endif
00167 # if !defined(PNG_STATIC)
00168 # define PNG_STATIC
00169 # endif
00170 # else
00171 # if defined (PNG_BUILD_DLL)
00172 # if defined(PNG_STATIC)
00173 # undef PNG_STATIC
00174 # endif
00175 # if defined(PNG_USE_DLL)
00176 # undef PNG_USE_DLL
00177 # endif
00178 # if !defined(PNG_DLL)
00179 # define PNG_DLL
00180 # endif
00181 # else
00182 # if defined(PNG_STATIC)
00183 # if defined(PNG_USE_DLL)
00184 # undef PNG_USE_DLL
00185 # endif
00186 # if defined(PNG_DLL)
00187 # undef PNG_DLL
00188 # endif
00189 # else
00190 # if !defined(PNG_USE_DLL)
00191 # define PNG_USE_DLL
00192 # endif
00193 # if !defined(PNG_DLL)
00194 # define PNG_DLL
00195 # endif
00196 # endif
00197 # endif
00198 # endif
00199 #endif
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214 #if defined(_WIN32_WCE)
00215 # include <windows.h>
00216
00217 # define PNG_NO_CONSOLE_IO
00218 # ifdef PNG_DEBUG
00219 # undef PNG_DEBUG
00220 # endif
00221 #endif
00222
00223 #ifdef PNG_BUILD_DLL
00224 # ifndef PNG_CONSOLE_IO_SUPPORTED
00225 # ifndef PNG_NO_CONSOLE_IO
00226 # define PNG_NO_CONSOLE_IO
00227 # endif
00228 # endif
00229 #endif
00230
00231 # ifdef PNG_NO_STDIO
00232 # ifndef PNG_NO_CONSOLE_IO
00233 # define PNG_NO_CONSOLE_IO
00234 # endif
00235 # ifdef PNG_DEBUG
00236 # if (PNG_DEBUG > 0)
00237 # include <stdio.h>
00238 # endif
00239 # endif
00240 # else
00241 # if !defined(_WIN32_WCE)
00242
00243 # include <stdio.h>
00244 # endif
00245 # endif
00246
00247
00248
00249
00250
00251
00252
00253
00254 #ifndef PNGARG
00255
00256 #ifdef OF
00257 # define PNGARG(arglist) OF(arglist)
00258 #else
00259
00260 #ifdef _NO_PROTO
00261 # define PNGARG(arglist) ()
00262 # ifndef PNG_TYPECAST_NULL
00263 # define PNG_TYPECAST_NULL
00264 # endif
00265 #else
00266 # define PNGARG(arglist) arglist
00267 #endif
00268
00269 #endif
00270
00271 #endif
00272
00273
00274
00275
00276
00277 #ifndef MACOS
00278 # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
00279 defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
00280 # define MACOS
00281 # endif
00282 #endif
00283
00284
00285 #if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
00286 # include <sys/types.h>
00287 #endif
00288
00289 #if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
00290 # define PNG_SETJMP_SUPPORTED
00291 #endif
00292
00293 #ifdef PNG_SETJMP_SUPPORTED
00294
00295
00296
00297
00298 # ifdef __linux__
00299 # ifdef _BSD_SOURCE
00300 # define PNG_SAVE_BSD_SOURCE
00301 # undef _BSD_SOURCE
00302 # endif
00303 # ifdef _SETJMP_H
00304
00305
00306
00307 __png.h__ already includes setjmp.h;
00308 __dont__ include it again.;
00309 # endif
00310 # endif
00311
00312
00313 # include <setjmp.h>
00314
00315 # ifdef __linux__
00316 # ifdef PNG_SAVE_BSD_SOURCE
00317 # define _BSD_SOURCE
00318 # undef PNG_SAVE_BSD_SOURCE
00319 # endif
00320 # endif
00321 #endif
00322
00323 #ifdef BSD
00324 # include <strings.h>
00325 #else
00326 # include <string.h>
00327 #endif
00328
00329
00330 #ifdef PNG_INTERNAL
00331
00332 #include <stdlib.h>
00333
00334
00335
00336
00337
00338
00339
00340
00341 #define PNG_EXTERN
00342
00343
00344
00345
00346
00347 #if defined(PNG_FLOATING_POINT_SUPPORTED)
00348 # if defined(MACOS)
00349
00350
00351
00352
00353 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
00354 # include <fp.h>
00355 # endif
00356 # else
00357 # include <math.h>
00358 # endif
00359 # if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
00360
00361
00362
00363 # include <m68881.h>
00364 # endif
00365 #endif
00366
00367
00368 #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
00369 # define PNG_ALWAYS_EXTERN
00370 #endif
00371
00372
00373 #if defined(__TURBOC__) && defined(__MSDOS__)
00374 # include <mem.h>
00375 # include <alloc.h>
00376 #endif
00377
00378
00379 #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
00380 defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
00381 # include <malloc.h>
00382 #endif
00383
00384
00385
00386
00387
00388 #ifndef PNG_DITHER_RED_BITS
00389 # define PNG_DITHER_RED_BITS 5
00390 #endif
00391 #ifndef PNG_DITHER_GREEN_BITS
00392 # define PNG_DITHER_GREEN_BITS 5
00393 #endif
00394 #ifndef PNG_DITHER_BLUE_BITS
00395 # define PNG_DITHER_BLUE_BITS 5
00396 #endif
00397
00398
00399
00400
00401
00402
00403
00404
00405 #ifndef PNG_MAX_GAMMA_8
00406 # define PNG_MAX_GAMMA_8 11
00407 #endif
00408
00409
00410
00411
00412 #ifndef PNG_GAMMA_THRESHOLD
00413 # define PNG_GAMMA_THRESHOLD 0.05
00414 #endif
00415
00416 #endif
00417
00418
00419
00420
00421
00422
00423 #ifndef PNG_NO_CONST
00424 # define PNG_CONST const
00425 #else
00426 # define PNG_CONST
00427 #endif
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462 #ifndef PNG_iTXt_SUPPORTED
00463 # if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
00464 # define PNG_NO_READ_iTXt
00465 # endif
00466 # if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
00467 # define PNG_NO_WRITE_iTXt
00468 # endif
00469 #endif
00470
00471
00472
00473
00474
00475
00476
00477 #ifdef PNG_LEGACY_SUPPORTED
00478 # define PNG_NO_FREE_ME
00479 # define PNG_NO_READ_UNKNOWN_CHUNKS
00480 # define PNG_NO_WRITE_UNKNOWN_CHUNKS
00481 # define PNG_NO_READ_USER_CHUNKS
00482 # define PNG_NO_READ_iCCP
00483 # define PNG_NO_WRITE_iCCP
00484 # define PNG_NO_READ_iTXt
00485 # define PNG_NO_WRITE_iTXt
00486 # define PNG_NO_READ_sCAL
00487 # define PNG_NO_WRITE_sCAL
00488 # define PNG_NO_READ_sPLT
00489 # define PNG_NO_WRITE_sPLT
00490 # define PNG_NO_INFO_IMAGE
00491 # define PNG_NO_READ_RGB_TO_GRAY
00492 # define PNG_NO_READ_USER_TRANSFORM
00493 # define PNG_NO_WRITE_USER_TRANSFORM
00494 # define PNG_NO_USER_MEM
00495 # define PNG_NO_READ_EMPTY_PLTE
00496 # define PNG_NO_MNG_FEATURES
00497 # define PNG_NO_FIXED_POINT_SUPPORTED
00498 #endif
00499
00500
00501 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
00502 !defined(PNG_NO_FIXED_POINT_SUPPORTED)
00503 # define PNG_FIXED_POINT_SUPPORTED
00504 #endif
00505
00506 #ifndef PNG_NO_FREE_ME
00507 # define PNG_FREE_ME_SUPPORTED
00508 #endif
00509
00510 #if defined(PNG_READ_SUPPORTED)
00511
00512 #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
00513 !defined(PNG_NO_READ_TRANSFORMS)
00514 # define PNG_READ_TRANSFORMS_SUPPORTED
00515 #endif
00516
00517 #ifdef PNG_READ_TRANSFORMS_SUPPORTED
00518 # ifndef PNG_NO_READ_EXPAND
00519 # define PNG_READ_EXPAND_SUPPORTED
00520 # endif
00521 # ifndef PNG_NO_READ_SHIFT
00522 # define PNG_READ_SHIFT_SUPPORTED
00523 # endif
00524 # ifndef PNG_NO_READ_PACK
00525 # define PNG_READ_PACK_SUPPORTED
00526 # endif
00527 # ifndef PNG_NO_READ_BGR
00528 # define PNG_READ_BGR_SUPPORTED
00529 # endif
00530 # ifndef PNG_NO_READ_SWAP
00531 # define PNG_READ_SWAP_SUPPORTED
00532 # endif
00533 # ifndef PNG_NO_READ_PACKSWAP
00534 # define PNG_READ_PACKSWAP_SUPPORTED
00535 # endif
00536 # ifndef PNG_NO_READ_INVERT
00537 # define PNG_READ_INVERT_SUPPORTED
00538 # endif
00539 # ifndef PNG_NO_READ_DITHER
00540 # define PNG_READ_DITHER_SUPPORTED
00541 # endif
00542 # ifndef PNG_NO_READ_BACKGROUND
00543 # define PNG_READ_BACKGROUND_SUPPORTED
00544 # endif
00545 # ifndef PNG_NO_READ_16_TO_8
00546 # define PNG_READ_16_TO_8_SUPPORTED
00547 # endif
00548 # ifndef PNG_NO_READ_FILLER
00549 # define PNG_READ_FILLER_SUPPORTED
00550 # endif
00551 # ifndef PNG_NO_READ_GAMMA
00552 # define PNG_READ_GAMMA_SUPPORTED
00553 # endif
00554 # ifndef PNG_NO_READ_GRAY_TO_RGB
00555 # define PNG_READ_GRAY_TO_RGB_SUPPORTED
00556 # endif
00557 # ifndef PNG_NO_READ_SWAP_ALPHA
00558 # define PNG_READ_SWAP_ALPHA_SUPPORTED
00559 # endif
00560 # ifndef PNG_NO_READ_INVERT_ALPHA
00561 # define PNG_READ_INVERT_ALPHA_SUPPORTED
00562 # endif
00563 # ifndef PNG_NO_READ_STRIP_ALPHA
00564 # define PNG_READ_STRIP_ALPHA_SUPPORTED
00565 # endif
00566 # ifndef PNG_NO_READ_USER_TRANSFORM
00567 # define PNG_READ_USER_TRANSFORM_SUPPORTED
00568 # endif
00569 # ifndef PNG_NO_READ_RGB_TO_GRAY
00570 # define PNG_READ_RGB_TO_GRAY_SUPPORTED
00571 # endif
00572 #endif
00573
00574 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
00575 !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED)
00576 # define PNG_PROGRESSIVE_READ_SUPPORTED
00577 #endif
00578
00579
00580 #define PNG_READ_INTERLACING_SUPPORTED
00581
00582 #ifndef PNG_NO_READ_COMPOSITE_NODIV
00583 # ifndef PNG_NO_READ_COMPOSITED_NODIV
00584 # define PNG_READ_COMPOSITE_NODIV_SUPPORTED
00585 # endif
00586 #endif
00587
00588
00589
00590 #ifndef PNG_NO_READ_EMPTY_PLTE
00591 # define PNG_READ_EMPTY_PLTE_SUPPORTED
00592 #endif
00593
00594 #endif
00595
00596 #if defined(PNG_WRITE_SUPPORTED)
00597
00598 # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
00599 !defined(PNG_NO_WRITE_TRANSFORMS)
00600 # define PNG_WRITE_TRANSFORMS_SUPPORTED
00601 #endif
00602
00603 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
00604 # ifndef PNG_NO_WRITE_SHIFT
00605 # define PNG_WRITE_SHIFT_SUPPORTED
00606 # endif
00607 # ifndef PNG_NO_WRITE_PACK
00608 # define PNG_WRITE_PACK_SUPPORTED
00609 # endif
00610 # ifndef PNG_NO_WRITE_BGR
00611 # define PNG_WRITE_BGR_SUPPORTED
00612 # endif
00613 # ifndef PNG_NO_WRITE_SWAP
00614 # define PNG_WRITE_SWAP_SUPPORTED
00615 # endif
00616 # ifndef PNG_NO_WRITE_PACKSWAP
00617 # define PNG_WRITE_PACKSWAP_SUPPORTED
00618 # endif
00619 # ifndef PNG_NO_WRITE_INVERT
00620 # define PNG_WRITE_INVERT_SUPPORTED
00621 # endif
00622 # ifndef PNG_NO_WRITE_FILLER
00623 # define PNG_WRITE_FILLER_SUPPORTED
00624 # endif
00625 # ifndef PNG_NO_WRITE_SWAP_ALPHA
00626 # define PNG_WRITE_SWAP_ALPHA_SUPPORTED
00627 # endif
00628 # ifndef PNG_NO_WRITE_INVERT_ALPHA
00629 # define PNG_WRITE_INVERT_ALPHA_SUPPORTED
00630 # endif
00631 # ifndef PNG_NO_WRITE_USER_TRANSFORM
00632 # define PNG_WRITE_USER_TRANSFORM_SUPPORTED
00633 # endif
00634 #endif
00635
00636 #define PNG_WRITE_INTERLACING_SUPPORTED
00637
00638
00639
00640 #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
00641 defined(PNG_FLOATING_POINT_SUPPORTED)
00642 # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
00643 #endif
00644
00645 #ifndef PNG_NO_WRITE_FLUSH
00646 # define PNG_WRITE_FLUSH_SUPPORTED
00647 #endif
00648
00649
00650 #ifndef PNG_NO_WRITE_EMPTY_PLTE
00651 # define PNG_WRITE_EMPTY_PLTE_SUPPORTED
00652 #endif
00653
00654 #endif
00655
00656 #ifndef PNG_1_0_X
00657 # ifndef PNG_NO_ERROR_NUMBERS
00658 # define PNG_ERROR_NUMBERS_SUPPORTED
00659 # endif
00660 #endif
00661
00662 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
00663 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
00664 # ifndef PNG_NO_USER_TRANSFORM_PTR
00665 # define PNG_USER_TRANSFORM_PTR_SUPPORTED
00666 # endif
00667 #endif
00668
00669 #ifndef PNG_NO_STDIO
00670 # define PNG_TIME_RFC1123_SUPPORTED
00671 #endif
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
00690 # define PNG_EASY_ACCESS_SUPPORTED
00691 #endif
00692
00693
00694
00695 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
00696 # ifndef PNG_ASSEMBLER_CODE_SUPPORTED
00697 # define PNG_ASSEMBLER_CODE_SUPPORTED
00698 # endif
00699 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00700 # define PNG_MMX_CODE_SUPPORTED
00701 # endif
00702 #endif
00703
00704
00705
00706
00707
00708
00709
00710 #if !defined(PNG_1_0_X)
00711 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
00712 # define PNG_USER_MEM_SUPPORTED
00713 #endif
00714 #endif
00715
00716
00717 #if !defined(PNG_1_0_X)
00718 #ifndef PNG_SET_USER_LIMITS_SUPPORTED
00719 #if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)
00720 # define PNG_SET_USER_LIMITS_SUPPORTED
00721 #endif
00722 #endif
00723 #endif
00724
00725
00726
00727
00728 #ifndef PNG_USER_WIDTH_MAX
00729 # define PNG_USER_WIDTH_MAX 1000000L
00730 #endif
00731 #ifndef PNG_USER_HEIGHT_MAX
00732 # define PNG_USER_HEIGHT_MAX 1000000L
00733 #endif
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771 #if defined(PNG_READ_SUPPORTED) && \
00772 !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00773 !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
00774 # define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00775 #endif
00776
00777 #if defined(PNG_WRITE_SUPPORTED) && \
00778 !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00779 !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
00780 # define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00781 #endif
00782
00783 #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00784
00785 #ifdef PNG_NO_READ_TEXT
00786 # define PNG_NO_READ_iTXt
00787 # define PNG_NO_READ_tEXt
00788 # define PNG_NO_READ_zTXt
00789 #endif
00790 #ifndef PNG_NO_READ_bKGD
00791 # define PNG_READ_bKGD_SUPPORTED
00792 # define PNG_bKGD_SUPPORTED
00793 #endif
00794 #ifndef PNG_NO_READ_cHRM
00795 # define PNG_READ_cHRM_SUPPORTED
00796 # define PNG_cHRM_SUPPORTED
00797 #endif
00798 #ifndef PNG_NO_READ_gAMA
00799 # define PNG_READ_gAMA_SUPPORTED
00800 # define PNG_gAMA_SUPPORTED
00801 #endif
00802 #ifndef PNG_NO_READ_hIST
00803 # define PNG_READ_hIST_SUPPORTED
00804 # define PNG_hIST_SUPPORTED
00805 #endif
00806 #ifndef PNG_NO_READ_iCCP
00807 # define PNG_READ_iCCP_SUPPORTED
00808 # define PNG_iCCP_SUPPORTED
00809 #endif
00810 #ifndef PNG_NO_READ_iTXt
00811 # ifndef PNG_READ_iTXt_SUPPORTED
00812 # define PNG_READ_iTXt_SUPPORTED
00813 # endif
00814 # ifndef PNG_iTXt_SUPPORTED
00815 # define PNG_iTXt_SUPPORTED
00816 # endif
00817 #endif
00818 #ifndef PNG_NO_READ_oFFs
00819 # define PNG_READ_oFFs_SUPPORTED
00820 # define PNG_oFFs_SUPPORTED
00821 #endif
00822 #ifndef PNG_NO_READ_pCAL
00823 # define PNG_READ_pCAL_SUPPORTED
00824 # define PNG_pCAL_SUPPORTED
00825 #endif
00826 #ifndef PNG_NO_READ_sCAL
00827 # define PNG_READ_sCAL_SUPPORTED
00828 # define PNG_sCAL_SUPPORTED
00829 #endif
00830 #ifndef PNG_NO_READ_pHYs
00831 # define PNG_READ_pHYs_SUPPORTED
00832 # define PNG_pHYs_SUPPORTED
00833 #endif
00834 #ifndef PNG_NO_READ_sBIT
00835 # define PNG_READ_sBIT_SUPPORTED
00836 # define PNG_sBIT_SUPPORTED
00837 #endif
00838 #ifndef PNG_NO_READ_sPLT
00839 # define PNG_READ_sPLT_SUPPORTED
00840 # define PNG_sPLT_SUPPORTED
00841 #endif
00842 #ifndef PNG_NO_READ_sRGB
00843 # define PNG_READ_sRGB_SUPPORTED
00844 # define PNG_sRGB_SUPPORTED
00845 #endif
00846 #ifndef PNG_NO_READ_tEXt
00847 # define PNG_READ_tEXt_SUPPORTED
00848 # define PNG_tEXt_SUPPORTED
00849 #endif
00850 #ifndef PNG_NO_READ_tIME
00851 # define PNG_READ_tIME_SUPPORTED
00852 # define PNG_tIME_SUPPORTED
00853 #endif
00854 #ifndef PNG_NO_READ_tRNS
00855 # define PNG_READ_tRNS_SUPPORTED
00856 # define PNG_tRNS_SUPPORTED
00857 #endif
00858 #ifndef PNG_NO_READ_zTXt
00859 # define PNG_READ_zTXt_SUPPORTED
00860 # define PNG_zTXt_SUPPORTED
00861 #endif
00862 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
00863 # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
00864 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
00865 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
00866 # endif
00867 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
00868 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
00869 # endif
00870 #endif
00871 #if !defined(PNG_NO_READ_USER_CHUNKS) && \
00872 defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
00873 # define PNG_READ_USER_CHUNKS_SUPPORTED
00874 # define PNG_USER_CHUNKS_SUPPORTED
00875 # ifdef PNG_NO_READ_UNKNOWN_CHUNKS
00876 # undef PNG_NO_READ_UNKNOWN_CHUNKS
00877 # endif
00878 # ifdef PNG_NO_HANDLE_AS_UNKNOWN
00879 # undef PNG_NO_HANDLE_AS_UNKNOWN
00880 # endif
00881 #endif
00882 #ifndef PNG_NO_READ_OPT_PLTE
00883 # define PNG_READ_OPT_PLTE_SUPPORTED
00884 #endif
00885 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
00886 defined(PNG_READ_zTXt_SUPPORTED)
00887 # define PNG_READ_TEXT_SUPPORTED
00888 # define PNG_TEXT_SUPPORTED
00889 #endif
00890
00891 #endif
00892
00893 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00894
00895 #ifdef PNG_NO_WRITE_TEXT
00896 # define PNG_NO_WRITE_iTXt
00897 # define PNG_NO_WRITE_tEXt
00898 # define PNG_NO_WRITE_zTXt
00899 #endif
00900 #ifndef PNG_NO_WRITE_bKGD
00901 # define PNG_WRITE_bKGD_SUPPORTED
00902 # ifndef PNG_bKGD_SUPPORTED
00903 # define PNG_bKGD_SUPPORTED
00904 # endif
00905 #endif
00906 #ifndef PNG_NO_WRITE_cHRM
00907 # define PNG_WRITE_cHRM_SUPPORTED
00908 # ifndef PNG_cHRM_SUPPORTED
00909 # define PNG_cHRM_SUPPORTED
00910 # endif
00911 #endif
00912 #ifndef PNG_NO_WRITE_gAMA
00913 # define PNG_WRITE_gAMA_SUPPORTED
00914 # ifndef PNG_gAMA_SUPPORTED
00915 # define PNG_gAMA_SUPPORTED
00916 # endif
00917 #endif
00918 #ifndef PNG_NO_WRITE_hIST
00919 # define PNG_WRITE_hIST_SUPPORTED
00920 # ifndef PNG_hIST_SUPPORTED
00921 # define PNG_hIST_SUPPORTED
00922 # endif
00923 #endif
00924 #ifndef PNG_NO_WRITE_iCCP
00925 # define PNG_WRITE_iCCP_SUPPORTED
00926 # ifndef PNG_iCCP_SUPPORTED
00927 # define PNG_iCCP_SUPPORTED
00928 # endif
00929 #endif
00930 #ifndef PNG_NO_WRITE_iTXt
00931 # ifndef PNG_WRITE_iTXt_SUPPORTED
00932 # define PNG_WRITE_iTXt_SUPPORTED
00933 # endif
00934 # ifndef PNG_iTXt_SUPPORTED
00935 # define PNG_iTXt_SUPPORTED
00936 # endif
00937 #endif
00938 #ifndef PNG_NO_WRITE_oFFs
00939 # define PNG_WRITE_oFFs_SUPPORTED
00940 # ifndef PNG_oFFs_SUPPORTED
00941 # define PNG_oFFs_SUPPORTED
00942 # endif
00943 #endif
00944 #ifndef PNG_NO_WRITE_pCAL
00945 # define PNG_WRITE_pCAL_SUPPORTED
00946 # ifndef PNG_pCAL_SUPPORTED
00947 # define PNG_pCAL_SUPPORTED
00948 # endif
00949 #endif
00950 #ifndef PNG_NO_WRITE_sCAL
00951 # define PNG_WRITE_sCAL_SUPPORTED
00952 # ifndef PNG_sCAL_SUPPORTED
00953 # define PNG_sCAL_SUPPORTED
00954 # endif
00955 #endif
00956 #ifndef PNG_NO_WRITE_pHYs
00957 # define PNG_WRITE_pHYs_SUPPORTED
00958 # ifndef PNG_pHYs_SUPPORTED
00959 # define PNG_pHYs_SUPPORTED
00960 # endif
00961 #endif
00962 #ifndef PNG_NO_WRITE_sBIT
00963 # define PNG_WRITE_sBIT_SUPPORTED
00964 # ifndef PNG_sBIT_SUPPORTED
00965 # define PNG_sBIT_SUPPORTED
00966 # endif
00967 #endif
00968 #ifndef PNG_NO_WRITE_sPLT
00969 # define PNG_WRITE_sPLT_SUPPORTED
00970 # ifndef PNG_sPLT_SUPPORTED
00971 # define PNG_sPLT_SUPPORTED
00972 # endif
00973 #endif
00974 #ifndef PNG_NO_WRITE_sRGB
00975 # define PNG_WRITE_sRGB_SUPPORTED
00976 # ifndef PNG_sRGB_SUPPORTED
00977 # define PNG_sRGB_SUPPORTED
00978 # endif
00979 #endif
00980 #ifndef PNG_NO_WRITE_tEXt
00981 # define PNG_WRITE_tEXt_SUPPORTED
00982 # ifndef PNG_tEXt_SUPPORTED
00983 # define PNG_tEXt_SUPPORTED
00984 # endif
00985 #endif
00986 #ifndef PNG_NO_WRITE_tIME
00987 # define PNG_WRITE_tIME_SUPPORTED
00988 # ifndef PNG_tIME_SUPPORTED
00989 # define PNG_tIME_SUPPORTED
00990 # endif
00991 #endif
00992 #ifndef PNG_NO_WRITE_tRNS
00993 # define PNG_WRITE_tRNS_SUPPORTED
00994 # ifndef PNG_tRNS_SUPPORTED
00995 # define PNG_tRNS_SUPPORTED
00996 # endif
00997 #endif
00998 #ifndef PNG_NO_WRITE_zTXt
00999 # define PNG_WRITE_zTXt_SUPPORTED
01000 # ifndef PNG_zTXt_SUPPORTED
01001 # define PNG_zTXt_SUPPORTED
01002 # endif
01003 #endif
01004 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
01005 # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
01006 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
01007 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
01008 # endif
01009 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
01010 # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
01011 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
01012 # endif
01013 # endif
01014 #endif
01015 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
01016 defined(PNG_WRITE_zTXt_SUPPORTED)
01017 # define PNG_WRITE_TEXT_SUPPORTED
01018 # ifndef PNG_TEXT_SUPPORTED
01019 # define PNG_TEXT_SUPPORTED
01020 # endif
01021 #endif
01022
01023 #endif
01024
01025
01026
01027
01028
01029 #ifndef PNG_NO_INFO_IMAGE
01030 # define PNG_INFO_IMAGE_SUPPORTED
01031 #endif
01032
01033
01034 #if defined(PNG_tIME_SUPPORTED)
01035 # if !defined(_WIN32_WCE)
01036
01037 # include <time.h>
01038 # endif
01039 #endif
01040
01041
01042
01043
01044
01045
01046
01047
01048
01049
01050 typedef unsigned long png_uint_32;
01051 typedef long png_int_32;
01052 typedef unsigned short png_uint_16;
01053 typedef short png_int_16;
01054 typedef unsigned char png_byte;
01055
01056
01057
01058 #ifdef PNG_SIZE_T
01059 typedef PNG_SIZE_T png_size_t;
01060 # define png_sizeof(x) png_convert_size(sizeof (x))
01061 #else
01062 typedef size_t png_size_t;
01063 # define png_sizeof(x) sizeof (x)
01064 #endif
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077 #ifdef __BORLANDC__
01078 # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
01079 # define LDATA 1
01080 # else
01081 # define LDATA 0
01082 # endif
01083
01084 # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
01085 # define PNG_MAX_MALLOC_64K
01086 # if (LDATA != 1)
01087 # ifndef FAR
01088 # define FAR __far
01089 # endif
01090 # define USE_FAR_KEYWORD
01091 # endif
01092
01093
01094
01095
01096
01097 # endif
01098 #endif
01099
01100
01101
01102
01103
01104
01105
01106
01107 #if defined(FAR)
01108 # if defined(M_I86MM)
01109 # define USE_FAR_KEYWORD
01110 # define FARDATA FAR
01111 # include <dos.h>
01112 # endif
01113 #endif
01114
01115
01116 #ifndef FAR
01117 # define FAR
01118 #endif
01119
01120
01121 #ifndef FARDATA
01122 # define FARDATA
01123 #endif
01124
01125
01126
01127 typedef png_int_32 png_fixed_point;
01128
01129
01130 typedef void FAR * png_voidp;
01131 typedef png_byte FAR * png_bytep;
01132 typedef png_uint_32 FAR * png_uint_32p;
01133 typedef png_int_32 FAR * png_int_32p;
01134 typedef png_uint_16 FAR * png_uint_16p;
01135 typedef png_int_16 FAR * png_int_16p;
01136 typedef PNG_CONST char FAR * png_const_charp;
01137 typedef char FAR * png_charp;
01138 typedef png_fixed_point FAR * png_fixed_point_p;
01139
01140 #ifndef PNG_NO_STDIO
01141 #if defined(_WIN32_WCE)
01142 typedef HANDLE png_FILE_p;
01143 #else
01144 typedef FILE * png_FILE_p;
01145 #endif
01146 #endif
01147
01148 #ifdef PNG_FLOATING_POINT_SUPPORTED
01149 typedef double FAR * png_doublep;
01150 #endif
01151
01152
01153 typedef png_byte FAR * FAR * png_bytepp;
01154 typedef png_uint_32 FAR * FAR * png_uint_32pp;
01155 typedef png_int_32 FAR * FAR * png_int_32pp;
01156 typedef png_uint_16 FAR * FAR * png_uint_16pp;
01157 typedef png_int_16 FAR * FAR * png_int_16pp;
01158 typedef PNG_CONST char FAR * FAR * png_const_charpp;
01159 typedef char FAR * FAR * png_charpp;
01160 typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
01161 #ifdef PNG_FLOATING_POINT_SUPPORTED
01162 typedef double FAR * FAR * png_doublepp;
01163 #endif
01164
01165
01166 typedef char FAR * FAR * FAR * png_charppp;
01167
01168 #if defined(PNG_1_0_X) || defined(PNG_1_2_X)
01169
01170
01171
01172
01173
01174
01175 typedef charf * png_zcharp;
01176 typedef charf * FAR * png_zcharpp;
01177 typedef z_stream FAR * png_zstreamp;
01178 #endif
01179
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189
01190
01191
01192
01193
01194
01195
01196
01197
01198 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
01199 # define PNG_DLL
01200 #endif
01201
01202
01203
01204
01205 #if defined(__CYGWIN__)
01206 # if !defined(PNG_STATIC)
01207 # if defined(PNG_USE_GLOBAL_ARRAYS)
01208 # undef PNG_USE_GLOBAL_ARRAYS
01209 # endif
01210 # if !defined(PNG_USE_LOCAL_ARRAYS)
01211 # define PNG_USE_LOCAL_ARRAYS
01212 # endif
01213 # else
01214 # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
01215 # if defined(PNG_USE_GLOBAL_ARRAYS)
01216 # undef PNG_USE_GLOBAL_ARRAYS
01217 # endif
01218 # endif
01219 # endif
01220 # if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01221 # define PNG_USE_LOCAL_ARRAYS
01222 # endif
01223 #endif
01224
01225
01226
01227
01228
01229 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01230 # if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL))
01231 # define PNG_USE_LOCAL_ARRAYS
01232 # else
01233 # define PNG_USE_GLOBAL_ARRAYS
01234 # endif
01235 #endif
01236
01237 #if defined(__CYGWIN__)
01238 # undef PNGAPI
01239 # define PNGAPI __cdecl
01240 # undef PNG_IMPEXP
01241 # define PNG_IMPEXP
01242 #endif
01243
01244
01245
01246
01247
01248
01249
01250
01251 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
01252 # ifndef PNG_NO_MODULEDEF
01253 # define PNG_NO_MODULEDEF
01254 # endif
01255 #endif
01256
01257 #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
01258 # define PNG_IMPEXP
01259 #endif
01260
01261 #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
01262 (( defined(_Windows) || defined(_WINDOWS) || \
01263 defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
01264
01265 # ifndef PNGAPI
01266 # if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
01267 # define PNGAPI __cdecl
01268 # else
01269 # define PNGAPI _cdecl
01270 # endif
01271 # endif
01272
01273 # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
01274 0 )
01275 # define PNG_IMPEXP
01276 # endif
01277
01278 # if !defined(PNG_IMPEXP)
01279
01280 # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
01281 # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
01282
01283
01284 # if defined(_MSC_VER) || defined(__BORLANDC__)
01285 # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
01286 # define PNG_EXPORT PNG_EXPORT_TYPE1
01287 # else
01288 # define PNG_EXPORT PNG_EXPORT_TYPE2
01289 # if defined(PNG_BUILD_DLL)
01290 # define PNG_IMPEXP __export
01291 # else
01292 # define PNG_IMPEXP
01293
01294 # endif
01295
01296 # endif
01297 # endif
01298
01299 # if !defined(PNG_IMPEXP)
01300 # if defined(PNG_BUILD_DLL)
01301 # define PNG_IMPEXP __declspec(dllexport)
01302 # else
01303 # define PNG_IMPEXP __declspec(dllimport)
01304 # endif
01305 # endif
01306 # endif
01307 #else
01308 # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
01309 # ifndef PNGAPI
01310 # define PNGAPI _System
01311 # endif
01312 # else
01313 # if 0
01314 # endif
01315 # endif
01316 #endif
01317
01318 #ifndef PNGAPI
01319 # define PNGAPI
01320 #endif
01321 #ifndef PNG_IMPEXP
01322 # define PNG_IMPEXP
01323 #endif
01324
01325 #ifdef PNG_BUILDSYMS
01326 # ifndef PNG_EXPORT
01327 # define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
01328 # endif
01329 # ifdef PNG_USE_GLOBAL_ARRAYS
01330 # ifndef PNG_EXPORT_VAR
01331 # define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
01332 # endif
01333 # endif
01334 #endif
01335
01336 #ifndef PNG_EXPORT
01337 # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
01338 #endif
01339
01340 #ifdef PNG_USE_GLOBAL_ARRAYS
01341 # ifndef PNG_EXPORT_VAR
01342 # define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
01343 # endif
01344 #endif
01345
01346
01347
01348
01349
01350 #ifndef PNG_ABORT
01351 # define PNG_ABORT() abort()
01352 #endif
01353
01354 #ifdef PNG_SETJMP_SUPPORTED
01355 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
01356 #else
01357 # define png_jmpbuf(png_ptr) \
01358 (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
01359 #endif
01360
01361 #if defined(USE_FAR_KEYWORD)
01362
01363 # define CHECK 1
01364 # define NOCHECK 0
01365 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
01366 # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
01367 # define png_strcpy _fstrcpy
01368 # define png_strncpy _fstrncpy
01369 # define png_strlen _fstrlen
01370 # define png_memcmp _fmemcmp
01371 # define png_memcpy _fmemcpy
01372 # define png_memset _fmemset
01373 #else
01374 # define CVT_PTR(ptr) (ptr)
01375 # define CVT_PTR_NOCHECK(ptr) (ptr)
01376 # define png_strcpy strcpy
01377 # define png_strncpy strncpy
01378 # define png_strlen strlen
01379 # define png_memcmp memcmp
01380 # define png_memcpy memcpy
01381 # define png_memset memset
01382 #endif
01383
01384
01385
01386
01387
01388 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
01389 # undef PNG_ZBUF_SIZE
01390 # define PNG_ZBUF_SIZE 65536L
01391 #endif
01392
01393 #ifdef PNG_READ_SUPPORTED
01394
01395 #if defined(PNG_INTERNAL)
01396
01397
01398
01399
01400
01401
01402
01403 #ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
01404 # define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128
01405 #endif
01406 #ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
01407 # define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9
01408 #endif
01409
01410
01411
01412
01413
01414 #ifdef PNG_USE_PNGVCRD
01415 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
01416 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
01417 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
01418 #endif
01419
01420
01421
01422
01423
01424 #ifdef PNG_USE_PNGGCCRD
01425 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
01426 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
01427 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
01428 #endif
01429
01430
01431 #endif
01432 #endif
01433
01434
01435 #endif
01436
01437 #endif