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 #if 0
00308 __png.h__ already includes setjmp.h;
00309 __dont__ include it again.;
00310 #endif
00311 # endif
00312 # endif
00313
00314
00315 # include <setjmp.h>
00316
00317 # ifdef __linux__
00318 # ifdef PNG_SAVE_BSD_SOURCE
00319 # define _BSD_SOURCE
00320 # undef PNG_SAVE_BSD_SOURCE
00321 # endif
00322 # endif
00323 #endif
00324
00325 #ifdef BSD
00326 # include <strings.h>
00327 #else
00328 # include <string.h>
00329 #endif
00330
00331
00332 #ifdef PNG_INTERNAL
00333
00334 #include <stdlib.h>
00335
00336
00337
00338
00339
00340
00341
00342
00343 #define PNG_EXTERN
00344
00345
00346
00347
00348
00349 #if defined(PNG_FLOATING_POINT_SUPPORTED)
00350 # if defined(MACOS)
00351
00352
00353
00354
00355 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
00356 # include <fp.h>
00357 # endif
00358 # else
00359 # include <math.h>
00360 # endif
00361 # if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
00362
00363
00364
00365 # include <m68881.h>
00366 # endif
00367 #endif
00368
00369
00370 #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
00371 # define PNG_ALWAYS_EXTERN
00372 #endif
00373
00374
00375 #if defined(__TURBOC__) && defined(__MSDOS__)
00376 # include <mem.h>
00377 # include <alloc.h>
00378 #endif
00379
00380
00381 #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
00382 defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
00383 # include <malloc.h>
00384 #endif
00385
00386
00387
00388
00389
00390 #ifndef PNG_DITHER_RED_BITS
00391 # define PNG_DITHER_RED_BITS 5
00392 #endif
00393 #ifndef PNG_DITHER_GREEN_BITS
00394 # define PNG_DITHER_GREEN_BITS 5
00395 #endif
00396 #ifndef PNG_DITHER_BLUE_BITS
00397 # define PNG_DITHER_BLUE_BITS 5
00398 #endif
00399
00400
00401
00402
00403
00404
00405
00406
00407 #ifndef PNG_MAX_GAMMA_8
00408 # define PNG_MAX_GAMMA_8 11
00409 #endif
00410
00411
00412
00413
00414 #ifndef PNG_GAMMA_THRESHOLD
00415 # define PNG_GAMMA_THRESHOLD 0.05
00416 #endif
00417
00418 #endif
00419
00420
00421
00422
00423
00424
00425 #ifndef PNG_NO_CONST
00426 # define PNG_CONST const
00427 #else
00428 # define PNG_CONST
00429 #endif
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
00463
00464 #ifndef PNG_iTXt_SUPPORTED
00465 # if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
00466 # define PNG_NO_READ_iTXt
00467 # endif
00468 # if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
00469 # define PNG_NO_WRITE_iTXt
00470 # endif
00471 #endif
00472
00473
00474
00475
00476
00477
00478
00479 #ifdef PNG_LEGACY_SUPPORTED
00480 # define PNG_NO_FREE_ME
00481 # define PNG_NO_READ_UNKNOWN_CHUNKS
00482 # define PNG_NO_WRITE_UNKNOWN_CHUNKS
00483 # define PNG_NO_READ_USER_CHUNKS
00484 # define PNG_NO_READ_iCCP
00485 # define PNG_NO_WRITE_iCCP
00486 # define PNG_NO_READ_iTXt
00487 # define PNG_NO_WRITE_iTXt
00488 # define PNG_NO_READ_sCAL
00489 # define PNG_NO_WRITE_sCAL
00490 # define PNG_NO_READ_sPLT
00491 # define PNG_NO_WRITE_sPLT
00492 # define PNG_NO_INFO_IMAGE
00493 # define PNG_NO_READ_RGB_TO_GRAY
00494 # define PNG_NO_READ_USER_TRANSFORM
00495 # define PNG_NO_WRITE_USER_TRANSFORM
00496 # define PNG_NO_USER_MEM
00497 # define PNG_NO_READ_EMPTY_PLTE
00498 # define PNG_NO_MNG_FEATURES
00499 # define PNG_NO_FIXED_POINT_SUPPORTED
00500 #endif
00501
00502
00503 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
00504 !defined(PNG_NO_FIXED_POINT_SUPPORTED)
00505 # define PNG_FIXED_POINT_SUPPORTED
00506 #endif
00507
00508 #ifndef PNG_NO_FREE_ME
00509 # define PNG_FREE_ME_SUPPORTED
00510 #endif
00511
00512 #if defined(PNG_READ_SUPPORTED)
00513
00514 #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
00515 !defined(PNG_NO_READ_TRANSFORMS)
00516 # define PNG_READ_TRANSFORMS_SUPPORTED
00517 #endif
00518
00519 #ifdef PNG_READ_TRANSFORMS_SUPPORTED
00520 # ifndef PNG_NO_READ_EXPAND
00521 # define PNG_READ_EXPAND_SUPPORTED
00522 # endif
00523 # ifndef PNG_NO_READ_SHIFT
00524 # define PNG_READ_SHIFT_SUPPORTED
00525 # endif
00526 # ifndef PNG_NO_READ_PACK
00527 # define PNG_READ_PACK_SUPPORTED
00528 # endif
00529 # ifndef PNG_NO_READ_BGR
00530 # define PNG_READ_BGR_SUPPORTED
00531 # endif
00532 # ifndef PNG_NO_READ_SWAP
00533 # define PNG_READ_SWAP_SUPPORTED
00534 # endif
00535 # ifndef PNG_NO_READ_PACKSWAP
00536 # define PNG_READ_PACKSWAP_SUPPORTED
00537 # endif
00538 # ifndef PNG_NO_READ_INVERT
00539 # define PNG_READ_INVERT_SUPPORTED
00540 # endif
00541 # ifndef PNG_NO_READ_DITHER
00542 # define PNG_READ_DITHER_SUPPORTED
00543 # endif
00544 # ifndef PNG_NO_READ_BACKGROUND
00545 # define PNG_READ_BACKGROUND_SUPPORTED
00546 # endif
00547 # ifndef PNG_NO_READ_16_TO_8
00548 # define PNG_READ_16_TO_8_SUPPORTED
00549 # endif
00550 # ifndef PNG_NO_READ_FILLER
00551 # define PNG_READ_FILLER_SUPPORTED
00552 # endif
00553 # ifndef PNG_NO_READ_GAMMA
00554 # define PNG_READ_GAMMA_SUPPORTED
00555 # endif
00556 # ifndef PNG_NO_READ_GRAY_TO_RGB
00557 # define PNG_READ_GRAY_TO_RGB_SUPPORTED
00558 # endif
00559 # ifndef PNG_NO_READ_SWAP_ALPHA
00560 # define PNG_READ_SWAP_ALPHA_SUPPORTED
00561 # endif
00562 # ifndef PNG_NO_READ_INVERT_ALPHA
00563 # define PNG_READ_INVERT_ALPHA_SUPPORTED
00564 # endif
00565 # ifndef PNG_NO_READ_STRIP_ALPHA
00566 # define PNG_READ_STRIP_ALPHA_SUPPORTED
00567 # endif
00568 # ifndef PNG_NO_READ_USER_TRANSFORM
00569 # define PNG_READ_USER_TRANSFORM_SUPPORTED
00570 # endif
00571 # ifndef PNG_NO_READ_RGB_TO_GRAY
00572 # define PNG_READ_RGB_TO_GRAY_SUPPORTED
00573 # endif
00574 #endif
00575
00576 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
00577 !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED)
00578 # define PNG_PROGRESSIVE_READ_SUPPORTED
00579 #endif
00580
00581
00582 #define PNG_READ_INTERLACING_SUPPORTED
00583
00584 #ifndef PNG_NO_READ_COMPOSITE_NODIV
00585 # ifndef PNG_NO_READ_COMPOSITED_NODIV
00586 # define PNG_READ_COMPOSITE_NODIV_SUPPORTED
00587 # endif
00588 #endif
00589
00590
00591
00592 #ifndef PNG_NO_READ_EMPTY_PLTE
00593 # define PNG_READ_EMPTY_PLTE_SUPPORTED
00594 #endif
00595
00596 #endif
00597
00598 #if defined(PNG_WRITE_SUPPORTED)
00599
00600 # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
00601 !defined(PNG_NO_WRITE_TRANSFORMS)
00602 # define PNG_WRITE_TRANSFORMS_SUPPORTED
00603 #endif
00604
00605 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
00606 # ifndef PNG_NO_WRITE_SHIFT
00607 # define PNG_WRITE_SHIFT_SUPPORTED
00608 # endif
00609 # ifndef PNG_NO_WRITE_PACK
00610 # define PNG_WRITE_PACK_SUPPORTED
00611 # endif
00612 # ifndef PNG_NO_WRITE_BGR
00613 # define PNG_WRITE_BGR_SUPPORTED
00614 # endif
00615 # ifndef PNG_NO_WRITE_SWAP
00616 # define PNG_WRITE_SWAP_SUPPORTED
00617 # endif
00618 # ifndef PNG_NO_WRITE_PACKSWAP
00619 # define PNG_WRITE_PACKSWAP_SUPPORTED
00620 # endif
00621 # ifndef PNG_NO_WRITE_INVERT
00622 # define PNG_WRITE_INVERT_SUPPORTED
00623 # endif
00624 # ifndef PNG_NO_WRITE_FILLER
00625 # define PNG_WRITE_FILLER_SUPPORTED
00626 # endif
00627 # ifndef PNG_NO_WRITE_SWAP_ALPHA
00628 # define PNG_WRITE_SWAP_ALPHA_SUPPORTED
00629 # endif
00630 # ifndef PNG_NO_WRITE_INVERT_ALPHA
00631 # define PNG_WRITE_INVERT_ALPHA_SUPPORTED
00632 # endif
00633 # ifndef PNG_NO_WRITE_USER_TRANSFORM
00634 # define PNG_WRITE_USER_TRANSFORM_SUPPORTED
00635 # endif
00636 #endif
00637
00638 #define PNG_WRITE_INTERLACING_SUPPORTED
00639
00640
00641
00642 #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
00643 defined(PNG_FLOATING_POINT_SUPPORTED)
00644 # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
00645 #endif
00646
00647 #ifndef PNG_NO_WRITE_FLUSH
00648 # define PNG_WRITE_FLUSH_SUPPORTED
00649 #endif
00650
00651
00652 #ifndef PNG_NO_WRITE_EMPTY_PLTE
00653 # define PNG_WRITE_EMPTY_PLTE_SUPPORTED
00654 #endif
00655
00656 #endif
00657
00658 #ifndef PNG_1_0_X
00659 # ifndef PNG_NO_ERROR_NUMBERS
00660 # define PNG_ERROR_NUMBERS_SUPPORTED
00661 # endif
00662 #endif
00663
00664 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
00665 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
00666 # ifndef PNG_NO_USER_TRANSFORM_PTR
00667 # define PNG_USER_TRANSFORM_PTR_SUPPORTED
00668 # endif
00669 #endif
00670
00671 #ifndef PNG_NO_STDIO
00672 # define PNG_TIME_RFC1123_SUPPORTED
00673 #endif
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
00692 # define PNG_EASY_ACCESS_SUPPORTED
00693 #endif
00694
00695
00696
00697 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
00698 # ifndef PNG_ASSEMBLER_CODE_SUPPORTED
00699 # define PNG_ASSEMBLER_CODE_SUPPORTED
00700 # endif
00701 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00702 # define PNG_MMX_CODE_SUPPORTED
00703 # endif
00704 #endif
00705
00706
00707
00708
00709
00710
00711
00712 #if !defined(PNG_1_0_X)
00713 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
00714 # define PNG_USER_MEM_SUPPORTED
00715 #endif
00716 #endif
00717
00718
00719 #if !defined(PNG_1_0_X)
00720 #ifndef PNG_SET_USER_LIMITS_SUPPORTED
00721 #if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)
00722 # define PNG_SET_USER_LIMITS_SUPPORTED
00723 #endif
00724 #endif
00725 #endif
00726
00727
00728
00729
00730 #ifndef PNG_USER_WIDTH_MAX
00731 # define PNG_USER_WIDTH_MAX 1000000L
00732 #endif
00733 #ifndef PNG_USER_HEIGHT_MAX
00734 # define PNG_USER_HEIGHT_MAX 1000000L
00735 #endif
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
00772
00773 #if defined(PNG_READ_SUPPORTED) && \
00774 !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00775 !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
00776 # define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00777 #endif
00778
00779 #if defined(PNG_WRITE_SUPPORTED) && \
00780 !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00781 !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
00782 # define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00783 #endif
00784
00785 #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00786
00787 #ifdef PNG_NO_READ_TEXT
00788 # define PNG_NO_READ_iTXt
00789 # define PNG_NO_READ_tEXt
00790 # define PNG_NO_READ_zTXt
00791 #endif
00792 #ifndef PNG_NO_READ_bKGD
00793 # define PNG_READ_bKGD_SUPPORTED
00794 # define PNG_bKGD_SUPPORTED
00795 #endif
00796 #ifndef PNG_NO_READ_cHRM
00797 # define PNG_READ_cHRM_SUPPORTED
00798 # define PNG_cHRM_SUPPORTED
00799 #endif
00800 #ifndef PNG_NO_READ_gAMA
00801 # define PNG_READ_gAMA_SUPPORTED
00802 # define PNG_gAMA_SUPPORTED
00803 #endif
00804 #ifndef PNG_NO_READ_hIST
00805 # define PNG_READ_hIST_SUPPORTED
00806 # define PNG_hIST_SUPPORTED
00807 #endif
00808 #ifndef PNG_NO_READ_iCCP
00809 # define PNG_READ_iCCP_SUPPORTED
00810 # define PNG_iCCP_SUPPORTED
00811 #endif
00812 #ifndef PNG_NO_READ_iTXt
00813 # ifndef PNG_READ_iTXt_SUPPORTED
00814 # define PNG_READ_iTXt_SUPPORTED
00815 # endif
00816 # ifndef PNG_iTXt_SUPPORTED
00817 # define PNG_iTXt_SUPPORTED
00818 # endif
00819 #endif
00820 #ifndef PNG_NO_READ_oFFs
00821 # define PNG_READ_oFFs_SUPPORTED
00822 # define PNG_oFFs_SUPPORTED
00823 #endif
00824 #ifndef PNG_NO_READ_pCAL
00825 # define PNG_READ_pCAL_SUPPORTED
00826 # define PNG_pCAL_SUPPORTED
00827 #endif
00828 #ifndef PNG_NO_READ_sCAL
00829 # define PNG_READ_sCAL_SUPPORTED
00830 # define PNG_sCAL_SUPPORTED
00831 #endif
00832 #ifndef PNG_NO_READ_pHYs
00833 # define PNG_READ_pHYs_SUPPORTED
00834 # define PNG_pHYs_SUPPORTED
00835 #endif
00836 #ifndef PNG_NO_READ_sBIT
00837 # define PNG_READ_sBIT_SUPPORTED
00838 # define PNG_sBIT_SUPPORTED
00839 #endif
00840 #ifndef PNG_NO_READ_sPLT
00841 # define PNG_READ_sPLT_SUPPORTED
00842 # define PNG_sPLT_SUPPORTED
00843 #endif
00844 #ifndef PNG_NO_READ_sRGB
00845 # define PNG_READ_sRGB_SUPPORTED
00846 # define PNG_sRGB_SUPPORTED
00847 #endif
00848 #ifndef PNG_NO_READ_tEXt
00849 # define PNG_READ_tEXt_SUPPORTED
00850 # define PNG_tEXt_SUPPORTED
00851 #endif
00852 #ifndef PNG_NO_READ_tIME
00853 # define PNG_READ_tIME_SUPPORTED
00854 # define PNG_tIME_SUPPORTED
00855 #endif
00856 #ifndef PNG_NO_READ_tRNS
00857 # define PNG_READ_tRNS_SUPPORTED
00858 # define PNG_tRNS_SUPPORTED
00859 #endif
00860 #ifndef PNG_NO_READ_zTXt
00861 # define PNG_READ_zTXt_SUPPORTED
00862 # define PNG_zTXt_SUPPORTED
00863 #endif
00864 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
00865 # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
00866 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
00867 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
00868 # endif
00869 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
00870 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
00871 # endif
00872 #endif
00873 #if !defined(PNG_NO_READ_USER_CHUNKS) && \
00874 defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
00875 # define PNG_READ_USER_CHUNKS_SUPPORTED
00876 # define PNG_USER_CHUNKS_SUPPORTED
00877 # ifdef PNG_NO_READ_UNKNOWN_CHUNKS
00878 # undef PNG_NO_READ_UNKNOWN_CHUNKS
00879 # endif
00880 # ifdef PNG_NO_HANDLE_AS_UNKNOWN
00881 # undef PNG_NO_HANDLE_AS_UNKNOWN
00882 # endif
00883 #endif
00884 #ifndef PNG_NO_READ_OPT_PLTE
00885 # define PNG_READ_OPT_PLTE_SUPPORTED
00886 #endif
00887 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
00888 defined(PNG_READ_zTXt_SUPPORTED)
00889 # define PNG_READ_TEXT_SUPPORTED
00890 # define PNG_TEXT_SUPPORTED
00891 #endif
00892
00893 #endif
00894
00895 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00896
00897 #ifdef PNG_NO_WRITE_TEXT
00898 # define PNG_NO_WRITE_iTXt
00899 # define PNG_NO_WRITE_tEXt
00900 # define PNG_NO_WRITE_zTXt
00901 #endif
00902 #ifndef PNG_NO_WRITE_bKGD
00903 # define PNG_WRITE_bKGD_SUPPORTED
00904 # ifndef PNG_bKGD_SUPPORTED
00905 # define PNG_bKGD_SUPPORTED
00906 # endif
00907 #endif
00908 #ifndef PNG_NO_WRITE_cHRM
00909 # define PNG_WRITE_cHRM_SUPPORTED
00910 # ifndef PNG_cHRM_SUPPORTED
00911 # define PNG_cHRM_SUPPORTED
00912 # endif
00913 #endif
00914 #ifndef PNG_NO_WRITE_gAMA
00915 # define PNG_WRITE_gAMA_SUPPORTED
00916 # ifndef PNG_gAMA_SUPPORTED
00917 # define PNG_gAMA_SUPPORTED
00918 # endif
00919 #endif
00920 #ifndef PNG_NO_WRITE_hIST
00921 # define PNG_WRITE_hIST_SUPPORTED
00922 # ifndef PNG_hIST_SUPPORTED
00923 # define PNG_hIST_SUPPORTED
00924 # endif
00925 #endif
00926 #ifndef PNG_NO_WRITE_iCCP
00927 # define PNG_WRITE_iCCP_SUPPORTED
00928 # ifndef PNG_iCCP_SUPPORTED
00929 # define PNG_iCCP_SUPPORTED
00930 # endif
00931 #endif
00932 #ifndef PNG_NO_WRITE_iTXt
00933 # ifndef PNG_WRITE_iTXt_SUPPORTED
00934 # define PNG_WRITE_iTXt_SUPPORTED
00935 # endif
00936 # ifndef PNG_iTXt_SUPPORTED
00937 # define PNG_iTXt_SUPPORTED
00938 # endif
00939 #endif
00940 #ifndef PNG_NO_WRITE_oFFs
00941 # define PNG_WRITE_oFFs_SUPPORTED
00942 # ifndef PNG_oFFs_SUPPORTED
00943 # define PNG_oFFs_SUPPORTED
00944 # endif
00945 #endif
00946 #ifndef PNG_NO_WRITE_pCAL
00947 # define PNG_WRITE_pCAL_SUPPORTED
00948 # ifndef PNG_pCAL_SUPPORTED
00949 # define PNG_pCAL_SUPPORTED
00950 # endif
00951 #endif
00952 #ifndef PNG_NO_WRITE_sCAL
00953 # define PNG_WRITE_sCAL_SUPPORTED
00954 # ifndef PNG_sCAL_SUPPORTED
00955 # define PNG_sCAL_SUPPORTED
00956 # endif
00957 #endif
00958 #ifndef PNG_NO_WRITE_pHYs
00959 # define PNG_WRITE_pHYs_SUPPORTED
00960 # ifndef PNG_pHYs_SUPPORTED
00961 # define PNG_pHYs_SUPPORTED
00962 # endif
00963 #endif
00964 #ifndef PNG_NO_WRITE_sBIT
00965 # define PNG_WRITE_sBIT_SUPPORTED
00966 # ifndef PNG_sBIT_SUPPORTED
00967 # define PNG_sBIT_SUPPORTED
00968 # endif
00969 #endif
00970 #ifndef PNG_NO_WRITE_sPLT
00971 # define PNG_WRITE_sPLT_SUPPORTED
00972 # ifndef PNG_sPLT_SUPPORTED
00973 # define PNG_sPLT_SUPPORTED
00974 # endif
00975 #endif
00976 #ifndef PNG_NO_WRITE_sRGB
00977 # define PNG_WRITE_sRGB_SUPPORTED
00978 # ifndef PNG_sRGB_SUPPORTED
00979 # define PNG_sRGB_SUPPORTED
00980 # endif
00981 #endif
00982 #ifndef PNG_NO_WRITE_tEXt
00983 # define PNG_WRITE_tEXt_SUPPORTED
00984 # ifndef PNG_tEXt_SUPPORTED
00985 # define PNG_tEXt_SUPPORTED
00986 # endif
00987 #endif
00988 #ifndef PNG_NO_WRITE_tIME
00989 # define PNG_WRITE_tIME_SUPPORTED
00990 # ifndef PNG_tIME_SUPPORTED
00991 # define PNG_tIME_SUPPORTED
00992 # endif
00993 #endif
00994 #ifndef PNG_NO_WRITE_tRNS
00995 # define PNG_WRITE_tRNS_SUPPORTED
00996 # ifndef PNG_tRNS_SUPPORTED
00997 # define PNG_tRNS_SUPPORTED
00998 # endif
00999 #endif
01000 #ifndef PNG_NO_WRITE_zTXt
01001 # define PNG_WRITE_zTXt_SUPPORTED
01002 # ifndef PNG_zTXt_SUPPORTED
01003 # define PNG_zTXt_SUPPORTED
01004 # endif
01005 #endif
01006 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
01007 # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
01008 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
01009 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
01010 # endif
01011 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
01012 # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
01013 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
01014 # endif
01015 # endif
01016 #endif
01017 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
01018 defined(PNG_WRITE_zTXt_SUPPORTED)
01019 # define PNG_WRITE_TEXT_SUPPORTED
01020 # ifndef PNG_TEXT_SUPPORTED
01021 # define PNG_TEXT_SUPPORTED
01022 # endif
01023 #endif
01024
01025 #endif
01026
01027
01028
01029
01030
01031 #ifndef PNG_NO_INFO_IMAGE
01032 # define PNG_INFO_IMAGE_SUPPORTED
01033 #endif
01034
01035
01036 #if defined(PNG_tIME_SUPPORTED)
01037 # if !defined(_WIN32_WCE)
01038
01039 # include <time.h>
01040 # endif
01041 #endif
01042
01043
01044
01045
01046
01047
01048
01049
01050
01051
01052 typedef unsigned long png_uint_32;
01053 typedef long png_int_32;
01054 typedef unsigned short png_uint_16;
01055 typedef short png_int_16;
01056 typedef unsigned char png_byte;
01057
01058
01059
01060 #ifdef PNG_SIZE_T
01061 typedef PNG_SIZE_T png_size_t;
01062 # define png_sizeof(x) png_convert_size(sizeof (x))
01063 #else
01064 typedef size_t png_size_t;
01065 # define png_sizeof(x) sizeof (x)
01066 #endif
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079 #ifdef __BORLANDC__
01080 # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
01081 # define LDATA 1
01082 # else
01083 # define LDATA 0
01084 # endif
01085
01086 # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
01087 # define PNG_MAX_MALLOC_64K
01088 # if (LDATA != 1)
01089 # ifndef FAR
01090 # define FAR __far
01091 # endif
01092 # define USE_FAR_KEYWORD
01093 # endif
01094
01095
01096
01097
01098
01099 # endif
01100 #endif
01101
01102
01103
01104
01105
01106
01107
01108
01109 #if defined(FAR)
01110 # if defined(M_I86MM)
01111 # define USE_FAR_KEYWORD
01112 # define FARDATA FAR
01113 # include <dos.h>
01114 # endif
01115 #endif
01116
01117
01118 #ifndef FAR
01119 # define FAR
01120 #endif
01121
01122
01123 #ifndef FARDATA
01124 # define FARDATA
01125 #endif
01126
01127
01128
01129 typedef png_int_32 png_fixed_point;
01130
01131
01132 typedef void FAR * png_voidp;
01133 typedef png_byte FAR * png_bytep;
01134 typedef png_uint_32 FAR * png_uint_32p;
01135 typedef png_int_32 FAR * png_int_32p;
01136 typedef png_uint_16 FAR * png_uint_16p;
01137 typedef png_int_16 FAR * png_int_16p;
01138 typedef PNG_CONST char FAR * png_const_charp;
01139 typedef char FAR * png_charp;
01140 typedef png_fixed_point FAR * png_fixed_point_p;
01141
01142 #ifndef PNG_NO_STDIO
01143 #if defined(_WIN32_WCE)
01144 typedef HANDLE png_FILE_p;
01145 #else
01146 typedef FILE * png_FILE_p;
01147 #endif
01148 #endif
01149
01150 #ifdef PNG_FLOATING_POINT_SUPPORTED
01151 typedef double FAR * png_doublep;
01152 #endif
01153
01154
01155 typedef png_byte FAR * FAR * png_bytepp;
01156 typedef png_uint_32 FAR * FAR * png_uint_32pp;
01157 typedef png_int_32 FAR * FAR * png_int_32pp;
01158 typedef png_uint_16 FAR * FAR * png_uint_16pp;
01159 typedef png_int_16 FAR * FAR * png_int_16pp;
01160 typedef PNG_CONST char FAR * FAR * png_const_charpp;
01161 typedef char FAR * FAR * png_charpp;
01162 typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
01163 #ifdef PNG_FLOATING_POINT_SUPPORTED
01164 typedef double FAR * FAR * png_doublepp;
01165 #endif
01166
01167
01168 typedef char FAR * FAR * FAR * png_charppp;
01169
01170 #if defined(PNG_1_0_X) || defined(PNG_1_2_X)
01171
01172
01173
01174
01175
01176
01177 typedef charf * png_zcharp;
01178 typedef charf * FAR * png_zcharpp;
01179 typedef z_stream FAR * png_zstreamp;
01180 #endif
01181
01182
01183
01184
01185
01186
01187
01188
01189
01190
01191
01192
01193
01194
01195
01196
01197
01198
01199
01200 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
01201 # define PNG_DLL
01202 #endif
01203
01204
01205
01206
01207 #if defined(__CYGWIN__)
01208 # if !defined(PNG_STATIC)
01209 # if defined(PNG_USE_GLOBAL_ARRAYS)
01210 # undef PNG_USE_GLOBAL_ARRAYS
01211 # endif
01212 # if !defined(PNG_USE_LOCAL_ARRAYS)
01213 # define PNG_USE_LOCAL_ARRAYS
01214 # endif
01215 # else
01216 # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
01217 # if defined(PNG_USE_GLOBAL_ARRAYS)
01218 # undef PNG_USE_GLOBAL_ARRAYS
01219 # endif
01220 # endif
01221 # endif
01222 # if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01223 # define PNG_USE_LOCAL_ARRAYS
01224 # endif
01225 #endif
01226
01227
01228
01229
01230
01231 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01232 # if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL))
01233 # define PNG_USE_LOCAL_ARRAYS
01234 # else
01235 # define PNG_USE_GLOBAL_ARRAYS
01236 # endif
01237 #endif
01238
01239 #if defined(__CYGWIN__)
01240 # undef PNGAPI
01241 # define PNGAPI __cdecl
01242 # undef PNG_IMPEXP
01243 # define PNG_IMPEXP
01244 #endif
01245
01246
01247
01248
01249
01250
01251
01252
01253 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
01254 # ifndef PNG_NO_MODULEDEF
01255 # define PNG_NO_MODULEDEF
01256 # endif
01257 #endif
01258
01259 #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
01260 # define PNG_IMPEXP
01261 #endif
01262
01263 #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
01264 (( defined(_Windows) || defined(_WINDOWS) || \
01265 defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
01266
01267 # ifndef PNGAPI
01268 # if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
01269 # define PNGAPI __cdecl
01270 # else
01271 # define PNGAPI _cdecl
01272 # endif
01273 # endif
01274
01275 # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
01276 0 )
01277 # define PNG_IMPEXP
01278 # endif
01279
01280 # if !defined(PNG_IMPEXP)
01281
01282 # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
01283 # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
01284
01285
01286 # if defined(_MSC_VER) || defined(__BORLANDC__)
01287 # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
01288 # define PNG_EXPORT PNG_EXPORT_TYPE1
01289 # else
01290 # define PNG_EXPORT PNG_EXPORT_TYPE2
01291 # if defined(PNG_BUILD_DLL)
01292 # define PNG_IMPEXP __export
01293 # else
01294 # define PNG_IMPEXP
01295
01296 # endif
01297
01298 # endif
01299 # endif
01300
01301 # if !defined(PNG_IMPEXP)
01302 # if defined(PNG_BUILD_DLL)
01303 # define PNG_IMPEXP __declspec(dllexport)
01304 # else
01305 # define PNG_IMPEXP __declspec(dllimport)
01306 # endif
01307 # endif
01308 # endif
01309 #else
01310 # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
01311 # ifndef PNGAPI
01312 # define PNGAPI _System
01313 # endif
01314 # else
01315 # if 0
01316 # endif
01317 # endif
01318 #endif
01319
01320 #ifndef PNGAPI
01321 # define PNGAPI
01322 #endif
01323 #ifndef PNG_IMPEXP
01324 # define PNG_IMPEXP
01325 #endif
01326
01327 #ifdef PNG_BUILDSYMS
01328 # ifndef PNG_EXPORT
01329 # define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
01330 # endif
01331 # ifdef PNG_USE_GLOBAL_ARRAYS
01332 # ifndef PNG_EXPORT_VAR
01333 # define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
01334 # endif
01335 # endif
01336 #endif
01337
01338 #ifndef PNG_EXPORT
01339 # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
01340 #endif
01341
01342 #ifdef PNG_USE_GLOBAL_ARRAYS
01343 # ifndef PNG_EXPORT_VAR
01344 # define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
01345 # endif
01346 #endif
01347
01348
01349
01350
01351
01352 #ifndef PNG_ABORT
01353 # define PNG_ABORT() abort()
01354 #endif
01355
01356 #ifdef PNG_SETJMP_SUPPORTED
01357 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
01358 #else
01359 # define png_jmpbuf(png_ptr) \
01360 (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
01361 #endif
01362
01363 #if defined(USE_FAR_KEYWORD)
01364
01365 # define CHECK 1
01366 # define NOCHECK 0
01367 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
01368 # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
01369 # define png_strcpy _fstrcpy
01370 # define png_strncpy _fstrncpy
01371 # define png_strlen _fstrlen
01372 # define png_memcmp _fmemcmp
01373 # define png_memcpy _fmemcpy
01374 # define png_memset _fmemset
01375 #else
01376 # define CVT_PTR(ptr) (ptr)
01377 # define CVT_PTR_NOCHECK(ptr) (ptr)
01378 # define png_strcpy strcpy
01379 # define png_strncpy strncpy
01380 # define png_strlen strlen
01381 # define png_memcmp memcmp
01382 # define png_memcpy memcpy
01383 # define png_memset memset
01384 #endif
01385
01386
01387
01388
01389
01390 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
01391 # undef PNG_ZBUF_SIZE
01392 # define PNG_ZBUF_SIZE 65536L
01393 #endif
01394
01395 #ifdef PNG_READ_SUPPORTED
01396
01397 #if defined(PNG_INTERNAL)
01398
01399
01400
01401
01402
01403
01404
01405 #ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
01406 # define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128
01407 #endif
01408 #ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
01409 # define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9
01410 #endif
01411
01412
01413
01414
01415
01416 #ifdef PNG_USE_PNGVCRD
01417 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
01418 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
01419 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
01420 #endif
01421
01422
01423
01424
01425
01426 #ifdef PNG_USE_PNGGCCRD
01427 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
01428 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
01429 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
01430 #endif
01431
01432
01433 #endif
01434 #endif
01435
01436
01437 #endif
01438
01439 #endif