40 #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 72 # include "pnglibconf.h" 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 126 # if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \ 127 defined(PNG_ALIGNED_MEMORY_SUPPORTED) 128 # define PNG_ARM_NEON_OPT 2 130 # define PNG_ARM_NEON_OPT 0 134 #if PNG_ARM_NEON_OPT > 0 138 # define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_neon 154 # ifndef PNG_ARM_NEON_IMPLEMENTATION 155 # if defined(__ARM_NEON__) || defined(__ARM_NEON) 156 # if defined(__clang__) 162 # elif defined(__GNUC__) 166 # if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) 167 # define PNG_ARM_NEON_IMPLEMENTATION 2 173 # define PNG_ARM_NEON_IMPLEMENTATION 2 177 # ifndef PNG_ARM_NEON_IMPLEMENTATION 179 # define PNG_ARM_NEON_IMPLEMENTATION 1 191 #ifndef PNG_BUILD_DLL 197 # define PNG_BUILD_DLL 206 # define PNG_BUILD_DLL 212 # define PNG_BUILD_DLL 229 # ifdef PNG_BUILD_DLL 230 # define PNG_IMPEXP PNG_DLL_EXPORT 240 #ifndef PNG_DEPRECATED 241 # define PNG_DEPRECATED 252 #ifndef PNG_INTERNAL_DATA 253 # define PNG_INTERNAL_DATA(type, name, array) extern type name array 256 #ifndef PNG_INTERNAL_FUNCTION 257 # define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\ 258 extern PNG_FUNCTION(type, name, args, PNG_EMPTY attributes) 261 #ifndef PNG_INTERNAL_CALLBACK 262 # define PNG_INTERNAL_CALLBACK(type, name, args, attributes)\ 263 extern PNG_FUNCTION(type, (PNGCBAPI name), args, PNG_EMPTY attributes) 275 #ifndef PNG_FP_EXPORT 276 # ifndef PNG_FLOATING_POINT_SUPPORTED 277 # define PNG_FP_EXPORT(ordinal, type, name, args)\ 278 PNG_INTERNAL_FUNCTION(type, name, args, PNG_EMPTY); 279 # ifndef PNG_VERSION_INFO_ONLY 280 typedef struct png_incomplete png_double;
281 typedef png_double* png_doublep;
282 typedef const png_double* png_const_doublep;
283 typedef png_double** png_doublepp;
287 #ifndef PNG_FIXED_EXPORT 288 # ifndef PNG_FIXED_POINT_SUPPORTED 289 # define PNG_FIXED_EXPORT(ordinal, type, name, args)\ 290 PNG_INTERNAL_FUNCTION(type, name, args, PNG_EMPTY); 297 #ifndef PNG_DLL_EXPORT 298 # define PNG_DLL_EXPORT 310 #ifdef PNG_SAFE_LIMITS_SUPPORTED 312 # ifndef PNG_USER_WIDTH_MAX 313 # define PNG_USER_WIDTH_MAX 1000000 315 # ifndef PNG_USER_HEIGHT_MAX 316 # define PNG_USER_HEIGHT_MAX 1000000 318 # ifndef PNG_USER_CHUNK_CACHE_MAX 319 # define PNG_USER_CHUNK_CACHE_MAX 128 321 # ifndef PNG_USER_CHUNK_MALLOC_MAX 322 # define PNG_USER_CHUNK_MALLOC_MAX 8000000 326 # ifndef PNG_USER_WIDTH_MAX 327 # define PNG_USER_WIDTH_MAX 0x7fffffff 329 # ifndef PNG_USER_HEIGHT_MAX 330 # define PNG_USER_HEIGHT_MAX 0x7fffffff 332 # ifndef PNG_USER_CHUNK_CACHE_MAX 333 # define PNG_USER_CHUNK_CACHE_MAX 0 335 # ifndef PNG_USER_CHUNK_MALLOC_MAX 336 # define PNG_USER_CHUNK_MALLOC_MAX 0 356 #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) 357 # define PNG_MAX_MALLOC_64K 367 # define PNG_UNUSED(param) (void)param; 373 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) 374 # undef PNG_ZBUF_SIZE 375 # define PNG_ZBUF_SIZE 65536L 382 #ifdef PNG_WARNINGS_SUPPORTED 383 # define PNG_WARNING_PARAMETERS(p) png_warning_parameters p; 385 # define png_warning_parameter(p,number,string) ((void)0) 386 # define png_warning_parameter_unsigned(p,number,format,value) ((void)0) 387 # define png_warning_parameter_signed(p,number,format,value) ((void)0) 388 # define png_formatted_warning(pp,p,message) ((void)(pp)) 389 # define PNG_WARNING_PARAMETERS(p) 391 #ifndef PNG_ERROR_TEXT_SUPPORTED 392 # define png_fixed_error(s1,s2) png_err(s1) 401 # define png_voidcast(type, value) static_cast<type>(value) 402 # define png_constcast(type, value) const_cast<type>(value) 403 # define png_aligncast(type, value) \ 404 static_cast<type>(static_cast<void*>(value)) 405 # define png_aligncastconst(type, value) \ 406 static_cast<type>(static_cast<const void*>(value)) 408 # define png_voidcast(type, value) (value) 409 # define png_constcast(type, value) ((type)(value)) 410 # define png_aligncast(type, value) ((void*)(value)) 411 # define png_aligncastconst(type, value) ((const void*)(value)) 418 #ifdef PNG_FIXED_POINT_SUPPORTED 419 # define PNGFAPI PNGAPI 424 #ifndef PNG_VERSION_INFO_ONLY 428 #if defined(PNG_FLOATING_POINT_SUPPORTED) ||\ 429 defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) 439 # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ 440 defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) 445 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) 451 # if defined(_AMIGA) && defined(__SASC) && defined(_M68881) 460 #if defined(__TURBOC__) && defined(__MSDOS__) 465 #if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ 466 defined(_WIN32) || defined(__WIN32__) 467 # include <windows.h> 479 # define PNG_ABORT() ExitProcess(0) 481 # define PNG_ABORT() abort() 486 #define PNG_ALIGN_NONE 0 487 #define PNG_ALIGN_ALWAYS 1 489 # define PNG_ALIGN_OFFSET 2 491 # define PNG_ALIGN_OFFSET -1 493 #define PNG_ALIGN_SIZE 3 495 #ifndef PNG_ALIGN_TYPE 500 # define PNG_ALIGN_TYPE PNG_ALIGN_SIZE 503 #if PNG_ALIGN_TYPE == PNG_ALIGN_SIZE 510 # define png_alignof(type) (sizeof (type)) 512 # if PNG_ALIGN_TYPE == PNG_ALIGN_OFFSET 513 # define png_alignof(type) offsetof(struct{char c; type t;}, t) 515 # if PNG_ALIGN_TYPE == PNG_ALIGN_ALWAYS 516 # define png_alignof(type) (1) 524 # define png_isaligned(ptr, type)\ 525 ((((const char*)ptr-(const char*)0) & (png_alignof(type)-1)) == 0) 527 # define png_isaligned(ptr, type) 0 544 #define PNG_HAVE_IDAT 0x04 546 #define PNG_HAVE_IEND 0x10 550 #define PNG_HAVE_CHUNK_HEADER 0x100 551 #define PNG_WROTE_tIME 0x200 552 #define PNG_WROTE_INFO_BEFORE_PLTE 0x400 553 #define PNG_BACKGROUND_IS_GRAY 0x800 554 #define PNG_HAVE_PNG_SIGNATURE 0x1000 555 #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 557 #define PNG_IS_READ_STRUCT 0x8000 560 #define PNG_BGR 0x0001 561 #define PNG_INTERLACE 0x0002 562 #define PNG_PACK 0x0004 563 #define PNG_SHIFT 0x0008 564 #define PNG_SWAP_BYTES 0x0010 565 #define PNG_INVERT_MONO 0x0020 566 #define PNG_QUANTIZE 0x0040 567 #define PNG_COMPOSE 0x0080 568 #define PNG_BACKGROUND_EXPAND 0x0100 569 #define PNG_EXPAND_16 0x0200 570 #define PNG_16_TO_8 0x0400 571 #define PNG_RGBA 0x0800 572 #define PNG_EXPAND 0x1000 573 #define PNG_GAMMA 0x2000 574 #define PNG_GRAY_TO_RGB 0x4000 575 #define PNG_FILLER 0x8000 576 #define PNG_PACKSWAP 0x10000 577 #define PNG_SWAP_ALPHA 0x20000 578 #define PNG_STRIP_ALPHA 0x40000 579 #define PNG_INVERT_ALPHA 0x80000 580 #define PNG_USER_TRANSFORM 0x100000 581 #define PNG_RGB_TO_GRAY_ERR 0x200000 582 #define PNG_RGB_TO_GRAY_WARN 0x400000 583 #define PNG_RGB_TO_GRAY 0x600000 584 #define PNG_ENCODE_ALPHA 0x800000 585 #define PNG_ADD_ALPHA 0x1000000 586 #define PNG_EXPAND_tRNS 0x2000000 587 #define PNG_SCALE_16_TO_8 0x4000000 593 #define PNG_STRUCT_PNG 0x0001 594 #define PNG_STRUCT_INFO 0x0002 597 #define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) 598 #define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) 601 #define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 602 #define PNG_FLAG_ZSTREAM_INITIALIZED 0x0002 604 #define PNG_FLAG_ZSTREAM_ENDED 0x0008 607 #define PNG_FLAG_ROW_INIT 0x0040 608 #define PNG_FLAG_FILLER_AFTER 0x0080 609 #define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 610 #define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 611 #define PNG_FLAG_CRC_CRITICAL_USE 0x0400 612 #define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 613 #define PNG_FLAG_ASSUME_sRGB 0x1000 614 #define PNG_FLAG_OPTIMIZE_ALPHA 0x2000 615 #define PNG_FLAG_DETECT_UNINITIALIZED 0x4000 618 #define PNG_FLAG_LIBRARY_MISMATCH 0x20000 619 #define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000 620 #define PNG_FLAG_STRIP_ERROR_TEXT 0x80000 621 #define PNG_FLAG_BENIGN_ERRORS_WARN 0x100000 622 #define PNG_FLAG_APP_WARNINGS_WARN 0x200000 623 #define PNG_FLAG_APP_ERRORS_WARN 0x400000 633 #define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ 634 PNG_FLAG_CRC_ANCILLARY_NOWARN) 636 #define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ 637 PNG_FLAG_CRC_CRITICAL_IGNORE) 639 #define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ 640 PNG_FLAG_CRC_CRITICAL_MASK) 644 #define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ 645 abs((int)((c1).green) - (int)((c2).green)) + \ 646 abs((int)((c1).blue) - (int)((c2).blue))) 656 #define PNG_DIV65535(v24) (((v24) + 32895) >> 16) 657 #define PNG_DIV257(v16) PNG_DIV65535((png_uint_32)(v16) * 255) 660 #define PNG_ROWBYTES(pixel_bits, width) \ 661 ((pixel_bits) >= 8 ? \ 662 ((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \ 663 (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) ) 670 #define PNG_OUT_OF_RANGE(value, ideal, delta) \ 671 ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) 677 #ifdef PNG_FLOATING_POINT_SUPPORTED 685 #define png_float(png_ptr, fixed, s) (.00001 * (fixed)) 703 #ifdef PNG_FIXED_POINT_MACRO_SUPPORTED 704 #define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\ 705 ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0)) 725 #define PNG_32b(b,s) ((png_uint_32)(b) << (s)) 726 #define PNG_U32(b1,b2,b3,b4) \ 727 (PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0)) 752 #define png_IDAT PNG_U32( 73, 68, 65, 84) 753 #define png_IEND PNG_U32( 73, 69, 78, 68) 754 #define png_IHDR PNG_U32( 73, 72, 68, 82) 755 #define png_PLTE PNG_U32( 80, 76, 84, 69) 756 #define png_bKGD PNG_U32( 98, 75, 71, 68) 757 #define png_cHRM PNG_U32( 99, 72, 82, 77) 758 #define png_fRAc PNG_U32(102, 82, 65, 99) 759 #define png_gAMA PNG_U32(103, 65, 77, 65) 760 #define png_gIFg PNG_U32(103, 73, 70, 103) 761 #define png_gIFt PNG_U32(103, 73, 70, 116) 762 #define png_gIFx PNG_U32(103, 73, 70, 120) 763 #define png_hIST PNG_U32(104, 73, 83, 84) 764 #define png_iCCP PNG_U32(105, 67, 67, 80) 765 #define png_iTXt PNG_U32(105, 84, 88, 116) 766 #define png_oFFs PNG_U32(111, 70, 70, 115) 767 #define png_pCAL PNG_U32(112, 67, 65, 76) 768 #define png_pHYs PNG_U32(112, 72, 89, 115) 769 #define png_sBIT PNG_U32(115, 66, 73, 84) 770 #define png_sCAL PNG_U32(115, 67, 65, 76) 771 #define png_sPLT PNG_U32(115, 80, 76, 84) 772 #define png_sRGB PNG_U32(115, 82, 71, 66) 773 #define png_sTER PNG_U32(115, 84, 69, 82) 774 #define png_tEXt PNG_U32(116, 69, 88, 116) 775 #define png_tIME PNG_U32(116, 73, 77, 69) 776 #define png_tRNS PNG_U32(116, 82, 78, 83) 777 #define png_zTXt PNG_U32(122, 84, 88, 116) 782 #define PNG_CHUNK_FROM_STRING(s)\ 783 PNG_U32(0xff&(s)[0], 0xff&(s)[1], 0xff&(s)[2], 0xff&(s)[3]) 789 #define PNG_STRING_FROM_CHUNK(s,c)\ 790 (void)(((char*)(s))[0]=(char)((c)>>24), ((char*)(s))[1]=(char)((c)>>16),\ 791 ((char*)(s))[2]=(char)((c)>>8), ((char*)(s))[3]=(char)((c))) 794 #define PNG_CSTRING_FROM_CHUNK(s,c)\ 795 (void)(PNG_STRING_FROM_CHUNK(s,c), ((char*)(s))[4] = 0) 798 #define PNG_CHUNK_ANCILLARY(c) (1 & ((c) >> 29)) 799 #define PNG_CHUNK_CRITICAL(c) (!PNG_CHUNK_ANCILLARY(c)) 800 #define PNG_CHUNK_PRIVATE(c) (1 & ((c) >> 21)) 801 #define PNG_CHUNK_RESERVED(c) (1 & ((c) >> 13)) 802 #define PNG_CHUNK_SAFE_TO_COPY(c) (1 & ((c) >> 5)) 805 #define PNG_GAMMA_MAC_OLD 151724 806 #define PNG_GAMMA_MAC_INVERSE 65909 807 #define PNG_GAMMA_sRGB_INVERSE 45455 812 #ifndef PNG_VERSION_INFO_ONLY 814 #include "pngstruct.h" 820 #if PNG_ZLIB_VERNUM != 0 && PNG_ZLIB_VERNUM != ZLIB_VERNUM 821 # error ZLIB_VERNUM != PNG_ZLIB_VERNUM \ 822 "-I (include path) error: see the notes in pngpriv.h" 838 typedef const png_uint_16p * png_const_uint_16pp;
841 #if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ 842 defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) 843 #ifdef PNG_SIMPLIFIED_READ_SUPPORTED 844 PNG_INTERNAL_DATA(
const png_uint_16, png_sRGB_table, [256]);
850 PNG_INTERNAL_DATA(
const png_uint_16, png_sRGB_base, [512]);
851 PNG_INTERNAL_DATA(
const png_byte, png_sRGB_delta, [512]);
853 #define PNG_sRGB_FROM_LINEAR(linear) ((png_byte)((png_sRGB_base[(linear)>>15] +\ 854 ((((linear)&0x7fff)*png_sRGB_delta[(linear)>>15])>>12)) >> 8)) 873 #define PNG_UNEXPECTED_ZLIB_RETURN (-7) 874 PNG_INTERNAL_FUNCTION(
void, png_zstream_error,(png_structrp png_ptr,
int ret),
880 #ifdef PNG_WRITE_SUPPORTED 881 PNG_INTERNAL_FUNCTION(
void,png_free_buffer_list,(png_structrp png_ptr,
882 png_compression_bufferp *list),PNG_EMPTY);
886 #if defined(PNG_FLOATING_POINT_SUPPORTED) && \ 887 !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \ 888 (defined(PNG_gAMA_SUPPORTED) || defined(PNG_cHRM_SUPPORTED) || \ 889 defined(PNG_sCAL_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) || \ 890 defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) || \ 891 (defined(PNG_sCAL_SUPPORTED) && \ 892 defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)) 893 PNG_INTERNAL_FUNCTION(png_fixed_point,png_fixed,(png_const_structrp png_ptr,
894 double fp, png_const_charp text),PNG_EMPTY);
900 PNG_INTERNAL_FUNCTION(
int,png_user_version_check,(png_structrp png_ptr,
901 png_const_charp user_png_ver),PNG_EMPTY);
907 PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_base,(png_const_structrp png_ptr,
908 png_alloc_size_t size),PNG_ALLOCATED);
910 #if defined(PNG_TEXT_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) ||\ 911 defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) 915 PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_array,(png_const_structrp png_ptr,
916 int nelements,
size_t element_size),PNG_ALLOCATED);
922 PNG_INTERNAL_FUNCTION(png_voidp,png_realloc_array,(png_const_structrp png_ptr,
923 png_const_voidp array,
int old_elements,
int add_elements,
924 size_t element_size),PNG_ALLOCATED);
933 PNG_INTERNAL_FUNCTION(
png_structp,png_create_png_struct,
934 (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
935 png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn,
936 png_free_ptr free_fn),PNG_ALLOCATED);
939 PNG_INTERNAL_FUNCTION(
void,png_destroy_png_struct,(png_structrp png_ptr),
943 PNG_INTERNAL_FUNCTION(
void,png_free_jmpbuf,(png_structrp png_ptr),PNG_EMPTY);
946 PNG_INTERNAL_FUNCTION(voidpf,png_zalloc,(voidpf png_ptr, uInt items, uInt size),
950 PNG_INTERNAL_FUNCTION(
void,png_zfree,(voidpf png_ptr, voidpf ptr),PNG_EMPTY);
957 PNG_INTERNAL_FUNCTION(
void PNGCBAPI,png_default_read_data,(
png_structp png_ptr,
958 png_bytep data, png_size_t length),PNG_EMPTY);
960 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED 961 PNG_INTERNAL_FUNCTION(
void PNGCBAPI,png_push_fill_buffer,(
png_structp png_ptr,
962 png_bytep buffer, png_size_t length),PNG_EMPTY);
965 PNG_INTERNAL_FUNCTION(
void PNGCBAPI,png_default_write_data,(
png_structp png_ptr,
966 png_bytep data, png_size_t length),PNG_EMPTY);
968 #ifdef PNG_WRITE_FLUSH_SUPPORTED 969 # ifdef PNG_STDIO_SUPPORTED 970 PNG_INTERNAL_FUNCTION(
void PNGCBAPI,png_default_flush,(
png_structp png_ptr),
976 PNG_INTERNAL_FUNCTION(
void,png_reset_crc,(png_structrp png_ptr),PNG_EMPTY);
979 PNG_INTERNAL_FUNCTION(
void,png_write_data,(png_structrp png_ptr,
980 png_const_bytep data, png_size_t length),PNG_EMPTY);
983 PNG_INTERNAL_FUNCTION(
void,png_read_sig,(png_structrp png_ptr,
984 png_inforp info_ptr),PNG_EMPTY);
987 PNG_INTERNAL_FUNCTION(png_uint_32,png_read_chunk_header,(png_structrp png_ptr),
991 PNG_INTERNAL_FUNCTION(
void,png_read_data,(png_structrp png_ptr, png_bytep data,
992 png_size_t length),PNG_EMPTY);
995 PNG_INTERNAL_FUNCTION(
void,png_crc_read,(png_structrp png_ptr, png_bytep buf,
996 png_uint_32 length),PNG_EMPTY);
999 PNG_INTERNAL_FUNCTION(
int,png_crc_finish,(png_structrp png_ptr,
1000 png_uint_32 skip),PNG_EMPTY);
1003 PNG_INTERNAL_FUNCTION(
int,png_crc_error,(png_structrp png_ptr),PNG_EMPTY);
1009 PNG_INTERNAL_FUNCTION(
void,png_calculate_crc,(png_structrp png_ptr,
1010 png_const_bytep ptr, png_size_t length),PNG_EMPTY);
1012 #ifdef PNG_WRITE_FLUSH_SUPPORTED 1013 PNG_INTERNAL_FUNCTION(
void,png_flush,(png_structrp png_ptr),PNG_EMPTY);
1021 PNG_INTERNAL_FUNCTION(
void,png_write_IHDR,(png_structrp png_ptr,
1022 png_uint_32 width, png_uint_32 height,
int bit_depth,
int color_type,
1023 int compression_method,
int filter_method,
int interlace_method),PNG_EMPTY);
1025 PNG_INTERNAL_FUNCTION(
void,png_write_PLTE,(png_structrp png_ptr,
1028 PNG_INTERNAL_FUNCTION(
void,png_compress_IDAT,(png_structrp png_ptr,
1029 png_const_bytep row_data, png_alloc_size_t row_data_length,
int flush),
1032 PNG_INTERNAL_FUNCTION(
void,png_write_IEND,(png_structrp png_ptr),PNG_EMPTY);
1034 #ifdef PNG_WRITE_gAMA_SUPPORTED 1035 PNG_INTERNAL_FUNCTION(
void,png_write_gAMA_fixed,(png_structrp png_ptr,
1036 png_fixed_point file_gamma),PNG_EMPTY);
1039 #ifdef PNG_WRITE_sBIT_SUPPORTED 1040 PNG_INTERNAL_FUNCTION(
void,png_write_sBIT,(png_structrp png_ptr,
1044 #ifdef PNG_WRITE_cHRM_SUPPORTED 1045 PNG_INTERNAL_FUNCTION(
void,png_write_cHRM_fixed,(png_structrp png_ptr,
1046 const png_xy *xy), PNG_EMPTY);
1050 #ifdef PNG_WRITE_sRGB_SUPPORTED 1051 PNG_INTERNAL_FUNCTION(
void,png_write_sRGB,(png_structrp png_ptr,
1052 int intent),PNG_EMPTY);
1055 #ifdef PNG_WRITE_iCCP_SUPPORTED 1056 PNG_INTERNAL_FUNCTION(
void,png_write_iCCP,(png_structrp png_ptr,
1057 png_const_charp name, png_const_bytep profile), PNG_EMPTY);
1064 #ifdef PNG_WRITE_sPLT_SUPPORTED 1065 PNG_INTERNAL_FUNCTION(
void,png_write_sPLT,(png_structrp png_ptr,
1069 #ifdef PNG_WRITE_tRNS_SUPPORTED 1070 PNG_INTERNAL_FUNCTION(
void,png_write_tRNS,(png_structrp png_ptr,
1072 int color_type),PNG_EMPTY);
1075 #ifdef PNG_WRITE_bKGD_SUPPORTED 1076 PNG_INTERNAL_FUNCTION(
void,png_write_bKGD,(png_structrp png_ptr,
1080 #ifdef PNG_WRITE_hIST_SUPPORTED 1081 PNG_INTERNAL_FUNCTION(
void,png_write_hIST,(png_structrp png_ptr,
1082 png_const_uint_16p hist,
int num_hist),PNG_EMPTY);
1086 #ifdef PNG_WRITE_tEXt_SUPPORTED 1087 PNG_INTERNAL_FUNCTION(
void,png_write_tEXt,(png_structrp png_ptr,
1088 png_const_charp key, png_const_charp text, png_size_t text_len),PNG_EMPTY);
1091 #ifdef PNG_WRITE_zTXt_SUPPORTED 1092 PNG_INTERNAL_FUNCTION(
void,png_write_zTXt,(png_structrp png_ptr, png_const_charp
1093 key, png_const_charp text,
int compression),PNG_EMPTY);
1096 #ifdef PNG_WRITE_iTXt_SUPPORTED 1097 PNG_INTERNAL_FUNCTION(
void,png_write_iTXt,(png_structrp png_ptr,
1098 int compression, png_const_charp key, png_const_charp lang,
1099 png_const_charp lang_key, png_const_charp text),PNG_EMPTY);
1102 #ifdef PNG_TEXT_SUPPORTED 1103 PNG_INTERNAL_FUNCTION(
int,png_set_text_2,(png_const_structrp png_ptr,
1104 png_inforp info_ptr,
png_const_textp text_ptr,
int num_text),PNG_EMPTY);
1107 #ifdef PNG_WRITE_oFFs_SUPPORTED 1108 PNG_INTERNAL_FUNCTION(
void,png_write_oFFs,(png_structrp png_ptr,
1109 png_int_32 x_offset, png_int_32 y_offset,
int unit_type),PNG_EMPTY);
1112 #ifdef PNG_WRITE_pCAL_SUPPORTED 1113 PNG_INTERNAL_FUNCTION(
void,png_write_pCAL,(png_structrp png_ptr,
1114 png_charp purpose, png_int_32 X0, png_int_32 X1,
int type,
int nparams,
1115 png_const_charp units, png_charpp params),PNG_EMPTY);
1118 #ifdef PNG_WRITE_pHYs_SUPPORTED 1119 PNG_INTERNAL_FUNCTION(
void,png_write_pHYs,(png_structrp png_ptr,
1120 png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
1121 int unit_type),PNG_EMPTY);
1124 #ifdef PNG_WRITE_tIME_SUPPORTED 1125 PNG_INTERNAL_FUNCTION(
void,png_write_tIME,(png_structrp png_ptr,
1129 #ifdef PNG_WRITE_sCAL_SUPPORTED 1130 PNG_INTERNAL_FUNCTION(
void,png_write_sCAL_s,(png_structrp png_ptr,
1131 int unit, png_const_charp width, png_const_charp height),PNG_EMPTY);
1135 PNG_INTERNAL_FUNCTION(
void,png_write_finish_row,(png_structrp png_ptr),
1139 PNG_INTERNAL_FUNCTION(
void,png_write_start_row,(png_structrp png_ptr),
1165 #ifndef PNG_USE_COMPILE_TIME_MASKS 1166 # define PNG_USE_COMPILE_TIME_MASKS 1 1168 PNG_INTERNAL_FUNCTION(
void,png_combine_row,(png_const_structrp png_ptr,
1169 png_bytep row,
int display),PNG_EMPTY);
1171 #ifdef PNG_READ_INTERLACING_SUPPORTED 1178 PNG_INTERNAL_FUNCTION(
void,png_do_read_interlace,(
png_row_infop row_info,
1179 png_bytep row,
int pass, png_uint_32 transformations),PNG_EMPTY);
1184 #ifdef PNG_WRITE_INTERLACING_SUPPORTED 1186 PNG_INTERNAL_FUNCTION(
void,png_do_write_interlace,(
png_row_infop row_info,
1187 png_bytep row,
int pass),PNG_EMPTY);
1193 PNG_INTERNAL_FUNCTION(
void,png_read_filter_row,(png_structrp pp,
png_row_infop 1194 row_info, png_bytep row, png_const_bytep prev_row,
int filter),PNG_EMPTY);
1196 PNG_INTERNAL_FUNCTION(
void,png_read_filter_row_up_neon,(
png_row_infop row_info,
1197 png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
1198 PNG_INTERNAL_FUNCTION(
void,png_read_filter_row_sub3_neon,(
png_row_infop 1199 row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
1200 PNG_INTERNAL_FUNCTION(
void,png_read_filter_row_sub4_neon,(
png_row_infop 1201 row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
1202 PNG_INTERNAL_FUNCTION(
void,png_read_filter_row_avg3_neon,(
png_row_infop 1203 row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
1204 PNG_INTERNAL_FUNCTION(
void,png_read_filter_row_avg4_neon,(
png_row_infop 1205 row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
1206 PNG_INTERNAL_FUNCTION(
void,png_read_filter_row_paeth3_neon,(
png_row_infop 1207 row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
1208 PNG_INTERNAL_FUNCTION(
void,png_read_filter_row_paeth4_neon,(
png_row_infop 1209 row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY);
1212 PNG_INTERNAL_FUNCTION(
void,png_write_find_filter,(png_structrp png_ptr,
1215 #ifdef PNG_SEQUENTIAL_READ_SUPPORTED 1216 PNG_INTERNAL_FUNCTION(
void,png_read_IDAT_data,(png_structrp png_ptr,
1217 png_bytep output, png_alloc_size_t avail_out),PNG_EMPTY);
1223 PNG_INTERNAL_FUNCTION(
void,png_read_finish_IDAT,(png_structrp png_ptr),
1229 PNG_INTERNAL_FUNCTION(
void,png_read_finish_row,(png_structrp png_ptr),
1235 PNG_INTERNAL_FUNCTION(
void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY);
1237 #ifdef PNG_READ_TRANSFORMS_SUPPORTED 1239 PNG_INTERNAL_FUNCTION(
void,png_read_transform_info,(png_structrp png_ptr,
1240 png_inforp info_ptr),PNG_EMPTY);
1244 #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ 1245 defined(PNG_READ_STRIP_ALPHA_SUPPORTED) 1246 PNG_INTERNAL_FUNCTION(
void,png_do_strip_channel,(
png_row_infop row_info,
1247 png_bytep row,
int at_start),PNG_EMPTY);
1250 #ifdef PNG_16BIT_SUPPORTED 1251 #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) 1252 PNG_INTERNAL_FUNCTION(
void,png_do_swap,(
png_row_infop row_info,
1253 png_bytep row),PNG_EMPTY);
1257 #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ 1258 defined(PNG_WRITE_PACKSWAP_SUPPORTED) 1259 PNG_INTERNAL_FUNCTION(
void,png_do_packswap,(
png_row_infop row_info,
1260 png_bytep row),PNG_EMPTY);
1263 #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) 1264 PNG_INTERNAL_FUNCTION(
void,png_do_invert,(
png_row_infop row_info,
1265 png_bytep row),PNG_EMPTY);
1268 #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) 1269 PNG_INTERNAL_FUNCTION(
void,png_do_bgr,(
png_row_infop row_info,
1270 png_bytep row),PNG_EMPTY);
1278 PNG_INTERNAL_FUNCTION(
void,png_handle_IHDR,(png_structrp png_ptr,
1279 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1280 PNG_INTERNAL_FUNCTION(
void,png_handle_PLTE,(png_structrp png_ptr,
1281 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1282 PNG_INTERNAL_FUNCTION(
void,png_handle_IEND,(png_structrp png_ptr,
1283 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1285 #ifdef PNG_READ_bKGD_SUPPORTED 1286 PNG_INTERNAL_FUNCTION(
void,png_handle_bKGD,(png_structrp png_ptr,
1287 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1290 #ifdef PNG_READ_cHRM_SUPPORTED 1291 PNG_INTERNAL_FUNCTION(
void,png_handle_cHRM,(png_structrp png_ptr,
1292 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1295 #ifdef PNG_READ_gAMA_SUPPORTED 1296 PNG_INTERNAL_FUNCTION(
void,png_handle_gAMA,(png_structrp png_ptr,
1297 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1300 #ifdef PNG_READ_hIST_SUPPORTED 1301 PNG_INTERNAL_FUNCTION(
void,png_handle_hIST,(png_structrp png_ptr,
1302 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1305 #ifdef PNG_READ_iCCP_SUPPORTED 1306 PNG_INTERNAL_FUNCTION(
void,png_handle_iCCP,(png_structrp png_ptr,
1307 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1310 #ifdef PNG_READ_iTXt_SUPPORTED 1311 PNG_INTERNAL_FUNCTION(
void,png_handle_iTXt,(png_structrp png_ptr,
1312 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1315 #ifdef PNG_READ_oFFs_SUPPORTED 1316 PNG_INTERNAL_FUNCTION(
void,png_handle_oFFs,(png_structrp png_ptr,
1317 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1320 #ifdef PNG_READ_pCAL_SUPPORTED 1321 PNG_INTERNAL_FUNCTION(
void,png_handle_pCAL,(png_structrp png_ptr,
1322 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1325 #ifdef PNG_READ_pHYs_SUPPORTED 1326 PNG_INTERNAL_FUNCTION(
void,png_handle_pHYs,(png_structrp png_ptr,
1327 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1330 #ifdef PNG_READ_sBIT_SUPPORTED 1331 PNG_INTERNAL_FUNCTION(
void,png_handle_sBIT,(png_structrp png_ptr,
1332 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1335 #ifdef PNG_READ_sCAL_SUPPORTED 1336 PNG_INTERNAL_FUNCTION(
void,png_handle_sCAL,(png_structrp png_ptr,
1337 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1340 #ifdef PNG_READ_sPLT_SUPPORTED 1341 PNG_INTERNAL_FUNCTION(
void,png_handle_sPLT,(png_structrp png_ptr,
1342 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1345 #ifdef PNG_READ_sRGB_SUPPORTED 1346 PNG_INTERNAL_FUNCTION(
void,png_handle_sRGB,(png_structrp png_ptr,
1347 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1350 #ifdef PNG_READ_tEXt_SUPPORTED 1351 PNG_INTERNAL_FUNCTION(
void,png_handle_tEXt,(png_structrp png_ptr,
1352 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1355 #ifdef PNG_READ_tIME_SUPPORTED 1356 PNG_INTERNAL_FUNCTION(
void,png_handle_tIME,(png_structrp png_ptr,
1357 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1360 #ifdef PNG_READ_tRNS_SUPPORTED 1361 PNG_INTERNAL_FUNCTION(
void,png_handle_tRNS,(png_structrp png_ptr,
1362 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1365 #ifdef PNG_READ_zTXt_SUPPORTED 1366 PNG_INTERNAL_FUNCTION(
void,png_handle_zTXt,(png_structrp png_ptr,
1367 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1370 PNG_INTERNAL_FUNCTION(
void,png_check_chunk_name,(png_structrp png_ptr,
1371 png_uint_32 chunk_name),PNG_EMPTY);
1373 PNG_INTERNAL_FUNCTION(
void,png_handle_unknown,(png_structrp png_ptr,
1374 png_inforp info_ptr, png_uint_32 length,
int keep),PNG_EMPTY);
1381 #if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) ||\ 1382 defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) 1383 PNG_INTERNAL_FUNCTION(
int,png_chunk_unknown_handling,
1384 (png_const_structrp png_ptr, png_uint_32 chunk_name),PNG_EMPTY);
1391 #ifdef PNG_READ_TRANSFORMS_SUPPORTED 1392 PNG_INTERNAL_FUNCTION(
void,png_do_read_transformations,(png_structrp png_ptr,
1395 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED 1396 PNG_INTERNAL_FUNCTION(
void,png_do_write_transformations,(png_structrp png_ptr,
1400 #ifdef PNG_READ_TRANSFORMS_SUPPORTED 1401 PNG_INTERNAL_FUNCTION(
void,png_init_read_transformations,(png_structrp png_ptr),
1405 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED 1406 PNG_INTERNAL_FUNCTION(
void,png_push_read_chunk,(png_structrp png_ptr,
1407 png_inforp info_ptr),PNG_EMPTY);
1408 PNG_INTERNAL_FUNCTION(
void,png_push_read_sig,(png_structrp png_ptr,
1409 png_inforp info_ptr),PNG_EMPTY);
1410 PNG_INTERNAL_FUNCTION(
void,png_push_check_crc,(png_structrp png_ptr),PNG_EMPTY);
1411 PNG_INTERNAL_FUNCTION(
void,png_push_crc_skip,(png_structrp png_ptr,
1412 png_uint_32 length),PNG_EMPTY);
1413 PNG_INTERNAL_FUNCTION(
void,png_push_crc_finish,(png_structrp png_ptr),
1415 PNG_INTERNAL_FUNCTION(
void,png_push_save_buffer,(png_structrp png_ptr),
1417 PNG_INTERNAL_FUNCTION(
void,png_push_restore_buffer,(png_structrp png_ptr,
1418 png_bytep buffer, png_size_t buffer_length),PNG_EMPTY);
1419 PNG_INTERNAL_FUNCTION(
void,png_push_read_IDAT,(png_structrp png_ptr),PNG_EMPTY);
1420 PNG_INTERNAL_FUNCTION(
void,png_process_IDAT_data,(png_structrp png_ptr,
1421 png_bytep buffer, png_size_t buffer_length),PNG_EMPTY);
1422 PNG_INTERNAL_FUNCTION(
void,png_push_process_row,(png_structrp png_ptr),
1424 PNG_INTERNAL_FUNCTION(
void,png_push_handle_unknown,(png_structrp png_ptr,
1425 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1426 PNG_INTERNAL_FUNCTION(
void,png_push_have_info,(png_structrp png_ptr,
1427 png_inforp info_ptr),PNG_EMPTY);
1428 PNG_INTERNAL_FUNCTION(
void,png_push_have_end,(png_structrp png_ptr,
1429 png_inforp info_ptr),PNG_EMPTY);
1430 PNG_INTERNAL_FUNCTION(
void,png_push_have_row,(png_structrp png_ptr,
1431 png_bytep row),PNG_EMPTY);
1432 PNG_INTERNAL_FUNCTION(
void,png_push_read_end,(png_structrp png_ptr,
1433 png_inforp info_ptr),PNG_EMPTY);
1434 PNG_INTERNAL_FUNCTION(
void,png_process_some_data,(png_structrp png_ptr,
1435 png_inforp info_ptr),PNG_EMPTY);
1436 PNG_INTERNAL_FUNCTION(
void,png_read_push_finish_row,(png_structrp png_ptr),
1438 # ifdef PNG_READ_tEXt_SUPPORTED 1439 PNG_INTERNAL_FUNCTION(
void,png_push_handle_tEXt,(png_structrp png_ptr,
1440 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1441 PNG_INTERNAL_FUNCTION(
void,png_push_read_tEXt,(png_structrp png_ptr,
1442 png_inforp info_ptr),PNG_EMPTY);
1444 # ifdef PNG_READ_zTXt_SUPPORTED 1445 PNG_INTERNAL_FUNCTION(
void,png_push_handle_zTXt,(png_structrp png_ptr,
1446 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1447 PNG_INTERNAL_FUNCTION(
void,png_push_read_zTXt,(png_structrp png_ptr,
1448 png_inforp info_ptr),PNG_EMPTY);
1450 # ifdef PNG_READ_iTXt_SUPPORTED 1451 PNG_INTERNAL_FUNCTION(
void,png_push_handle_iTXt,(png_structrp png_ptr,
1452 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
1453 PNG_INTERNAL_FUNCTION(
void,png_push_read_iTXt,(png_structrp png_ptr,
1454 png_inforp info_ptr),PNG_EMPTY);
1460 #ifdef PNG_GAMMA_SUPPORTED 1461 PNG_INTERNAL_FUNCTION(
void,png_colorspace_set_gamma,(png_const_structrp png_ptr,
1462 png_colorspacerp colorspace, png_fixed_point gAMA), PNG_EMPTY);
1468 PNG_INTERNAL_FUNCTION(
void,png_colorspace_sync_info,(png_const_structrp png_ptr,
1469 png_inforp info_ptr), PNG_EMPTY);
1472 PNG_INTERNAL_FUNCTION(
void,png_colorspace_sync,(png_const_structrp png_ptr,
1473 png_inforp info_ptr), PNG_EMPTY);
1480 #ifdef PNG_COLORSPACE_SUPPORTED 1484 PNG_INTERNAL_FUNCTION(
int,png_colorspace_set_chromaticities,
1485 (png_const_structrp png_ptr, png_colorspacerp colorspace,
const png_xy *xy,
1486 int preferred), PNG_EMPTY);
1488 PNG_INTERNAL_FUNCTION(
int,png_colorspace_set_endpoints,
1489 (png_const_structrp png_ptr, png_colorspacerp colorspace,
const png_XYZ *XYZ,
1490 int preferred), PNG_EMPTY);
1492 #ifdef PNG_sRGB_SUPPORTED 1493 PNG_INTERNAL_FUNCTION(
int,png_colorspace_set_sRGB,(png_const_structrp png_ptr,
1494 png_colorspacerp colorspace,
int intent), PNG_EMPTY);
1502 #ifdef PNG_iCCP_SUPPORTED 1503 PNG_INTERNAL_FUNCTION(
int,png_colorspace_set_ICC,(png_const_structrp png_ptr,
1504 png_colorspacerp colorspace, png_const_charp name,
1505 png_uint_32 profile_length, png_const_bytep profile,
int color_type),
1510 PNG_INTERNAL_FUNCTION(
int,png_icc_check_length,(png_const_structrp png_ptr,
1511 png_colorspacerp colorspace, png_const_charp name,
1512 png_uint_32 profile_length), PNG_EMPTY);
1513 PNG_INTERNAL_FUNCTION(
int,png_icc_check_header,(png_const_structrp png_ptr,
1514 png_colorspacerp colorspace, png_const_charp name,
1515 png_uint_32 profile_length,
1516 png_const_bytep profile ,
int color_type),
1518 PNG_INTERNAL_FUNCTION(
int,png_icc_check_tag_table,(png_const_structrp png_ptr,
1519 png_colorspacerp colorspace, png_const_charp name,
1520 png_uint_32 profile_length,
1521 png_const_bytep profile ), PNG_EMPTY);
1522 #ifdef PNG_sRGB_SUPPORTED 1523 PNG_INTERNAL_FUNCTION(
void,png_icc_set_sRGB,(
1524 png_const_structrp png_ptr, png_colorspacerp colorspace,
1525 png_const_bytep profile, uLong adler), PNG_EMPTY);
1533 #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED 1534 PNG_INTERNAL_FUNCTION(
void,png_colorspace_set_rgb_coefficients,
1535 (png_structrp png_ptr), PNG_EMPTY);
1541 PNG_INTERNAL_FUNCTION(
void,png_check_IHDR,(png_const_structrp png_ptr,
1542 png_uint_32 width, png_uint_32 height,
int bit_depth,
1543 int color_type,
int interlace_type,
int compression_type,
1544 int filter_type),PNG_EMPTY);
1547 #if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \ 1548 defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED) 1549 PNG_INTERNAL_FUNCTION(
void,png_do_check_palette_indexes,
1553 #if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) 1554 PNG_INTERNAL_FUNCTION(
void,png_fixed_error,(png_const_structrp png_ptr,
1555 png_const_charp name),PNG_NORETURN);
1562 PNG_INTERNAL_FUNCTION(
size_t,png_safecat,(png_charp buffer,
size_t bufsize,
1563 size_t pos, png_const_charp
string),PNG_EMPTY);
1568 #if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED) 1574 PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start,
1575 png_charp end,
int format, png_alloc_size_t number),PNG_EMPTY);
1578 #define PNG_FORMAT_NUMBER(buffer,format,number) \ 1579 png_format_number(buffer, buffer + (sizeof buffer), format, number) 1582 #define PNG_NUMBER_BUFFER_SIZE 24 1587 #define PNG_NUMBER_FORMAT_u 1 1588 #define PNG_NUMBER_FORMAT_02u 2 1589 #define PNG_NUMBER_FORMAT_d 1 1590 #define PNG_NUMBER_FORMAT_02d 2 1591 #define PNG_NUMBER_FORMAT_x 3 1592 #define PNG_NUMBER_FORMAT_02x 4 1593 #define PNG_NUMBER_FORMAT_fixed 5 1596 #ifdef PNG_WARNINGS_SUPPORTED 1598 # define PNG_WARNING_PARAMETER_SIZE 32 1599 # define PNG_WARNING_PARAMETER_COUNT 8 1604 typedef char png_warning_parameters[PNG_WARNING_PARAMETER_COUNT][
1605 PNG_WARNING_PARAMETER_SIZE];
1607 PNG_INTERNAL_FUNCTION(
void,png_warning_parameter,(png_warning_parameters p,
1608 int number, png_const_charp
string),PNG_EMPTY);
1612 PNG_INTERNAL_FUNCTION(
void,png_warning_parameter_unsigned,
1613 (png_warning_parameters p,
int number,
int format, png_alloc_size_t value),
1618 PNG_INTERNAL_FUNCTION(
void,png_warning_parameter_signed,
1619 (png_warning_parameters p,
int number,
int format, png_int_32 value),
1622 PNG_INTERNAL_FUNCTION(
void,png_formatted_warning,(png_const_structrp png_ptr,
1623 png_warning_parameters p, png_const_charp message),PNG_EMPTY);
1630 #ifdef PNG_BENIGN_ERRORS_SUPPORTED 1645 PNG_INTERNAL_FUNCTION(
void,png_app_warning,(png_const_structrp png_ptr,
1646 png_const_charp message),PNG_EMPTY);
1651 PNG_INTERNAL_FUNCTION(
void,png_app_error,(png_const_structrp png_ptr,
1652 png_const_charp message),PNG_EMPTY);
1657 # define png_app_warning(pp,s) png_warning(pp,s) 1658 # define png_app_error(pp,s) png_error(pp,s) 1661 PNG_INTERNAL_FUNCTION(
void,png_chunk_report,(png_const_structrp png_ptr,
1662 png_const_charp message,
int error),PNG_EMPTY);
1672 #define PNG_CHUNK_WARNING 0 1673 #define PNG_CHUNK_WRITE_ERROR 1 1674 #define PNG_CHUNK_ERROR 2 1679 #if defined(PNG_sCAL_SUPPORTED) 1685 #define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1+1+10) 1687 #ifdef PNG_FLOATING_POINT_SUPPORTED 1688 PNG_INTERNAL_FUNCTION(
void,png_ascii_from_fp,(png_const_structrp png_ptr,
1689 png_charp ascii, png_size_t size,
double fp,
unsigned int precision),
1693 #ifdef PNG_FIXED_POINT_SUPPORTED 1694 PNG_INTERNAL_FUNCTION(
void,png_ascii_from_fixed,(png_const_structrp png_ptr,
1695 png_charp ascii, png_size_t size, png_fixed_point fp),PNG_EMPTY);
1699 #if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) 1730 #define PNG_FP_INTEGER 0 1731 #define PNG_FP_FRACTION 1 1732 #define PNG_FP_EXPONENT 2 1733 #define PNG_FP_STATE 3 1734 #define PNG_FP_SAW_SIGN 4 1735 #define PNG_FP_SAW_DIGIT 8 1736 #define PNG_FP_SAW_DOT 16 1737 #define PNG_FP_SAW_E 32 1738 #define PNG_FP_SAW_ANY 60 1742 #define PNG_FP_WAS_VALID 64 1743 #define PNG_FP_NEGATIVE 128 1744 #define PNG_FP_NONZERO 256 1745 #define PNG_FP_STICKY 448 1750 #define PNG_FP_INVALID 512 1755 #define PNG_FP_MAYBE 0 1763 #define PNG_FP_NZ_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NEGATIVE | PNG_FP_NONZERO) 1765 #define PNG_FP_Z_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NONZERO) 1768 #define PNG_FP_IS_ZERO(state) (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT) 1769 #define PNG_FP_IS_POSITIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK) 1770 #define PNG_FP_IS_NEGATIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK) 1787 PNG_INTERNAL_FUNCTION(
int,png_check_fp_number,(png_const_charp
string,
1788 png_size_t size,
int *statep, png_size_tp whereami),PNG_EMPTY);
1796 PNG_INTERNAL_FUNCTION(
int,png_check_fp_string,(png_const_charp
string,
1797 png_size_t size),PNG_EMPTY);
1800 #if defined(PNG_GAMMA_SUPPORTED) ||\ 1801 defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED) 1808 PNG_INTERNAL_FUNCTION(
int,png_muldiv,(png_fixed_point_p res, png_fixed_point a,
1809 png_int_32 multiplied_by, png_int_32 divided_by),PNG_EMPTY);
1812 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) 1814 PNG_INTERNAL_FUNCTION(png_fixed_point,png_muldiv_warn,
1815 (png_const_structrp png_ptr, png_fixed_point a, png_int_32 multiplied_by,
1816 png_int_32 divided_by),PNG_EMPTY);
1819 #ifdef PNG_GAMMA_SUPPORTED 1824 PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal,(png_fixed_point a),
1827 #ifdef PNG_READ_GAMMA_SUPPORTED 1832 PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal2,(png_fixed_point a,
1833 png_fixed_point b),PNG_EMPTY);
1837 PNG_INTERNAL_FUNCTION(
int,png_gamma_significant,(png_fixed_point gamma_value),
1841 #ifdef PNG_READ_GAMMA_SUPPORTED 1849 PNG_INTERNAL_FUNCTION(png_uint_16,png_gamma_correct,(png_structrp png_ptr,
1850 unsigned int value, png_fixed_point gamma_value),PNG_EMPTY);
1851 PNG_INTERNAL_FUNCTION(png_uint_16,png_gamma_16bit_correct,(
unsigned int value,
1852 png_fixed_point gamma_value),PNG_EMPTY);
1853 PNG_INTERNAL_FUNCTION(png_byte,png_gamma_8bit_correct,(
unsigned int value,
1854 png_fixed_point gamma_value),PNG_EMPTY);
1855 PNG_INTERNAL_FUNCTION(
void,png_destroy_gamma_table,(png_structrp png_ptr),
1857 PNG_INTERNAL_FUNCTION(
void,png_build_gamma_table,(png_structrp png_ptr,
1858 int bit_depth),PNG_EMPTY);
1862 #if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ 1863 defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) 1869 png_voidp error_buf;
1871 png_const_bytep memory;
1874 unsigned int for_write :1;
1875 unsigned int owned_file :1;
1882 # define png_control_jmp_buf(pc) (((jmp_buf*)((pc)->error_buf))[0]) 1884 # define png_control_jmp_buf(pc) ((pc)->error_buf) 1891 PNG_INTERNAL_CALLBACK(
void,png_safe_error,(
png_structp png_ptr,
1892 png_const_charp error_message),PNG_NORETURN);
1894 #ifdef PNG_WARNINGS_SUPPORTED 1895 PNG_INTERNAL_CALLBACK(
void,png_safe_warning,(
png_structp png_ptr,
1896 png_const_charp warning_message),PNG_EMPTY);
1898 # define png_safe_warning 0 1901 PNG_INTERNAL_FUNCTION(
int,png_safe_execute,(
png_imagep image,
1902 int (*
function)(png_voidp), png_voidp arg),PNG_EMPTY);
1907 PNG_INTERNAL_FUNCTION(
int,png_image_error,(
png_imagep image,
1908 png_const_charp error_message),PNG_EMPTY);
1910 #ifndef PNG_SIMPLIFIED_READ_SUPPORTED 1912 PNG_INTERNAL_FUNCTION(
void, png_image_free, (
png_imagep image), PNG_EMPTY);
1922 #ifdef PNG_FILTER_OPTIMIZATIONS 1923 PNG_INTERNAL_FUNCTION(
void, PNG_FILTER_OPTIMIZATIONS, (
png_structp png_ptr,
1924 unsigned int bpp), PNG_EMPTY);
1931 PNG_INTERNAL_FUNCTION(
void, png_init_filter_functions_neon,
1932 (
png_structp png_ptr,
unsigned int bpp), PNG_EMPTY);
1937 #include "pngdebug.h"
Definition: pngpriv.h:1865
Definition: pngstruct.h:144