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