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