39 # define _POSIX_SOURCE 1 42 #ifndef PNG_VERSION_INFO_ONLY 59 #if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) 63 # define PNG_RESTRICT restrict 76 #if defined(PNG_PREFIX) && !defined(PNGPREFIX_H) 77 # include "pngprefix.h" 80 #ifdef PNG_USER_CONFIG 83 # ifndef PNG_USER_PRIVATEBUILD 84 # define PNG_USER_PRIVATEBUILD "Custom libpng build" 86 # ifndef PNG_USER_DLLFNAME_POSTFIX 87 # define PNG_USER_DLLFNAME_POSTFIX "Cb" 110 #ifndef PNG_ARM_NEON_OPT 130 # if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \ 131 defined(PNG_ALIGNED_MEMORY_SUPPORTED) 132 # define PNG_ARM_NEON_OPT 2 134 # define PNG_ARM_NEON_OPT 0 138 #if PNG_ARM_NEON_OPT > 0 142 # define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_neon 158 # ifndef PNG_ARM_NEON_IMPLEMENTATION 159 # if defined(__ARM_NEON__) || defined(__ARM_NEON) 160 # if defined(__clang__) 166 # elif defined(__GNUC__) 170 # if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) 171 # define PNG_ARM_NEON_IMPLEMENTATION 2 177 # if !defined(__aarch64__) 179 # define PNG_ARM_NEON_IMPLEMENTATION 2 184 # ifndef PNG_ARM_NEON_IMPLEMENTATION 186 # define PNG_ARM_NEON_IMPLEMENTATION 1 190 #ifndef PNG_MIPS_MSA_OPT 191 # if defined(__mips_msa) && (__mips_isa_rev >= 5) && defined(PNG_ALIGNED_MEMORY_SUPPORTED) 192 # define PNG_MIPS_MSA_OPT 2 194 # define PNG_MIPS_MSA_OPT 0 198 #ifndef PNG_POWERPC_VSX_OPT 199 # if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__) 200 # define PNG_POWERPC_VSX_OPT 2 202 # define PNG_POWERPC_VSX_OPT 0 206 #ifndef PNG_INTEL_SSE_OPT 207 # ifdef PNG_INTEL_SSE 212 # if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \ 213 defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ 214 (defined(_M_IX86_FP) && _M_IX86_FP >= 2) 215 # define PNG_INTEL_SSE_OPT 1 217 # define PNG_INTEL_SSE_OPT 0 220 # define PNG_INTEL_SSE_OPT 0 224 #if PNG_INTEL_SSE_OPT > 0 225 # ifndef PNG_INTEL_SSE_IMPLEMENTATION 226 # if defined(__SSE4_1__) || defined(__AVX__) 230 # define PNG_INTEL_SSE_IMPLEMENTATION 3 231 # elif defined(__SSSE3__) 232 # define PNG_INTEL_SSE_IMPLEMENTATION 2 233 # elif defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ 234 (defined(_M_IX86_FP) && _M_IX86_FP >= 2) 235 # define PNG_INTEL_SSE_IMPLEMENTATION 1 237 # define PNG_INTEL_SSE_IMPLEMENTATION 0 241 # if PNG_INTEL_SSE_IMPLEMENTATION > 0 242 # define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2 245 # define PNG_INTEL_SSE_IMPLEMENTATION 0 248 #if PNG_MIPS_MSA_OPT > 0 249 # define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_msa 250 # ifndef PNG_MIPS_MSA_IMPLEMENTATION 251 # if defined(__mips_msa) 252 # if defined(__clang__) 253 # elif defined(__GNUC__) 254 # if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) 255 # define PNG_MIPS_MSA_IMPLEMENTATION 2 259 # define PNG_MIPS_MSA_IMPLEMENTATION 2 263 # ifndef PNG_MIPS_MSA_IMPLEMENTATION 264 # define PNG_MIPS_MSA_IMPLEMENTATION 1 268 #if PNG_POWERPC_VSX_OPT > 0 269 # define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx 270 # define PNG_POWERPC_VSX_IMPLEMENTATION 1 282 #ifndef PNG_BUILD_DLL 288 # define PNG_BUILD_DLL 297 # define PNG_BUILD_DLL 303 # define PNG_BUILD_DLL 320 # ifdef PNG_BUILD_DLL 321 # define PNG_IMPEXP PNG_DLL_EXPORT 331 #ifndef PNG_DEPRECATED 332 # define PNG_DEPRECATED 343 #ifndef PNG_INTERNAL_DATA 344 # define PNG_INTERNAL_DATA(type, name, array) PNG_LINKAGE_DATA type name array 347 #ifndef PNG_INTERNAL_FUNCTION 348 # define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\ 349 PNG_LINKAGE_FUNCTION PNG_FUNCTION(type, name, args, PNG_EMPTY attributes) 352 #ifndef PNG_INTERNAL_CALLBACK 353 # define PNG_INTERNAL_CALLBACK(type, name, args, attributes)\ 354 PNG_LINKAGE_CALLBACK PNG_FUNCTION(type, (PNGCBAPI name), args,\ 355 PNG_EMPTY attributes) 367 #ifndef PNG_FP_EXPORT 368 # ifndef PNG_FLOATING_POINT_SUPPORTED 369 # define PNG_FP_EXPORT(ordinal, type, name, args)\ 370 PNG_INTERNAL_FUNCTION(type, name, args, PNG_EMPTY); 371 # ifndef PNG_VERSION_INFO_ONLY 379 #ifndef PNG_FIXED_EXPORT 380 # ifndef PNG_FIXED_POINT_SUPPORTED 381 # define PNG_FIXED_EXPORT(ordinal, type, name, args)\ 382 PNG_INTERNAL_FUNCTION(type, name, args, PNG_EMPTY); 389 #ifndef PNG_DLL_EXPORT 390 # define PNG_DLL_EXPORT 405 #ifndef PNG_RELEASE_BUILD 406 # define PNG_RELEASE_BUILD (PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC) 427 #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) 428 # define PNG_MAX_MALLOC_64K 438 # define PNG_UNUSED(param) (void)param; 444 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) 445 # undef PNG_ZBUF_SIZE 446 # define PNG_ZBUF_SIZE 65536L 453 #ifdef PNG_WARNINGS_SUPPORTED 454 # define PNG_WARNING_PARAMETERS(p) png_warning_parameters p; 456 # define png_warning_parameter(p,number,string) ((void)0) 457 # define png_warning_parameter_unsigned(p,number,format,value) ((void)0) 458 # define png_warning_parameter_signed(p,number,format,value) ((void)0) 459 # define png_formatted_warning(pp,p,message) ((void)(pp)) 460 # define PNG_WARNING_PARAMETERS(p) 462 #ifndef PNG_ERROR_TEXT_SUPPORTED 463 # define png_fixed_error(s1,s2) png_err(s1) 470 #ifdef PNG_FIXED_POINT_SUPPORTED 471 # define PNGFAPI PNGAPI 476 #ifndef PNG_VERSION_INFO_ONLY 487 # define png_voidcast(type, value) static_cast<type>(value) 488 # define png_constcast(type, value) const_cast<type>(value) 489 # define png_aligncast(type, value) \ 490 static_cast<type>(static_cast<void*>(value)) 491 # define png_aligncastconst(type, value) \ 492 static_cast<type>(static_cast<const void*>(value)) 494 # define png_voidcast(type, value) (value) 504 # define png_constcast(type, value) ((type)(png_ptruint)(const void*)(value)) 505 # define png_aligncast(type, value) ((void*)(value)) 506 # define png_aligncastconst(type, value) ((const void*)(value)) 509 #if defined(PNG_FLOATING_POINT_SUPPORTED) ||\ 510 defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) 520 # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ 521 defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) 526 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) 532 # if defined(_AMIGA) && defined(__SASC) && defined(_M68881) 541 #if defined(__TURBOC__) && defined(__MSDOS__) 546 #if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ 547 defined(_WIN32) || defined(__WIN32__) 548 # include <windows.h> 560 # define PNG_ABORT() ExitProcess(0) 562 # define PNG_ABORT() abort() 567 #define PNG_ALIGN_NONE 0 568 #define PNG_ALIGN_ALWAYS 1 570 # define PNG_ALIGN_OFFSET 2 572 # define PNG_ALIGN_OFFSET -1 574 #define PNG_ALIGN_SIZE 3 576 #ifndef PNG_ALIGN_TYPE 581 # define PNG_ALIGN_TYPE PNG_ALIGN_SIZE 584 #if PNG_ALIGN_TYPE == PNG_ALIGN_SIZE 591 # define png_alignof(type) (sizeof (type)) 593 # if PNG_ALIGN_TYPE == PNG_ALIGN_OFFSET 594 # define png_alignof(type) offsetof(struct{char c; type t;}, t) 596 # if PNG_ALIGN_TYPE == PNG_ALIGN_ALWAYS 597 # define png_alignof(type) (1) 605 # define png_isaligned(ptr, type)\ 606 (((type)((const char*)ptr-(const char*)0) & \ 607 (type)(png_alignof(type)-1)) == 0) 609 # define png_isaligned(ptr, type) 0 626 #define PNG_HAVE_IDAT 0x04U 628 #define PNG_HAVE_IEND 0x10U 632 #define PNG_HAVE_CHUNK_HEADER 0x100U 633 #define PNG_WROTE_tIME 0x200U 634 #define PNG_WROTE_INFO_BEFORE_PLTE 0x400U 635 #define PNG_BACKGROUND_IS_GRAY 0x800U 636 #define PNG_HAVE_PNG_SIGNATURE 0x1000U 637 #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000U 639 #define PNG_IS_READ_STRUCT 0x8000U 642 #define PNG_BGR 0x0001U 643 #define PNG_INTERLACE 0x0002U 644 #define PNG_PACK 0x0004U 645 #define PNG_SHIFT 0x0008U 646 #define PNG_SWAP_BYTES 0x0010U 647 #define PNG_INVERT_MONO 0x0020U 648 #define PNG_QUANTIZE 0x0040U 649 #define PNG_COMPOSE 0x0080U 650 #define PNG_BACKGROUND_EXPAND 0x0100U 651 #define PNG_EXPAND_16 0x0200U 652 #define PNG_16_TO_8 0x0400U 653 #define PNG_RGBA 0x0800U 654 #define PNG_EXPAND 0x1000U 655 #define PNG_GAMMA 0x2000U 656 #define PNG_GRAY_TO_RGB 0x4000U 657 #define PNG_FILLER 0x8000U 658 #define PNG_PACKSWAP 0x10000U 659 #define PNG_SWAP_ALPHA 0x20000U 660 #define PNG_STRIP_ALPHA 0x40000U 661 #define PNG_INVERT_ALPHA 0x80000U 662 #define PNG_USER_TRANSFORM 0x100000U 663 #define PNG_RGB_TO_GRAY_ERR 0x200000U 664 #define PNG_RGB_TO_GRAY_WARN 0x400000U 665 #define PNG_RGB_TO_GRAY 0x600000U 666 #define PNG_ENCODE_ALPHA 0x800000U 667 #define PNG_ADD_ALPHA 0x1000000U 668 #define PNG_EXPAND_tRNS 0x2000000U 669 #define PNG_SCALE_16_TO_8 0x4000000U 675 #define PNG_STRUCT_PNG 0x0001U 676 #define PNG_STRUCT_INFO 0x0002U 679 #define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001U 680 #define PNG_FLAG_ZSTREAM_INITIALIZED 0x0002U 682 #define PNG_FLAG_ZSTREAM_ENDED 0x0008U 685 #define PNG_FLAG_ROW_INIT 0x0040U 686 #define PNG_FLAG_FILLER_AFTER 0x0080U 687 #define PNG_FLAG_CRC_ANCILLARY_USE 0x0100U 688 #define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200U 689 #define PNG_FLAG_CRC_CRITICAL_USE 0x0400U 690 #define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800U 691 #define PNG_FLAG_ASSUME_sRGB 0x1000U 692 #define PNG_FLAG_OPTIMIZE_ALPHA 0x2000U 693 #define PNG_FLAG_DETECT_UNINITIALIZED 0x4000U 696 #define PNG_FLAG_LIBRARY_MISMATCH 0x20000U 697 #define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000U 698 #define PNG_FLAG_STRIP_ERROR_TEXT 0x80000U 699 #define PNG_FLAG_BENIGN_ERRORS_WARN 0x100000U 700 #define PNG_FLAG_APP_WARNINGS_WARN 0x200000U 701 #define PNG_FLAG_APP_ERRORS_WARN 0x400000U 711 #define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ 712 PNG_FLAG_CRC_ANCILLARY_NOWARN) 714 #define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ 715 PNG_FLAG_CRC_CRITICAL_IGNORE) 717 #define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ 718 PNG_FLAG_CRC_CRITICAL_MASK) 722 #define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ 723 abs((int)((c1).green) - (int)((c2).green)) + \ 724 abs((int)((c1).blue) - (int)((c2).blue))) 734 #define PNG_DIV65535(v24) (((v24) + 32895) >> 16) 735 #define PNG_DIV257(v16) PNG_DIV65535((png_uint_32)(v16) * 255) 738 #define PNG_ROWBYTES(pixel_bits, width) \ 739 ((pixel_bits) >= 8 ? \ 740 ((size_t)(width) * (((size_t)(pixel_bits)) >> 3)) : \ 741 (( ((size_t)(width) * ((size_t)(pixel_bits))) + 7) >> 3) ) 755 #define PNG_TRAILBITS(pixel_bits, width) \ 756 (((pixel_bits) * ((width) % (png_uint_32)8)) % 8) 758 #define PNG_PADBITS(pixel_bits, width) \ 759 ((8 - PNG_TRAILBITS(pixel_bits, width)) % 8) 766 #define PNG_OUT_OF_RANGE(value, ideal, delta) \ 767 ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) 773 #ifdef PNG_FLOATING_POINT_SUPPORTED 781 #define png_float(png_ptr, fixed, s) (.00001 * (fixed)) 799 #ifdef PNG_FIXED_POINT_MACRO_SUPPORTED 800 #define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\ 801 ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0)) 821 #define PNG_32b(b,s) ((png_uint_32)(b) << (s)) 822 #define PNG_U32(b1,b2,b3,b4) \ 823 (PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0)) 848 #define png_IDAT PNG_U32( 73, 68, 65, 84) 849 #define png_IEND PNG_U32( 73, 69, 78, 68) 850 #define png_IHDR PNG_U32( 73, 72, 68, 82) 851 #define png_PLTE PNG_U32( 80, 76, 84, 69) 852 #define png_bKGD PNG_U32( 98, 75, 71, 68) 853 #define png_cHRM PNG_U32( 99, 72, 82, 77) 854 #define png_eXIf PNG_U32(101, 88, 73, 102) 855 #define png_fRAc PNG_U32(102, 82, 65, 99) 856 #define png_gAMA PNG_U32(103, 65, 77, 65) 857 #define png_gIFg PNG_U32(103, 73, 70, 103) 858 #define png_gIFt PNG_U32(103, 73, 70, 116) 859 #define png_gIFx PNG_U32(103, 73, 70, 120) 860 #define png_hIST PNG_U32(104, 73, 83, 84) 861 #define png_iCCP PNG_U32(105, 67, 67, 80) 862 #define png_iTXt PNG_U32(105, 84, 88, 116) 863 #define png_oFFs PNG_U32(111, 70, 70, 115) 864 #define png_pCAL PNG_U32(112, 67, 65, 76) 865 #define png_pHYs PNG_U32(112, 72, 89, 115) 866 #define png_sBIT PNG_U32(115, 66, 73, 84) 867 #define png_sCAL PNG_U32(115, 67, 65, 76) 868 #define png_sPLT PNG_U32(115, 80, 76, 84) 869 #define png_sRGB PNG_U32(115, 82, 71, 66) 870 #define png_sTER PNG_U32(115, 84, 69, 82) 871 #define png_tEXt PNG_U32(116, 69, 88, 116) 872 #define png_tIME PNG_U32(116, 73, 77, 69) 873 #define png_tRNS PNG_U32(116, 82, 78, 83) 874 #define png_zTXt PNG_U32(122, 84, 88, 116) 879 #define PNG_CHUNK_FROM_STRING(s)\ 880 PNG_U32(0xff & (s)[0], 0xff & (s)[1], 0xff & (s)[2], 0xff & (s)[3]) 886 #define PNG_STRING_FROM_CHUNK(s,c)\ 887 (void)(((char*)(s))[0]=(char)(((c)>>24) & 0xff), \ 888 ((char*)(s))[1]=(char)(((c)>>16) & 0xff),\ 889 ((char*)(s))[2]=(char)(((c)>>8) & 0xff), \ 890 ((char*)(s))[3]=(char)((c & 0xff))) 893 #define PNG_CSTRING_FROM_CHUNK(s,c)\ 894 (void)(PNG_STRING_FROM_CHUNK(s,c), ((char*)(s))[4] = 0) 897 #define PNG_CHUNK_ANCILLARY(c) (1 & ((c) >> 29)) 898 #define PNG_CHUNK_CRITICAL(c) (!PNG_CHUNK_ANCILLARY(c)) 899 #define PNG_CHUNK_PRIVATE(c) (1 & ((c) >> 21)) 900 #define PNG_CHUNK_RESERVED(c) (1 & ((c) >> 13)) 901 #define PNG_CHUNK_SAFE_TO_COPY(c) (1 & ((c) >> 5)) 904 #define PNG_GAMMA_MAC_OLD 151724 905 #define PNG_GAMMA_MAC_INVERSE 65909 906 #define PNG_GAMMA_sRGB_INVERSE 45455 911 #ifndef PNG_VERSION_INFO_ONLY 919 #if PNG_ZLIB_VERNUM != 0 && PNG_ZLIB_VERNUM != ZLIB_VERNUM 920 # error ZLIB_VERNUM != PNG_ZLIB_VERNUM \ 921 "-I (include path) error: see the notes in pngpriv.h" 940 #if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ 941 defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) 942 #ifdef PNG_SIMPLIFIED_READ_SUPPORTED 952 #define PNG_sRGB_FROM_LINEAR(linear) \ 953 ((png_byte)(0xff & ((png_sRGB_base[(linear)>>15] \ 954 + ((((linear) & 0x7fff)*png_sRGB_delta[(linear)>>15])>>12)) >> 8))) 973 #define PNG_UNEXPECTED_ZLIB_RETURN (-7) 980 #ifdef PNG_WRITE_SUPPORTED 986 #if defined(PNG_FLOATING_POINT_SUPPORTED) && \ 987 !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \ 988 (defined(PNG_gAMA_SUPPORTED) || defined(PNG_cHRM_SUPPORTED) || \ 989 defined(PNG_sCAL_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) || \ 990 defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) || \ 991 (defined(PNG_sCAL_SUPPORTED) && \ 992 defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)) 1010 #if defined(PNG_TEXT_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) ||\ 1011 defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) 1035 png_error_ptr warn_fn,
png_voidp mem_ptr, png_malloc_ptr malloc_fn,
1060 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED 1068 #ifdef PNG_WRITE_FLUSH_SUPPORTED 1069 # ifdef PNG_STDIO_SUPPORTED 1112 #ifdef PNG_WRITE_FLUSH_SUPPORTED 1123 int compression_method,
int filter_method,
int interlace_method),
PNG_EMPTY);
1134 #ifdef PNG_WRITE_gAMA_SUPPORTED 1139 #ifdef PNG_WRITE_sBIT_SUPPORTED 1144 #ifdef PNG_WRITE_cHRM_SUPPORTED 1150 #ifdef PNG_WRITE_sRGB_SUPPORTED 1155 #ifdef PNG_WRITE_eXIf_SUPPORTED 1160 #ifdef PNG_WRITE_iCCP_SUPPORTED 1169 #ifdef PNG_WRITE_sPLT_SUPPORTED 1174 #ifdef PNG_WRITE_tRNS_SUPPORTED 1180 #ifdef PNG_WRITE_bKGD_SUPPORTED 1185 #ifdef PNG_WRITE_hIST_SUPPORTED 1191 #ifdef PNG_WRITE_tEXt_SUPPORTED 1196 #ifdef PNG_WRITE_zTXt_SUPPORTED 1201 #ifdef PNG_WRITE_iTXt_SUPPORTED 1207 #ifdef PNG_TEXT_SUPPORTED 1212 #ifdef PNG_WRITE_oFFs_SUPPORTED 1214 png_int_32 x_offset, png_int_32 y_offset,
int unit_type),
PNG_EMPTY);
1217 #ifdef PNG_WRITE_pCAL_SUPPORTED 1219 png_charp purpose, png_int_32 X0, png_int_32 X1,
int type,
int nparams,
1223 #ifdef PNG_WRITE_pHYs_SUPPORTED 1229 #ifdef PNG_WRITE_tIME_SUPPORTED 1234 #ifdef PNG_WRITE_sCAL_SUPPORTED 1270 #ifndef PNG_USE_COMPILE_TIME_MASKS 1271 # define PNG_USE_COMPILE_TIME_MASKS 1 1276 #ifdef PNG_READ_INTERLACING_SUPPORTED 1289 #ifdef PNG_WRITE_INTERLACING_SUPPORTED 1301 #if PNG_ARM_NEON_OPT > 0 1318 #if PNG_MIPS_MSA_OPT > 0 1335 #if PNG_POWERPC_VSX_OPT > 0 1352 #if PNG_INTEL_SSE_IMPLEMENTATION > 0 1371 #ifdef PNG_SEQUENTIAL_READ_SUPPORTED 1393 #if ZLIB_VERNUM >= 0x1240 1396 # define PNG_INFLATE(pp, flush) png_zlib_inflate(pp, flush) 1398 # define PNG_INFLATE(pp, flush) inflate(&(pp)->zstream, flush) 1401 #ifdef PNG_READ_TRANSFORMS_SUPPORTED 1408 #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ 1409 defined(PNG_READ_STRIP_ALPHA_SUPPORTED) 1414 #ifdef PNG_16BIT_SUPPORTED 1415 #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) 1421 #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ 1422 defined(PNG_WRITE_PACKSWAP_SUPPORTED) 1427 #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) 1432 #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) 1449 #ifdef PNG_READ_bKGD_SUPPORTED 1454 #ifdef PNG_READ_cHRM_SUPPORTED 1459 #ifdef PNG_READ_eXIf_SUPPORTED 1464 #ifdef PNG_READ_gAMA_SUPPORTED 1469 #ifdef PNG_READ_hIST_SUPPORTED 1474 #ifdef PNG_READ_iCCP_SUPPORTED 1479 #ifdef PNG_READ_iTXt_SUPPORTED 1484 #ifdef PNG_READ_oFFs_SUPPORTED 1489 #ifdef PNG_READ_pCAL_SUPPORTED 1494 #ifdef PNG_READ_pHYs_SUPPORTED 1499 #ifdef PNG_READ_sBIT_SUPPORTED 1504 #ifdef PNG_READ_sCAL_SUPPORTED 1509 #ifdef PNG_READ_sPLT_SUPPORTED 1514 #ifdef PNG_READ_sRGB_SUPPORTED 1519 #ifdef PNG_READ_tEXt_SUPPORTED 1524 #ifdef PNG_READ_tIME_SUPPORTED 1529 #ifdef PNG_READ_tRNS_SUPPORTED 1534 #ifdef PNG_READ_zTXt_SUPPORTED 1553 #if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) ||\ 1554 defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) 1563 #ifdef PNG_READ_TRANSFORMS_SUPPORTED 1567 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED 1572 #ifdef PNG_READ_TRANSFORMS_SUPPORTED 1577 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED 1606 # ifdef PNG_READ_tEXt_SUPPORTED 1612 # ifdef PNG_READ_zTXt_SUPPORTED 1618 # ifdef PNG_READ_iTXt_SUPPORTED 1628 #ifdef PNG_GAMMA_SUPPORTED 1648 #ifdef PNG_COLORSPACE_SUPPORTED 1660 #ifdef PNG_sRGB_SUPPORTED 1670 #ifdef PNG_iCCP_SUPPORTED 1678 #ifdef PNG_READ_iCCP_SUPPORTED 1692 #ifdef PNG_sRGB_SUPPORTED 1703 #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED 1713 int color_type,
int interlace_type,
int compression_type,
1717 #if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \ 1718 defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED) 1723 #if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) 1738 #if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED) 1748 #define PNG_FORMAT_NUMBER(buffer,format,number) \ 1749 png_format_number(buffer, buffer + (sizeof buffer), format, number) 1752 #define PNG_NUMBER_BUFFER_SIZE 24 1757 #define PNG_NUMBER_FORMAT_u 1 1758 #define PNG_NUMBER_FORMAT_02u 2 1759 #define PNG_NUMBER_FORMAT_d 1 1760 #define PNG_NUMBER_FORMAT_02d 2 1761 #define PNG_NUMBER_FORMAT_x 3 1762 #define PNG_NUMBER_FORMAT_02x 4 1763 #define PNG_NUMBER_FORMAT_fixed 5 1766 #ifdef PNG_WARNINGS_SUPPORTED 1768 # define PNG_WARNING_PARAMETER_SIZE 32 1769 # define PNG_WARNING_PARAMETER_COUNT 8 1774 typedef char png_warning_parameters[PNG_WARNING_PARAMETER_COUNT][
1775 PNG_WARNING_PARAMETER_SIZE];
1800 #ifdef PNG_BENIGN_ERRORS_SUPPORTED 1827 # define png_app_warning(pp,s) png_warning(pp,s) 1828 # define png_app_error(pp,s) png_error(pp,s) 1842 #define PNG_CHUNK_WARNING 0 1843 #define PNG_CHUNK_WRITE_ERROR 1 1844 #define PNG_CHUNK_ERROR 2 1849 #if defined(PNG_sCAL_SUPPORTED) 1855 #define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1+1+10) 1857 #ifdef PNG_FLOATING_POINT_SUPPORTED 1863 #ifdef PNG_FIXED_POINT_SUPPORTED 1869 #if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) 1900 #define PNG_FP_INTEGER 0 1901 #define PNG_FP_FRACTION 1 1902 #define PNG_FP_EXPONENT 2 1903 #define PNG_FP_STATE 3 1904 #define PNG_FP_SAW_SIGN 4 1905 #define PNG_FP_SAW_DIGIT 8 1906 #define PNG_FP_SAW_DOT 16 1907 #define PNG_FP_SAW_E 32 1908 #define PNG_FP_SAW_ANY 60 1912 #define PNG_FP_WAS_VALID 64 1913 #define PNG_FP_NEGATIVE 128 1914 #define PNG_FP_NONZERO 256 1915 #define PNG_FP_STICKY 448 1920 #define PNG_FP_INVALID 512 1925 #define PNG_FP_MAYBE 0 1933 #define PNG_FP_NZ_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NEGATIVE | PNG_FP_NONZERO) 1935 #define PNG_FP_Z_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NONZERO) 1938 #define PNG_FP_IS_ZERO(state) (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT) 1939 #define PNG_FP_IS_POSITIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK) 1940 #define PNG_FP_IS_NEGATIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK) 1970 #if defined(PNG_GAMMA_SUPPORTED) ||\ 1971 defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED) 1979 png_int_32 multiplied_by, png_int_32 divided_by),
PNG_EMPTY);
1982 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) 1989 #ifdef PNG_GAMMA_SUPPORTED 1997 #ifdef PNG_READ_GAMMA_SUPPORTED 2011 #ifdef PNG_READ_GAMMA_SUPPORTED 2032 #if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ 2033 defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) 2035 typedef struct png_control
2044 unsigned int for_write :1;
2045 unsigned int owned_file :1;
2052 # define png_control_jmp_buf(pc) (((jmp_buf*)((pc)->error_buf))[0]) 2054 # define png_control_jmp_buf(pc) ((pc)->error_buf) 2064 #ifdef PNG_WARNINGS_SUPPORTED 2068 # define png_safe_warning 0 2080 #ifndef PNG_SIMPLIFIED_READ_SUPPORTED 2092 #ifdef PNG_FILTER_OPTIMIZATIONS 2101 # if PNG_ARM_NEON_OPT > 0 2106 #if PNG_MIPS_MSA_OPT > 0 2111 # if PNG_INTEL_SSE_IMPLEMENTATION > 0 2120 #if PNG_ARM_NEON_IMPLEMENTATION == 1 2122 png_riffle_palette_neon,
2126 png_do_expand_palette_rgba8_neon,
2134 png_do_expand_palette_rgb8_neon,
#define png_warning_parameter_unsigned(p, number, format, value)
GLint GLint GLsizei width
#define png_formatted_warning(pp, p, message)
static UCHAR ULONG UCHAR ULONG UCHAR * output
#define png_app_error(pp, s)
const char * png_const_charp
const png_uint_16p * png_const_uint_16pp
GLboolean GLenum GLenum GLvoid * values
GLenum GLuint GLsizei bufsize
static char memory[1024 *256]
#define PNG_INTERNAL_CALLBACK(type, name, args, attributes)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLenum GLuint GLenum GLsizei const GLchar * buf
void error_message(HWND hwnd, const char *msg)
struct png_incomplete png_double
GLenum const GLfloat * params
static size_t double number
GLenum GLuint GLenum GLsizei length
png_const_structrp png_const_inforp int * unit
const png_struct *PNG_RESTRICT png_const_structrp
#define png_warning_parameter_signed(p, number, format, value)
#define png_warning_parameter(p, number, string)
GLenum GLint GLint * precision
static const WCHAR lang[]
png_int_32 png_fixed_point
#define png_fixed_error(s1, s2)
GLboolean GLboolean GLboolean b
const png_byte * png_const_bytep
const png_uint_16 * png_const_uint_16p
png_const_structrp png_const_inforp info_ptr
const png_double * png_const_doublep
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
png_struct *PNG_RESTRICT png_structrp
#define png_app_warning(pp, s)
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t compression
unsigned long png_ptruint
GLint GLint GLsizei GLsizei height
png_uint_16 * png_uint_16p
png_fixed_point * png_fixed_point_p
png_double ** png_doublepp
png_info *PNG_RESTRICT png_inforp
GLuint GLuint GLsizei GLenum type
#define PNG_INTERNAL_FUNCTION(type, name, args, attributes)
GLboolean GLboolean GLboolean GLboolean a
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
#define PNG_INTERNAL_DATA(type, name, array)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
static HCRYPTKEY new_key(HCRYPTPROV hProv, ALG_ID aiAlgid, DWORD dwFlags, CRYPTKEY **ppCryptKey)