Changeset 44 for cafu/trunk/ExtLibs/libpng/png.h
- Timestamp:
- 02/15/10 11:56:43 (2 years ago)
- Files:
-
- 1 modified
-
cafu/trunk/ExtLibs/libpng/png.h (modified) (99 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/ExtLibs/libpng/png.h
r11 r44 1 1 /* png.h - header file for PNG reference library 2 2 * 3 * libpng version 1.2.4 0 - September 10, 20094 * Copyright (c) 1998-20 09Glenn Randers-Pehrson3 * libpng version 1.2.42 - January 3, 2010 4 * Copyright (c) 1998-2010 Glenn Randers-Pehrson 5 5 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 6 6 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) … … 11 11 * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat 12 12 * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger 13 * libpng versions 0.97, January 1998, through 1.2.4 0 - September 10, 2009: Glenn13 * libpng versions 0.97, January 1998, through 1.2.42 - January 3, 2010: Glenn 14 14 * See also "Contributing Authors", below. 15 15 * … … 246 246 * 1.0.49 10 10049 10.so.0.49[.0] 247 247 * 1.2.40 13 10240 12.so.0.40[.0] 248 * 1.2.41beta01-18 13 10241 12.so.0.41[.0] 249 * 1.0.51rc01 10 10051 10.so.0.51[.0] 250 * 1.2.41rc01-03 13 10241 12.so.0.41[.0] 251 * 1.0.51 10 10051 10.so.0.51[.0] 252 * 1.2.41 13 10241 12.so.0.41[.0] 253 * 1.2.42beta01-02 13 10242 12.so.0.42[.0] 254 * 1.2.42rc01-05 13 10242 12.so.0.42[.0] 255 * 1.0.52 10 10052 10.so.0.52[.0] 256 * 1.2.42 13 10242 12.so.0.42[.0] 248 257 * 249 258 * Henceforth the source version will match the shared-library major … … 277 286 * This code is released under the libpng license. 278 287 * 279 * libpng versions 1.2.6, August 15, 2004, through 1.2.4 0, September 10, 2009, are280 * Copyright (c) 2004, 2006-20 09Glenn Randers-Pehrson, and are288 * libpng versions 1.2.6, August 15, 2004, through 1.2.42, January 3, 2010, are 289 * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are 281 290 * distributed according to the same disclaimer and license as libpng-1.2.5 282 291 * with the following individual added to the list of Contributing Authors: … … 389 398 * ========================= 390 399 * 391 * September 10, 2009400 * January 3, 2010 392 401 * 393 402 * Since the PNG Development group is an ad-hoc body, we can't make … … 395 404 * 396 405 * This is your unofficial assurance that libpng from version 0.71 and 397 * upward through 1.2.4 0are Y2K compliant. It is my belief that earlier406 * upward through 1.2.42 are Y2K compliant. It is my belief that earlier 398 407 * versions were also Y2K compliant. 399 408 * … … 451 460 452 461 /* Version information for png.h - this should match the version in png.c */ 453 #define PNG_LIBPNG_VER_STRING "1.2.4 0"462 #define PNG_LIBPNG_VER_STRING "1.2.42" 454 463 #define PNG_HEADER_VERSION_STRING \ 455 " libpng version 1.2.4 0 - September 10, 2009\n"464 " libpng version 1.2.42 - January 3, 2010\n" 456 465 457 466 #define PNG_LIBPNG_VER_SONUM 0 … … 461 470 #define PNG_LIBPNG_VER_MAJOR 1 462 471 #define PNG_LIBPNG_VER_MINOR 2 463 #define PNG_LIBPNG_VER_RELEASE 4 0472 #define PNG_LIBPNG_VER_RELEASE 42 464 473 /* This should match the numeric part of the final component of 465 474 * PNG_LIBPNG_VER_STRING, omitting any leading zero: … … 491 500 * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release 492 501 */ 493 #define PNG_LIBPNG_VER 1024 0 /* 1.2.40*/502 #define PNG_LIBPNG_VER 10242 /* 1.2.42 */ 494 503 495 504 #ifndef PNG_VERSION_INFO_ONLY … … 514 523 */ 515 524 516 #if defined(PNG_USER_PRIVATEBUILD)525 #ifdef PNG_USER_PRIVATEBUILD 517 526 # define PNG_LIBPNG_BUILD_TYPE \ 518 527 (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) 519 528 #else 520 # if defined(PNG_LIBPNG_SPECIALBUILD)529 # ifdef PNG_LIBPNG_SPECIALBUILD 521 530 # define PNG_LIBPNG_BUILD_TYPE \ 522 531 (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) … … 791 800 { 792 801 /* The following are necessary for every PNG file */ 793 png_uint_32 width ; /* width of image in pixels (from IHDR) */794 png_uint_32 height ; /* height of image in pixels (from IHDR) */795 png_uint_32 valid ; /* valid chunk data (see PNG_INFO_ below) */796 png_uint_32 rowbytes ; /* bytes needed to hold an untransformed row */797 png_colorp palette ; /* array of color values (valid & PNG_INFO_PLTE) */798 png_uint_16 num_palette ; /* number of color entries in "palette" (PLTE) */799 png_uint_16 num_trans ; /* number of transparent palette color (tRNS) */800 png_byte bit_depth ; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */801 png_byte color_type ; /* see PNG_COLOR_TYPE_ below (from IHDR) */802 png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */ 803 png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */ 804 png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ below) */ 805 png_uint_32 rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed row */ 806 png_colorp palette PNG_DEPSTRUCT; /* array of color values (valid & PNG_INFO_PLTE) */ 807 png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in "palette" (PLTE) */ 808 png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette color (tRNS) */ 809 png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ 810 png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below (from IHDR) */ 802 811 /* The following three should have been named *_method not *_type */ 803 png_byte compression_type ; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */804 png_byte filter_type ; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */805 png_byte interlace_type ; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */812 png_byte compression_type PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ 813 png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ 814 png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ 806 815 807 816 /* The following is informational only on read, and not used on writes. */ 808 png_byte channels ; /* number of data channels per pixel (1, 2, 3, 4) */809 png_byte pixel_depth ; /* number of bits per pixel */810 png_byte spare_byte ; /* to align the data, and for future use */811 png_byte signature[8] ; /* magic bytes read by libpng from start of file */817 png_byte channels PNG_DEPSTRUCT; /* number of data channels per pixel (1, 2, 3, 4) */ 818 png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ 819 png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for future use */ 820 png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng from start of file */ 812 821 813 822 /* The rest of the data is optional. If you are reading, check the … … 822 831 * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. 823 832 */ 824 float gamma ; /* gamma value of image, if (valid & PNG_INFO_gAMA) */825 #endif 826 827 #if defined(PNG_sRGB_SUPPORTED)833 float gamma PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ 834 #endif 835 836 #ifdef PNG_sRGB_SUPPORTED 828 837 /* GR-P, 0.96a */ 829 838 /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ 830 png_byte srgb_intent ; /* sRGB rendering intent [0, 1, 2, or 3] */831 #endif 832 833 #if defined(PNG_TEXT_SUPPORTED)839 png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */ 840 #endif 841 842 #ifdef PNG_TEXT_SUPPORTED 834 843 /* The tEXt, and zTXt chunks contain human-readable textual data in 835 844 * uncompressed, compressed, and optionally compressed forms, respectively. … … 840 849 * be in an image. 841 850 */ 842 int num_text ; /* number of comments read/to write */843 int max_text ; /* current size of text array */844 png_textp text ; /* array of comments read/to write */851 int num_text PNG_DEPSTRUCT; /* number of comments read/to write */ 852 int max_text PNG_DEPSTRUCT; /* current size of text array */ 853 png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */ 845 854 #endif /* PNG_TEXT_SUPPORTED */ 846 855 847 #if defined(PNG_tIME_SUPPORTED)856 #ifdef PNG_tIME_SUPPORTED 848 857 /* The tIME chunk holds the last time the displayed image data was 849 858 * modified. See the png_time struct for the contents of this struct. 850 859 */ 851 png_time mod_time ;852 #endif 853 854 #if defined(PNG_sBIT_SUPPORTED)860 png_time mod_time PNG_DEPSTRUCT; 861 #endif 862 863 #ifdef PNG_sBIT_SUPPORTED 855 864 /* The sBIT chunk specifies the number of significant high-order bits 856 865 * in the pixel data. Values are in the range [1, bit_depth], and are … … 859 868 * (valid & PNG_INFO_sBIT) is non-zero. 860 869 */ 861 png_color_8 sig_bit ; /* significant bits in color channels */870 png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */ 862 871 #endif 863 872 … … 873 882 * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. 874 883 */ 875 png_bytep trans ; /* transparent values for paletted image */876 png_color_16 trans_values ; /* transparent color for non-palette image */884 png_bytep trans PNG_DEPSTRUCT; /* transparent values for paletted image */ 885 png_color_16 trans_values PNG_DEPSTRUCT; /* transparent color for non-palette image */ 877 886 #endif 878 887 … … 884 893 * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. 885 894 */ 886 png_color_16 background ;887 #endif 888 889 #if defined(PNG_oFFs_SUPPORTED)895 png_color_16 background PNG_DEPSTRUCT; 896 #endif 897 898 #ifdef PNG_oFFs_SUPPORTED 890 899 /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards 891 900 * and downwards from the top-left corner of the display, page, or other … … 893 902 * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. 894 903 */ 895 png_int_32 x_offset ; /* x offset on page */896 png_int_32 y_offset ; /* y offset on page */897 png_byte offset_unit_type ; /* offset units type */898 #endif 899 900 #if defined(PNG_pHYs_SUPPORTED)904 png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */ 905 png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */ 906 png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */ 907 #endif 908 909 #ifdef PNG_pHYs_SUPPORTED 901 910 /* The pHYs chunk gives the physical pixel density of the image for 902 911 * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ 903 912 * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. 904 913 */ 905 png_uint_32 x_pixels_per_unit ; /* horizontal pixel density */906 png_uint_32 y_pixels_per_unit ; /* vertical pixel density */907 png_byte phys_unit_type ; /* resolution type (see PNG_RESOLUTION_ below) */908 #endif 909 910 #if defined(PNG_hIST_SUPPORTED)914 png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */ 915 png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */ 916 png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */ 917 #endif 918 919 #ifdef PNG_hIST_SUPPORTED 911 920 /* The hIST chunk contains the relative frequency or importance of the 912 921 * various palette entries, so that a viewer can intelligently select a … … 915 924 * is non-zero. 916 925 */ 917 png_uint_16p hist ;926 png_uint_16p hist PNG_DEPSTRUCT; 918 927 #endif 919 928 … … 926 935 */ 927 936 #ifdef PNG_FLOATING_POINT_SUPPORTED 928 float x_white ;929 float y_white ;930 float x_red ;931 float y_red ;932 float x_green ;933 float y_green ;934 float x_blue ;935 float y_blue ;936 #endif 937 #endif 938 939 #if defined(PNG_pCAL_SUPPORTED)937 float x_white PNG_DEPSTRUCT; 938 float y_white PNG_DEPSTRUCT; 939 float x_red PNG_DEPSTRUCT; 940 float y_red PNG_DEPSTRUCT; 941 float x_green PNG_DEPSTRUCT; 942 float y_green PNG_DEPSTRUCT; 943 float x_blue PNG_DEPSTRUCT; 944 float y_blue PNG_DEPSTRUCT; 945 #endif 946 #endif 947 948 #ifdef PNG_pCAL_SUPPORTED 940 949 /* The pCAL chunk describes a transformation between the stored pixel 941 950 * values and original physical data values used to create the image. … … 949 958 * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. 950 959 */ 951 png_charp pcal_purpose ; /* pCAL chunk description string */952 png_int_32 pcal_X0 ; /* minimum value */953 png_int_32 pcal_X1 ; /* maximum value */954 png_charp pcal_units ; /* Latin-1 string giving physical units */955 png_charpp pcal_params ; /* ASCII strings containing parameter values */956 png_byte pcal_type ; /* equation type (see PNG_EQUATION_ below) */957 png_byte pcal_nparams ; /* number of parameters given in pcal_params */960 png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */ 961 png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */ 962 png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */ 963 png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical units */ 964 png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing parameter values */ 965 png_byte pcal_type PNG_DEPSTRUCT; /* equation type (see PNG_EQUATION_ below) */ 966 png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given in pcal_params */ 958 967 #endif 959 968 960 969 /* New members added in libpng-1.0.6 */ 961 970 #ifdef PNG_FREE_ME_SUPPORTED 962 png_uint_32 free_me ; /* flags items libpng is responsible for freeing */971 png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ 963 972 #endif 964 973 … … 966 975 defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) 967 976 /* Storage for unknown chunks that the library doesn't recognize. */ 968 png_unknown_chunkp unknown_chunks ;969 png_size_t unknown_chunks_num ;970 #endif 971 972 #if defined(PNG_iCCP_SUPPORTED)977 png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT; 978 png_size_t unknown_chunks_num PNG_DEPSTRUCT; 979 #endif 980 981 #ifdef PNG_iCCP_SUPPORTED 973 982 /* iCCP chunk data. */ 974 png_charp iccp_name ; /* profile name */975 png_charp iccp_profile ; /* International Color Consortium profile data */983 png_charp iccp_name PNG_DEPSTRUCT; /* profile name */ 984 png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium profile data */ 976 985 /* Note to maintainer: should be png_bytep */ 977 png_uint_32 iccp_proflen ; /* ICC profile data length */978 png_byte iccp_compression ; /* Always zero */979 #endif 980 981 #if defined(PNG_sPLT_SUPPORTED)986 png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */ 987 png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */ 988 #endif 989 990 #ifdef PNG_sPLT_SUPPORTED 982 991 /* Data on sPLT chunks (there may be more than one). */ 983 png_sPLT_tp splt_palettes ;984 png_uint_32 splt_palettes_num ;985 #endif 986 987 #if defined(PNG_sCAL_SUPPORTED)992 png_sPLT_tp splt_palettes PNG_DEPSTRUCT; 993 png_uint_32 splt_palettes_num PNG_DEPSTRUCT; 994 #endif 995 996 #ifdef PNG_sCAL_SUPPORTED 988 997 /* The sCAL chunk describes the actual physical dimensions of the 989 998 * subject matter of the graphic. The chunk contains a unit specification … … 993 1002 * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. 994 1003 */ 995 png_byte scal_unit ; /* unit of physical scale */1004 png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */ 996 1005 #ifdef PNG_FLOATING_POINT_SUPPORTED 997 double scal_pixel_width ; /* width of one pixel */998 double scal_pixel_height ; /* height of one pixel */1006 double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */ 1007 double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */ 999 1008 #endif 1000 1009 #ifdef PNG_FIXED_POINT_SUPPORTED 1001 png_charp scal_s_width ; /* string containing height */1002 png_charp scal_s_height ; /* string containing width */1003 #endif 1004 #endif 1005 1006 #if defined(PNG_INFO_IMAGE_SUPPORTED)1010 png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */ 1011 png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */ 1012 #endif 1013 #endif 1014 1015 #ifdef PNG_INFO_IMAGE_SUPPORTED 1007 1016 /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ 1008 1017 /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ 1009 png_bytepp row_pointers ; /* the image bits */1018 png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */ 1010 1019 #endif 1011 1020 1012 1021 #if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) 1013 png_fixed_point int_gamma ; /* gamma of image, if (valid & PNG_INFO_gAMA) */1022 png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */ 1014 1023 #endif 1015 1024 1016 1025 #if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) 1017 png_fixed_point int_x_white ;1018 png_fixed_point int_y_white ;1019 png_fixed_point int_x_red ;1020 png_fixed_point int_y_red ;1021 png_fixed_point int_x_green ;1022 png_fixed_point int_y_green ;1023 png_fixed_point int_x_blue ;1024 png_fixed_point int_y_blue ;1026 png_fixed_point int_x_white PNG_DEPSTRUCT; 1027 png_fixed_point int_y_white PNG_DEPSTRUCT; 1028 png_fixed_point int_x_red PNG_DEPSTRUCT; 1029 png_fixed_point int_y_red PNG_DEPSTRUCT; 1030 png_fixed_point int_x_green PNG_DEPSTRUCT; 1031 png_fixed_point int_y_green PNG_DEPSTRUCT; 1032 png_fixed_point int_x_blue PNG_DEPSTRUCT; 1033 png_fixed_point int_y_blue PNG_DEPSTRUCT; 1025 1034 #endif 1026 1035 … … 1175 1184 #endif 1176 1185 1177 #if defined(PNG_USER_CHUNKS_SUPPORTED)1186 #ifdef PNG_USER_CHUNKS_SUPPORTED 1178 1187 typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); 1179 1188 #endif 1180 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)1189 #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED 1181 1190 typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); 1182 1191 #endif … … 1199 1208 #define PNG_TRANSFORM_STRIP_FILLER_BEFORE 0x0800 /* write only */ 1200 1209 #define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ 1210 /* Added to libpng-1.2.41 */ 1211 #define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ 1201 1212 1202 1213 /* Flags for MNG supported features */ … … 1220 1231 jmp_buf jmpbuf; /* used in png_error */ 1221 1232 #endif 1222 png_error_ptr error_fn ; /* function for printing errors and aborting */1223 png_error_ptr warning_fn ; /* function for printing warnings */1224 png_voidp error_ptr ; /* user supplied struct for error functions */1225 png_rw_ptr write_data_fn ; /* function for writing output data */1226 png_rw_ptr read_data_fn ; /* function for reading input data */1227 png_voidp io_ptr ; /* ptr to application struct for I/O functions */1228 1229 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)1230 png_user_transform_ptr read_user_transform_fn ; /* user read transform */1231 #endif 1232 1233 #if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)1234 png_user_transform_ptr write_user_transform_fn ; /* user write transform */1233 png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing errors and aborting */ 1234 png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing warnings */ 1235 png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for error functions */ 1236 png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing output data */ 1237 png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading input data */ 1238 png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct for I/O functions */ 1239 1240 #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED 1241 png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */ 1242 #endif 1243 1244 #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED 1245 png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */ 1235 1246 #endif 1236 1247 1237 1248 /* These were added in libpng-1.0.2 */ 1238 #if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)1249 #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED 1239 1250 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ 1240 1251 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) 1241 png_voidp user_transform_ptr ; /* user supplied struct for user transform */1242 png_byte user_transform_depth ; /* bit depth of user transformed pixels */1243 png_byte user_transform_channels ; /* channels in user transformed pixels */1244 #endif 1245 #endif 1246 1247 png_uint_32 mode ; /* tells us where we are in the PNG file */1248 png_uint_32 flags ; /* flags indicating various things to libpng */1249 png_uint_32 transformations ; /* which transformations to perform */1250 1251 z_stream zstream ; /* pointer to decompression structure (below) */1252 png_bytep zbuf ; /* buffer for zlib */1253 png_size_t zbuf_size ; /* size of zbuf */1254 int zlib_level ; /* holds zlib compression level */1255 int zlib_method ; /* holds zlib compression method */1256 int zlib_window_bits ; /* holds zlib compression window bits */1257 int zlib_mem_level ; /* holds zlib compression memory level */1258 int zlib_strategy ; /* holds zlib compression strategy */1259 1260 png_uint_32 width ; /* width of image in pixels */1261 png_uint_32 height ; /* height of image in pixels */1262 png_uint_32 num_rows ; /* number of rows in current pass */1263 png_uint_32 usr_width ; /* width of row at start of write */1264 png_uint_32 rowbytes ; /* size of row in bytes */1265 png_uint_32 irowbytes ; /* size of current interlaced row in bytes */1266 png_uint_32 iwidth ; /* width of current interlaced row in pixels */1267 png_uint_32 row_number ; /* current row in interlace pass */1268 png_bytep prev_row ; /* buffer to save previous (unfiltered) row */1269 png_bytep row_buf ; /* buffer to save current (unfiltered) row */1252 png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */ 1253 png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user transformed pixels */ 1254 png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */ 1255 #endif 1256 #endif 1257 1258 png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in the PNG file */ 1259 png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various things to libpng */ 1260 png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */ 1261 1262 z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression structure (below) */ 1263 png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ 1264 png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ 1265 int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ 1266 int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ 1267 int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window bits */ 1268 int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory level */ 1269 int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression strategy */ 1270 1271 png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ 1272 png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ 1273 png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ 1274 png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ 1275 png_uint_32 rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ 1276 png_uint_32 irowbytes PNG_DEPSTRUCT; /* size of current interlaced row in bytes */ 1277 png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced row in pixels */ 1278 png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ 1279 png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */ 1280 png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ 1270 1281 #ifndef PNG_NO_WRITE_FILTER 1271 png_bytep sub_row ; /* buffer to save "sub" row when filtering */1272 png_bytep up_row ; /* buffer to save "up" row when filtering */1273 png_bytep avg_row ; /* buffer to save "avg" row when filtering */1274 png_bytep paeth_row ; /* buffer to save "Paeth" row when filtering */1275 #endif 1276 png_row_info row_info ; /* used for transformation routines */1277 1278 png_uint_32 idat_size ; /* current IDAT size for read */1279 png_uint_32 crc ; /* current chunk CRC value */1280 png_colorp palette ; /* palette from the input file */1281 png_uint_16 num_palette ; /* number of color entries in palette */1282 png_uint_16 num_trans ; /* number of transparency values */1283 png_byte chunk_name[5] ; /* null-terminated name of current chunk */1284 png_byte compression ; /* file compression type (always 0) */1285 png_byte filter ; /* file filter type (always 0) */1286 png_byte interlaced ; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */1287 png_byte pass ; /* current interlace pass (0 - 6) */1288 png_byte do_filter ; /* row filter flags (see PNG_FILTER_ below ) */1289 png_byte color_type ; /* color type of file */1290 png_byte bit_depth ; /* bit depth of file */1291 png_byte usr_bit_depth ; /* bit depth of users row */1292 png_byte pixel_depth ; /* number of bits per pixel */1293 png_byte channels ; /* number of channels in file */1294 png_byte usr_channels ; /* channels at start of write */1295 png_byte sig_bytes ; /* magic bytes read/written from start of file */1282 png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row when filtering */ 1283 png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row when filtering */ 1284 png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row when filtering */ 1285 png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row when filtering */ 1286 #endif 1287 png_row_info row_info PNG_DEPSTRUCT; /* used for transformation routines */ 1288 1289 png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ 1290 png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ 1291 png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ 1292 png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in palette */ 1293 png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ 1294 png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current chunk */ 1295 png_byte compression PNG_DEPSTRUCT; /* file compression type (always 0) */ 1296 png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ 1297 png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ 1298 png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ 1299 png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see PNG_FILTER_ below ) */ 1300 png_byte color_type PNG_DEPSTRUCT; /* color type of file */ 1301 png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ 1302 png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ 1303 png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ 1304 png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ 1305 png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ 1306 png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from start of file */ 1296 1307 1297 1308 #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) 1298 1309 #ifdef PNG_LEGACY_SUPPORTED 1299 png_byte filler ; /* filler byte for pixel expansion */1310 png_byte filler PNG_DEPSTRUCT; /* filler byte for pixel expansion */ 1300 1311 #else 1301 png_uint_16 filler ; /* filler bytes for pixel expansion */1302 #endif 1303 #endif 1304 1305 #if defined(PNG_bKGD_SUPPORTED)1306 png_byte background_gamma_type ;1312 png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel expansion */ 1313 #endif 1314 #endif 1315 1316 #ifdef PNG_bKGD_SUPPORTED 1317 png_byte background_gamma_type PNG_DEPSTRUCT; 1307 1318 # ifdef PNG_FLOATING_POINT_SUPPORTED 1308 float background_gamma ;1319 float background_gamma PNG_DEPSTRUCT; 1309 1320 # endif 1310 png_color_16 background ; /* background color in screen gamma space */1311 #if defined(PNG_READ_GAMMA_SUPPORTED)1312 png_color_16 background_1 ; /* background normalized to gamma 1.0 */1321 png_color_16 background PNG_DEPSTRUCT; /* background color in screen gamma space */ 1322 #ifdef PNG_READ_GAMMA_SUPPORTED 1323 png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */ 1313 1324 #endif 1314 1325 #endif /* PNG_bKGD_SUPPORTED */ 1315 1326 1316 #if defined(PNG_WRITE_FLUSH_SUPPORTED)1317 png_flush_ptr output_flush_fn ; /* Function for flushing output */1318 png_uint_32 flush_dist ; /* how many rows apart to flush, 0 - no flush */1319 png_uint_32 flush_rows ; /* number of rows written since last flush */1327 #ifdef PNG_WRITE_FLUSH_SUPPORTED 1328 png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */ 1329 png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, 0 - no flush */ 1330 png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since last flush */ 1320 1331 #endif 1321 1332 1322 1333 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) 1323 int gamma_shift ; /* number of "insignificant" bits 16-bit gamma */1334 int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits 16-bit gamma */ 1324 1335 #ifdef PNG_FLOATING_POINT_SUPPORTED 1325 float gamma ; /* file gamma value */1326 float screen_gamma ; /* screen gamma value (display_exponent) */1336 float gamma PNG_DEPSTRUCT; /* file gamma value */ 1337 float screen_gamma PNG_DEPSTRUCT; /* screen gamma value (display_exponent) */ 1327 1338 #endif 1328 1339 #endif 1329 1340 1330 1341 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) 1331 png_bytep gamma_table ; /* gamma table for 8-bit depth files */1332 png_bytep gamma_from_1 ; /* converts from 1.0 to screen */1333 png_bytep gamma_to_1 ; /* converts from file to 1.0 */1334 png_uint_16pp gamma_16_table ; /* gamma table for 16-bit depth files */1335 png_uint_16pp gamma_16_from_1 ; /* converts from 1.0 to screen */1336 png_uint_16pp gamma_16_to_1 ; /* converts from file to 1.0 */1342 png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit depth files */ 1343 png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ 1344 png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ 1345 png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */ 1346 png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ 1347 png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ 1337 1348 #endif 1338 1349 1339 1350 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) 1340 png_color_8 sig_bit ; /* significant bits in each available channel */1351 png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each available channel */ 1341 1352 #endif 1342 1353 1343 1354 #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) 1344 png_color_8 shift ; /* shift for significant bit tranformation */1355 png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit tranformation */ 1345 1356 #endif 1346 1357 1347 1358 #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ 1348 1359 || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) 1349 png_bytep trans ; /* transparency values for paletted files */1350 png_color_16 trans_values ; /* transparency values for non-paletted files */1351 #endif 1352 1353 png_read_status_ptr read_row_fn ; /* called after each row is decoded */1354 png_write_status_ptr write_row_fn ; /* called after each row is encoded */1360 png_bytep trans PNG_DEPSTRUCT; /* transparency values for paletted files */ 1361 png_color_16 trans_values PNG_DEPSTRUCT; /* transparency values for non-paletted files */ 1362 #endif 1363 1364 png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each row is decoded */ 1365 png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */ 1355 1366 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED 1356 png_progressive_info_ptr info_fn ; /* called after header data fully read */1357 png_progressive_row_ptr row_fn ; /* called after each prog. row is decoded */1358 png_progressive_end_ptr end_fn ; /* called after image is complete */1359 png_bytep save_buffer_ptr ; /* current location in save_buffer */1360 png_bytep save_buffer ; /* buffer for previously read data */1361 png_bytep current_buffer_ptr ; /* current location in current_buffer */1362 png_bytep current_buffer ; /* buffer for recently used data */1363 png_uint_32 push_length ; /* size of current input chunk */1364 png_uint_32 skip_length ; /* bytes to skip in input data */1365 png_size_t save_buffer_size ; /* amount of data now in save_buffer */1366 png_size_t save_buffer_max ; /* total size of save_buffer */1367 png_size_t buffer_size ; /* total amount of available input data */1368 png_size_t current_buffer_size ; /* amount of data now in current_buffer */1369 int process_mode ; /* what push library is currently doing */1370 int cur_palette ; /* current push library palette index */1371 1372 # if defined(PNG_TEXT_SUPPORTED)1373 png_size_t current_text_size ; /* current size of text input data */1374 png_size_t current_text_left ; /* how much text left to read in input */1375 png_charp current_text ; /* current text chunk buffer */1376 png_charp current_text_ptr ; /* current location in current_text */1367 png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */ 1368 png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each prog. row is decoded */ 1369 png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image is complete */ 1370 png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in save_buffer */ 1371 png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously read data */ 1372 png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in current_buffer */ 1373 png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently used data */ 1374 png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input chunk */ 1375 png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in input data */ 1376 png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now in save_buffer */ 1377 png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of save_buffer */ 1378 png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of available input data */ 1379 png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now in current_buffer */ 1380 int process_mode PNG_DEPSTRUCT; /* what push library is currently doing */ 1381 int cur_palette PNG_DEPSTRUCT; /* current push library palette index */ 1382 1383 # ifdef PNG_TEXT_SUPPORTED 1384 png_size_t current_text_size PNG_DEPSTRUCT; /* current size of text input data */ 1385 png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left to read in input */ 1386 png_charp current_text PNG_DEPSTRUCT; /* current text chunk buffer */ 1387 png_charp current_text_ptr PNG_DEPSTRUCT; /* current location in current_text */ 1377 1388 # endif /* PNG_TEXT_SUPPORTED */ 1378 1389 #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ … … 1380 1391 #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) 1381 1392 /* for the Borland special 64K segment handler */ 1382 png_bytepp offset_table_ptr ;1383 png_bytep offset_table ;1384 png_uint_16 offset_table_number ;1385 png_uint_16 offset_table_count ;1386 png_uint_16 offset_table_count_free ;1387 #endif 1388 1389 #if defined(PNG_READ_DITHER_SUPPORTED)1390 png_bytep palette_lookup ; /* lookup table for dithering */1391 png_bytep dither_index ; /* index translation for palette files */1393 png_bytepp offset_table_ptr PNG_DEPSTRUCT; 1394 png_bytep offset_table PNG_DEPSTRUCT; 1395 png_uint_16 offset_table_number PNG_DEPSTRUCT; 1396 png_uint_16 offset_table_count PNG_DEPSTRUCT; 1397 png_uint_16 offset_table_count_free PNG_DEPSTRUCT; 1398 #endif 1399 1400 #ifdef PNG_READ_DITHER_SUPPORTED 1401 png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */ 1402 png_bytep dither_index PNG_DEPSTRUCT; /* index translation for palette files */ 1392 1403 #endif 1393 1404 1394 1405 #if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) 1395 png_uint_16p hist ; /* histogram */1396 #endif 1397 1398 #if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)1399 png_byte heuristic_method ; /* heuristic for row filter selection */1400 png_byte num_prev_filters ; /* number of weights for previous rows */1401 png_bytep prev_filters ; /* filter type(s) of previous row(s) */1402 png_uint_16p filter_weights ; /* weight(s) for previous line(s) */1403 png_uint_16p inv_filter_weights ; /* 1/weight(s) for previous line(s) */1404 png_uint_16p filter_costs ; /* relative filter calculation cost */1405 png_uint_16p inv_filter_costs ; /* 1/relative filter calculation cost */1406 #endif 1407 1408 #if defined(PNG_TIME_RFC1123_SUPPORTED)1409 png_charp time_buffer ; /* String to hold RFC 1123 time text */1406 png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ 1407 #endif 1408 1409 #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED 1410 png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row filter selection */ 1411 png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights for previous rows */ 1412 png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */ 1413 png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous line(s) */ 1414 png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for previous line(s) */ 1415 png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter calculation cost */ 1416 png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter calculation cost */ 1417 #endif 1418 1419 #ifdef PNG_TIME_RFC1123_SUPPORTED 1420 png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ 1410 1421 #endif 1411 1422 … … 1413 1424 1414 1425 #ifdef PNG_FREE_ME_SUPPORTED 1415 png_uint_32 free_me ; /* flags items libpng is responsible for freeing */1416 #endif 1417 1418 #if defined(PNG_USER_CHUNKS_SUPPORTED)1419 png_voidp user_chunk_ptr ;1420 png_user_chunk_ptr read_user_chunk_fn ; /* user read chunk handler */1426 png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ 1427 #endif 1428 1429 #ifdef PNG_USER_CHUNKS_SUPPORTED 1430 png_voidp user_chunk_ptr PNG_DEPSTRUCT; 1431 png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */ 1421 1432 #endif 1422 1433 1423 1434 #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED 1424 int num_chunk_list ;1425 png_bytep chunk_list ;1435 int num_chunk_list PNG_DEPSTRUCT; 1436 png_bytep chunk_list PNG_DEPSTRUCT; 1426 1437 #endif 1427 1438 1428 1439 /* New members added in libpng-1.0.3 */ 1429 #if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)1430 png_byte rgb_to_gray_status ;1440 #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED 1441 png_byte rgb_to_gray_status PNG_DEPSTRUCT; 1431 1442 /* These were changed from png_byte in libpng-1.0.6 */ 1432 png_uint_16 rgb_to_gray_red_coeff ;1433 png_uint_16 rgb_to_gray_green_coeff ;1434 png_uint_16 rgb_to_gray_blue_coeff ;1443 png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT; 1444 png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT; 1445 png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT; 1435 1446 #endif 1436 1447 … … 1441 1452 /* Changed from png_byte to png_uint_32 at version 1.2.0 */ 1442 1453 #ifdef PNG_1_0_X 1443 png_byte mng_features_permitted ;1454 png_byte mng_features_permitted PNG_DEPSTRUCT; 1444 1455 #else 1445 png_uint_32 mng_features_permitted ;1456 png_uint_32 mng_features_permitted PNG_DEPSTRUCT; 1446 1457 #endif /* PNG_1_0_X */ 1447 1458 #endif … … 1449 1460 /* New member added in libpng-1.0.7 */ 1450 1461 #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) 1451 png_fixed_point int_gamma ;1462 png_fixed_point int_gamma PNG_DEPSTRUCT; 1452 1463 #endif 1453 1464 1454 1465 /* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ 1455 #if defined(PNG_MNG_FEATURES_SUPPORTED)1456 png_byte filter_type ;1457 #endif 1458 1459 #if defined(PNG_1_0_X)1466 #ifdef PNG_MNG_FEATURES_SUPPORTED 1467 png_byte filter_type PNG_DEPSTRUCT; 1468 #endif 1469 1470 #ifdef PNG_1_0_X 1460 1471 /* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */ 1461 png_uint_32 row_buf_size ;1472 png_uint_32 row_buf_size PNG_DEPSTRUCT; 1462 1473 #endif 1463 1474 1464 1475 /* New members added in libpng-1.2.0 */ 1465 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)1466 # if !defined(PNG_1_0_X)1467 # if defined(PNG_MMX_CODE_SUPPORTED)1468 png_byte mmx_bitdepth_threshold ;1469 png_uint_32 mmx_rowbytes_threshold ;1476 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED 1477 # ifndef PNG_1_0_X 1478 # ifdef PNG_MMX_CODE_SUPPORTED 1479 png_byte mmx_bitdepth_threshold PNG_DEPSTRUCT; 1480 png_uint_32 mmx_rowbytes_threshold PNG_DEPSTRUCT; 1470 1481 # endif 1471 png_uint_32 asm_flags ;1482 png_uint_32 asm_flags PNG_DEPSTRUCT; 1472 1483 # endif 1473 1484 #endif … … 1475 1486 /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ 1476 1487 #ifdef PNG_USER_MEM_SUPPORTED 1477 png_voidp mem_ptr ; /* user supplied struct for mem functions */1478 png_malloc_ptr malloc_fn ; /* function for allocating memory */1479 png_free_ptr free_fn ; /* function for freeing memory */1488 png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for mem functions */ 1489 png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for allocating memory */ 1490 png_free_ptr free_fn PNG_DEPSTRUCT; /* function for freeing memory */ 1480 1491 #endif 1481 1492 1482 1493 /* New member added in libpng-1.0.13 and 1.2.0 */ 1483 png_bytep big_row_buf ; /* buffer to save current (unfiltered) row */1484 1485 #if defined(PNG_READ_DITHER_SUPPORTED)1494 png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ 1495 1496 #ifdef PNG_READ_DITHER_SUPPORTED 1486 1497 /* The following three members were added at version 1.0.14 and 1.2.4 */ 1487 png_bytep dither_sort ; /* working sort array */1488 png_bytep index_to_palette ; /* where the original index currently is */1498 png_bytep dither_sort PNG_DEPSTRUCT; /* working sort array */ 1499 png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original index currently is */ 1489 1500 /* in the palette */ 1490 png_bytep palette_to_index ; /* which original index points to this */1501 png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index points to this */ 1491 1502 /* palette color */ 1492 1503 #endif 1493 1504 1494 1505 /* New members added in libpng-1.0.16 and 1.2.6 */ 1495 png_byte compression_type ;1506 png_byte compression_type PNG_DEPSTRUCT; 1496 1507 1497 1508 #ifdef PNG_SET_USER_LIMITS_SUPPORTED 1498 png_uint_32 user_width_max ;1499 png_uint_32 user_height_max ;1509 png_uint_32 user_width_max PNG_DEPSTRUCT; 1510 png_uint_32 user_height_max PNG_DEPSTRUCT; 1500 1511 #endif 1501 1512 1502 1513 /* New member added in libpng-1.0.25 and 1.2.17 */ 1503 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)1514 #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED 1504 1515 /* Storage for unknown chunk that the library doesn't recognize. */ 1505 png_unknown_chunk unknown_chunk ;1516 png_unknown_chunk unknown_chunk PNG_DEPSTRUCT; 1506 1517 #endif 1507 1518 1508 1519 /* New members added in libpng-1.2.26 */ 1509 png_uint_32 old_big_row_buf_size, old_prev_row_size; 1520 png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT; 1521 png_uint_32 old_prev_row_size PNG_DEPSTRUCT; 1510 1522 1511 1523 /* New member added in libpng-1.2.30 */ 1512 png_charp chunkdata; /* buffer for reading chunk data */ 1524 png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ 1525 1513 1526 1514 1527 }; … … 1518 1531 * do not agree upon the version number. 1519 1532 */ 1520 typedef png_structp version_1_2_4 0;1533 typedef png_structp version_1_2_42; 1521 1534 1522 1535 typedef png_struct FAR * FAR * png_structpp; … … 1548 1561 * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). 1549 1562 */ 1550 extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num)) ;1563 extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num)) PNG_DEPRECATED; 1551 1564 1552 1565 /* Allocate and initialize png_ptr struct for reading, and any other memory. */ 1553 1566 extern PNG_EXPORT(png_structp,png_create_read_struct) 1554 1567 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, 1555 png_error_ptr error_fn, png_error_ptr warn_fn)) ;1568 png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; 1556 1569 1557 1570 /* Allocate and initialize png_ptr struct for writing, and any other memory */ 1558 1571 extern PNG_EXPORT(png_structp,png_create_write_struct) 1559 1572 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, 1560 png_error_ptr error_fn, png_error_ptr warn_fn)) ;1573 png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; 1561 1574 1562 1575 #ifdef PNG_WRITE_SUPPORTED … … 1578 1591 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, 1579 1592 png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, 1580 png_malloc_ptr malloc_fn, png_free_ptr free_fn)) ;1593 png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; 1581 1594 extern PNG_EXPORT(png_structp,png_create_write_struct_2) 1582 1595 PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, 1583 1596 png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, 1584 png_malloc_ptr malloc_fn, png_free_ptr free_fn)) ;1597 png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; 1585 1598 #endif 1586 1599 … … 1602 1615 /* Allocate and initialize the info structure */ 1603 1616 extern PNG_EXPORT(png_infop,png_create_info_struct) 1604 PNGARG((png_structp png_ptr)) ;1617 PNGARG((png_structp png_ptr)) PNG_ALLOCATED; 1605 1618 1606 1619 #if defined(PNG_1_0_X) || defined (PNG_1_2_X) 1607 1620 /* Initialize the info structure (old interface - DEPRECATED) */ 1608 extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr)); 1621 extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr)) 1622 PNG_DEPRECATED; 1609 1623 #undef png_info_init 1610 1624 #define png_info_init(info_ptr) png_info_init_3(&info_ptr,\ … … 1621 1635 png_infop info_ptr)); 1622 1636 1623 #if ndef PNG_NO_SEQUENTIAL_READ_SUPPORTED1637 #ifdef PNG_SEQUENTIAL_READ_SUPPORTED 1624 1638 /* Read the information before the actual image data. */ 1625 1639 extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, … … 1627 1641 #endif 1628 1642 1629 #if defined(PNG_TIME_RFC1123_SUPPORTED)1643 #ifdef PNG_TIME_RFC1123_SUPPORTED 1630 1644 extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) 1631 1645 PNGARG((png_structp png_ptr, png_timep ptime)); 1632 1646 #endif 1633 1647 1634 #if !defined(_WIN32_WCE) 1635 /* "time.h" functions are not supported on WindowsCE */ 1636 #if defined(PNG_WRITE_tIME_SUPPORTED) 1648 #ifdef PNG_CONVERT_tIME_SUPPORTED 1637 1649 /* Convert from a struct tm to png_time */ 1638 1650 extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, … … 1642 1654 extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, 1643 1655 time_t ttime)); 1644 #endif /* PNG_WRITE_tIME_SUPPORTED */ 1645 #endif /* _WIN32_WCE */ 1646 1647 #if defined(PNG_READ_EXPAND_SUPPORTED) 1656 #endif /* PNG_CONVERT_tIME_SUPPORTED */ 1657 1658 #ifdef PNG_READ_EXPAND_SUPPORTED 1648 1659 /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ 1649 1660 extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); 1650 #if !defined(PNG_1_0_X)1661 #ifndef PNG_1_0_X 1651 1662 extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp 1652 1663 png_ptr)); … … 1656 1667 #if defined(PNG_1_0_X) || defined (PNG_1_2_X) 1657 1668 /* Deprecated */ 1658 extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr)); 1669 extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp 1670 png_ptr)) PNG_DEPRECATED; 1659 1671 #endif 1660 1672 #endif … … 1665 1677 #endif 1666 1678 1667 #if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)1679 #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED 1668 1680 /* Expand the grayscale to 24-bit RGB if necessary. */ 1669 1681 extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); 1670 1682 #endif 1671 1683 1672 #if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)1684 #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED 1673 1685 /* Reduce RGB to grayscale. */ 1674 1686 #ifdef PNG_FLOATING_POINT_SUPPORTED … … 1685 1697 png_colorp palette)); 1686 1698 1687 #if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)1699 #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED 1688 1700 extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); 1689 1701 #endif … … 1707 1719 #define PNG_FILLER_AFTER 1 1708 1720 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ 1709 #if !defined(PNG_1_0_X)1721 #ifndef PNG_1_0_X 1710 1722 extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr, 1711 1723 png_uint_32 filler, int flags)); … … 1745 1757 #endif 1746 1758 1747 #if defined(PNG_READ_BACKGROUND_SUPPORTED)1759 #ifdef PNG_READ_BACKGROUND_SUPPORTED 1748 1760 /* Handle alpha and tRNS by replacing with a background color. */ 1749 1761 #ifdef PNG_FLOATING_POINT_SUPPORTED … … 1758 1770 #endif 1759 1771 1760 #if defined(PNG_READ_16_TO_8_SUPPORTED)1772 #ifdef PNG_READ_16_TO_8_SUPPORTED 1761 1773 /* Strip the second byte of information from a 16-bit depth file. */ 1762 1774 extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); 1763 1775 #endif 1764 1776 1765 #if defined(PNG_READ_DITHER_SUPPORTED)1777 #ifdef PNG_READ_DITHER_SUPPORTED 1766 1778 /* Turn on dithering, and reduce the palette to the number of colors available. */ 1767 1779 extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, … … 1770 1782 #endif 1771 1783 1772 #if defined(PNG_READ_GAMMA_SUPPORTED)1784 #ifdef PNG_READ_GAMMA_SUPPORTED 1773 1785 /* Handle gamma correction. Screen_gamma=(display_exponent) */ 1774 1786 #ifdef PNG_FLOATING_POINT_SUPPORTED … … 1784 1796 /* Deprecated and will be removed. Use png_permit_mng_features() instead. */ 1785 1797 extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr, 1786 int empty_plte_permitted)) ;1787 #endif 1788 #endif 1789 1790 #if defined(PNG_WRITE_FLUSH_SUPPORTED)1798 int empty_plte_permitted)) PNG_DEPRECATED; 1799 #endif 1800 #endif 1801 1802 #ifdef PNG_WRITE_FLUSH_SUPPORTED 1791 1803 /* Set how many lines between output flushes - 0 for no flushing */ 1792 1804 extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); … … 1853 1865 /* Free all memory used by the read (old method - NOT DLL EXPORTED) */ 1854 1866 extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, 1855 png_infop end_info_ptr)) ;1867 png_infop end_info_ptr)) PNG_DEPRECATED; 1856 1868 1857 1869 /* Free any memory associated with the png_struct and the png_info_structs */ … … 1860 1872 1861 1873 /* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ 1862 extern void png_write_destroy PNGARG((png_structp png_ptr)) ;1874 extern void png_write_destroy PNGARG((png_structp png_ptr)) PNG_DEPRECATED; 1863 1875 1864 1876 /* Set the libpng method of handling chunk CRC errors */ … … 1995 2007 */ 1996 2008 1997 #if !defined(PNG_NO_STDIO)2009 #ifdef PNG_STDIO_SUPPORTED 1998 2010 /* Initialize the input/output for the PNG file to the default functions. */ 1999 2011 extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); … … 2103 2115 2104 2116 extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, 2105 png_uint_32 size)) ;2106 2107 #if defined(PNG_1_0_X)2117 png_uint_32 size)) PNG_ALLOCATED; 2118 2119 #ifdef PNG_1_0_X 2108 2120 # define png_malloc_warn png_malloc 2109 2121 #else 2110 2122 /* Added at libpng version 1.2.4 */ 2111 2123 extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, 2112 png_uint_32 size)) ;2124 png_uint_32 size)) PNG_ALLOCATED; 2113 2125 #endif 2114 2126 … … 2116 2128 extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); 2117 2129 2118 #if defined(PNG_1_0_X)2130 #ifdef PNG_1_0_X 2119 2131 /* Function to allocate memory for zlib. */ 2120 2132 extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items, … … 2156 2168 #ifdef PNG_USER_MEM_SUPPORTED 2157 2169 extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, 2158 png_uint_32 size)) ;2170 png_uint_32 size)) PNG_ALLOCATED; 2159 2171 extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, 2160 2172 png_voidp ptr)); … … 2162 2174 2163 2175 extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr, 2164 png_voidp s1, png_voidp s2, png_uint_32 size)) ;2176 png_voidp s1, png_voidp s2, png_uint_32 size)) PNG_DEPRECATED; 2165 2177 2166 2178 extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr, 2167 png_voidp s1, int value, png_uint_32 size)) ;2179 png_voidp s1, int value, png_uint_32 size)) PNG_DEPRECATED; 2168 2180 2169 2181 #if defined(USE_FAR_KEYWORD) /* memory model conversion function */ … … 2175 2187 /* Fatal error in PNG image of libpng - can't continue */ 2176 2188 extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, 2177 png_const_charp error_message)) ;2189 png_const_charp error_message)) PNG_NORETURN; 2178 2190 2179 2191 /* The same, but the chunk name is prepended to the error string. */ 2180 2192 extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, 2181 png_const_charp error_message)) ;2193 png_const_charp error_message)) PNG_NORETURN; 2182 2194 #else 2183 2195 /* Fatal error in PNG image of libpng - can't continue */ 2184 extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) ;2196 extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN; 2185 2197 #endif 2186 2198 … … 2217 2229 png_infop info_ptr)); 2218 2230 2219 #if defined(PNG_INFO_IMAGE_SUPPORTED)2231 #ifdef PNG_INFO_IMAGE_SUPPORTED 2220 2232 /* Returns row_pointers, which is an array of pointers to scanlines that was 2221 2233 * returned from png_read_png(). … … 2293 2305 png_infop info_ptr)); 2294 2306 2295 #if defined(PNG_bKGD_SUPPORTED)2307 #ifdef PNG_bKGD_SUPPORTED 2296 2308 extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, 2297 2309 png_infop info_ptr, png_color_16p *background)); 2298 2310 #endif 2299 2311 2300 #if defined(PNG_bKGD_SUPPORTED)2312 #ifdef PNG_bKGD_SUPPORTED 2301 2313 extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, 2302 2314 png_infop info_ptr, png_color_16p background)); 2303 2315 #endif 2304 2316 2305 #if defined(PNG_cHRM_SUPPORTED)2317 #ifdef PNG_cHRM_SUPPORTED 2306 2318 #ifdef PNG_FLOATING_POINT_SUPPORTED 2307 2319 extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, … … 2319 2331 #endif 2320 2332 2321 #if defined(PNG_cHRM_SUPPORTED)2333 #ifdef PNG_cHRM_SUPPORTED 2322 2334 #ifdef PNG_FLOATING_POINT_SUPPORTED 2323 2335 extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, … … 2334 2346 #endif 2335 2347 2336 #if defined(PNG_gAMA_SUPPORTED)2348 #ifdef PNG_gAMA_SUPPORTED 2337 2349 #ifdef PNG_FLOATING_POINT_SUPPORTED 2338 2350 extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, … … 2343 2355 #endif 2344 2356 2345 #if defined(PNG_gAMA_SUPPORTED)2357 #ifdef PNG_gAMA_SUPPORTED 2346 2358 #ifdef PNG_FLOATING_POINT_SUPPORTED 2347 2359 extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, … … 2352 2364 #endif 2353 2365 2354 #if defined(PNG_hIST_SUPPORTED)2366 #ifdef PNG_hIST_SUPPORTED 2355 2367 extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, 2356 2368 png_infop info_ptr, png_uint_16p *hist)); 2357 2369 #endif 2358 2370 2359 #if defined(PNG_hIST_SUPPORTED)2371 #ifdef PNG_hIST_SUPPORTED 2360 2372 extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, 2361 2373 png_infop info_ptr, png_uint_16p hist)); … … 2372 2384 int filter_method)); 2373 2385 2374 #if defined(PNG_oFFs_SUPPORTED)2386 #ifdef PNG_oFFs_SUPPORTED 2375 2387 extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, 2376 2388 png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, … … 2378 2390 #endif 2379 2391 2380 #if defined(PNG_oFFs_SUPPORTED)2392 #ifdef PNG_oFFs_SUPPORTED 2381 2393 extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, 2382 2394 png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, … … 2384 2396 #endif 2385 2397 2386 #if defined(PNG_pCAL_SUPPORTED)2398 #ifdef PNG_pCAL_SUPPORTED 2387 2399 extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, 2388 2400 png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, … … 2390 2402 #endif 2391 2403 2392 #if defined(PNG_pCAL_SUPPORTED)2404 #ifdef PNG_pCAL_SUPPORTED 2393 2405 extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, 2394 2406 png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, … … 2396 2408 #endif 2397 2409 2398 #if defined(PNG_pHYs_SUPPORTED)2410 #ifdef PNG_pHYs_SUPPORTED 2399 2411 extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, 2400 2412 png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); 2401 2413 #endif 2402 2414 2403 #if defined(PNG_pHYs_SUPPORTED)2415 #ifdef PNG_pHYs_SUPPORTED 2404 2416 extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, 2405 2417 png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); … … 2412 2424 png_infop info_ptr, png_colorp palette, int num_palette)); 2413 2425 2414 #if defined(PNG_sBIT_SUPPORTED)2426 #ifdef PNG_sBIT_SUPPORTED 2415 2427 extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, 2416 2428 png_infop info_ptr, png_color_8p *sig_bit)); 2417 2429 #endif 2418 2430 2419 #if defined(PNG_sBIT_SUPPORTED)2431 #ifdef PNG_sBIT_SUPPORTED 2420 2432 extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, 2421 2433 png_infop info_ptr, png_color_8p sig_bit)); 2422 2434 #endif 2423 2435 2424 #if defined(PNG_sRGB_SUPPORTED)2436 #ifdef PNG_sRGB_SUPPORTED 2425 2437 extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, 2426 2438 png_infop info_ptr, int *intent)); 2427 2439 #endif 2428 2440 2429 #if defined(PNG_sRGB_SUPPORTED)2441 #ifdef PNG_sRGB_SUPPORTED 2430 2442 extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, 2431 2443 png_infop info_ptr, int intent)); … … 2434 2446 #endif 2435 2447 2436 #if defined(PNG_iCCP_SUPPORTED)2448 #ifdef PNG_iCCP_SUPPORTED 2437 2449 extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, 2438 2450 png_infop info_ptr, png_charpp name, int *compression_type, … … 2441 2453 #endif 2442 2454 2443 #if defined(PNG_iCCP_SUPPORTED)2455 #ifdef PNG_iCCP_SUPPORTED 2444 2456 extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, 2445 2457 png_infop info_ptr, png_charp name, int compression_type, … … 2448 2460 #endif 2449 2461 2450 #if defined(PNG_sPLT_SUPPORTED)2462 #ifdef PNG_sPLT_SUPPORTED 2451 2463 extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, 2452 2464 png_infop info_ptr, png_sPLT_tpp entries)); 2453 2465 #endif 2454 2466 2455 #if defined(PNG_sPLT_SUPPORTED)2467 #ifdef PNG_sPLT_SUPPORTED 2456 2468 extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, 2457 2469 png_infop info_ptr, png_sPLT_tp entries, int nentries)); 2458 2470 #endif 2459 2471 2460 #if defined(PNG_TEXT_SUPPORTED)2472 #ifdef PNG_TEXT_SUPPORTED 2461 2473 /* png_get_text also returns the number of text chunks in *num_text */ 2462 2474 extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, … … 2472 2484 */ 2473 2485 2474 #if defined(PNG_TEXT_SUPPORTED)2486 #ifdef PNG_TEXT_SUPPORTED 2475 2487 extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, 2476 2488 png_infop info_ptr, png_textp text_ptr, int num_text)); 2477 2489 #endif 2478 2490 2479 #if defined(PNG_tIME_SUPPORTED)2491 #ifdef PNG_tIME_SUPPORTED 2480 2492 extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, 2481 2493 png_infop info_ptr, png_timep *mod_time)); 2482 2494 #endif 2483 2495 2484 #if defined(PNG_tIME_SUPPORTED)2496 #ifdef PNG_tIME_SUPPORTED 2485 2497 extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, 2486 2498 png_infop info_ptr, png_timep mod_time)); 2487 2499 #endif 2488 2500 2489 #if defined(PNG_tRNS_SUPPORTED)2501 #ifdef PNG_tRNS_SUPPORTED 2490 2502 extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, 2491 2503 png_infop info_ptr, png_bytep *trans, int *num_trans, … … 2493 2505 #endif 2494 2506 2495 #if defined(PNG_tRNS_SUPPORTED)2507 #ifdef PNG_tRNS_SUPPORTED 2496 2508 extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, 2497 2509 png_infop info_ptr, png_bytep trans, int num_trans, … … 2499 2511 #endif 2500 2512 2501 #if defined(PNG_tRNS_SUPPORTED)2502 #endif 2503 2504 #if defined(PNG_sCAL_SUPPORTED)2513 #ifdef PNG_tRNS_SUPPORTED 2514 #endif 2515 2516 #ifdef PNG_sCAL_SUPPORTED 2505 2517 #ifdef PNG_FLOATING_POINT_SUPPORTED 2506 2518 extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, … … 2514 2526 #endif /* PNG_sCAL_SUPPORTED */ 2515 2527 2516 #if defined(PNG_sCAL_SUPPORTED)2528 #ifdef PNG_sCAL_SUPPORTED 2517 2529 #ifdef PNG_FLOATING_POINT_SUPPORTED 2518 2530 extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, … … 2541 2553 chunk_name)); 2542 2554 #endif 2543 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)2555 #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED 2544 2556 extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, 2545 2557 png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); … … 2557 2569 png_infop info_ptr, int mask)); 2558 2570 2559 #if defined(PNG_INFO_IMAGE_SUPPORTED)2571 #ifdef PNG_INFO_IMAGE_SUPPORTED 2560 2572 /* The "params" pointer is currently not used and is for future expansion. */ 2561 2573 extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, … … 2693 2705 2694 2706 /* Added to version 1.2.0 */ 2695 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)2696 #if defined(PNG_MMX_CODE_SUPPORTED)2707 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED 2708 #ifdef PNG_MMX_CODE_SUPPORTED 2697 2709 #define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED 0x01 /* not user-settable */ 2698 2710 #define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU 0x02 /* not user-settable */ … … 2722 2734 #endif /* PNG_MMX_CODE_SUPPORTED */ 2723 2735 2724 #if !defined(PNG_1_0_X)2736 #ifndef PNG_1_0_X 2725 2737 /* pngget.c */ 2726 2738 extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask) … … 2754 2766 #endif /* PNG_1_0_X */ 2755 2767 2756 #if !defined(PNG_1_0_X)2768 #ifndef PNG_1_0_X 2757 2769 /* png.c, pnggccrd.c, or pngvcrd.c */ 2758 2770 extern PNG_EXPORT(int,png_mmx_support) PNGARG((void)); … … 2777 2789 png_ptr)); 2778 2790 #endif 2779 2780 2781 2791 /* Maintainer: Put new public prototypes here ^, in libpng.3, and in 2782 2792 * project defs … … 2832 2842 * values, which is almost certainly true. 2833 2843 */ 2834 #if defined(PNG_READ_BIG_ENDIAN_SUPPORTED)2844 #ifdef PNG_READ_BIG_ENDIAN_SUPPORTED 2835 2845 # define png_get_uint_32(buf) ( *((png_uint_32p) (buf))) 2836 2846 # define png_get_uint_16(buf) ( *((png_uint_16p) (buf))) … … 2878 2888 #define PNG_HAVE_IEND 0x10 2879 2889 2880 #if defined(PNG_INTERNAL)2890 #ifdef PNG_INTERNAL 2881 2891 2882 2892 /* More modes of operation. Note that after an init, mode is set to … … 2921 2931 #define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */ 2922 2932 #define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */ 2923 /* 0x4000000L unused */ 2933 #define PNG_PREMULTIPLY_ALPHA 0x4000000L /* Added to libpng-1.2.41 */ 2934 /* by volker */ 2924 2935 /* 0x8000000L unused */ 2925 2936 /* 0x10000000L unused */ … … 3062 3073 * (old interface - DEPRECATED - use png_create_read_struct instead). 3063 3074 */ 3064 extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr)); 3075 extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr)) 3076 PNG_DEPRECATED; 3065 3077 #undef png_read_init 3066 3078 #define png_read_init(png_ptr) png_read_init_3(&png_ptr, \ … … 3080 3092 * (old interface - DEPRECATED - use png_create_write_struct instead). 3081 3093 */ 3082 extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr)); 3094 extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr)) 3095 PNG_DEPRECATED; 3083 3096 #undef png_write_init 3084 3097 #define png_write_init(png_ptr) png_write_init_3(&png_ptr, \ … … 3093 3106 3094 3107 /* Allocate memory for an internal libpng struct */ 3095 PNG_EXTERN png_voidp png_create_struct PNGARG((int type)) ;3108 PNG_EXTERN png_voidp png_create_struct PNGARG((int type)) PNG_PRIVATE; 3096 3109 3097 3110 /* Free memory from internal libpng struct */ 3098 PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)) ;3111 PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)) PNG_PRIVATE; 3099 3112 3100 3113 PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr 3101 malloc_fn, png_voidp mem_ptr)) ;3114 malloc_fn, png_voidp mem_ptr)) PNG_PRIVATE; 3102 3115 PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, 3103 png_free_ptr free_fn, png_voidp mem_ptr)) ;3116 png_free_ptr free_fn, png_voidp mem_ptr)) PNG_PRIVATE; 3104 3117 3105 3118 /* Free any memory that info_ptr points to and reset struct. */ 3106 3119 PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, 3107 png_infop info_ptr)) ;3120 png_infop info_ptr)) PNG_PRIVATE; 3108 3121 3109 3122 #ifndef PNG_1_0_X 3110 3123 /* Function to allocate memory for zlib. */ 3111 PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); 3124 PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, 3125 uInt size)) PNG_PRIVATE; 3112 3126 3113 3127 /* Function to free memory for zlib */ 3114 PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)) ;3128 PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)) PNG_PRIVATE; 3115 3129 3116 3130 #ifdef PNG_SIZE_T 3117 3131 /* Function to convert a sizeof an item to png_sizeof item */ 3118 PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)); 3132 PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size)) 3133 PNG_PRIVATE; 3119 3134 #endif 3120 3135 … … 3124 3139 3125 3140 PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, 3126 png_bytep data, png_size_t length)) ;3141 png_bytep data, png_size_t length)) PNG_PRIVATE; 3127 3142 3128 3143 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED 3129 3144 PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, 3130 png_bytep buffer, png_size_t length)) ;3145 png_bytep buffer, png_size_t length)) PNG_PRIVATE; 3131 3146 #endif 3132 3147 3133 3148 PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, 3134 png_bytep data, png_size_t length)); 3135 3136 #if defined(PNG_WRITE_FLUSH_SUPPORTED) 3137 #if !defined(PNG_NO_STDIO) 3138 PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)); 3149 png_bytep data, png_size_t length)) PNG_PRIVATE; 3150 3151 #ifdef PNG_WRITE_FLUSH_SUPPORTED 3152 #ifdef PNG_STDIO_SUPPORTED 3153 PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)) 3154 PNG_PRIVATE; 3139 3155 #endif 3140 3156 #endif … … 3142 3158 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED 3143 3159 PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr, 3144 png_bytep buffer, png_size_t length)) ;3160 png_bytep buffer, png_size_t length)) PNG_PRIVATE; 3145 3161 #endif 3146 3162 #endif /* PNG_1_0_X */ 3147 3163 3148 3164 /* Reset the CRC variable */ 3149 PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)) ;3165 PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3150 3166 3151 3167 /* Write the "data" buffer to whatever output you are using. */ 3152 3168 PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, 3153 png_size_t length)) ;3169 png_size_t length)) PNG_PRIVATE; 3154 3170 3155 3171 /* Read data from whatever input you are using into the "data" buffer */ 3156 3172 PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, 3157 png_size_t length)) ;3173 png_size_t length)) PNG_PRIVATE; 3158 3174 3159 3175 /* Read bytes into buf, and update png_ptr->crc */ 3160 3176 PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, 3161 png_size_t length)) ;3177 png_size_t length)) PNG_PRIVATE; 3162 3178 3163 3179 /* Decompress data in a chunk that uses compression */ … … 3166 3182 PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, 3167 3183 int comp_type, png_size_t chunklength, 3168 png_size_t prefix_length, png_size_t *data_length)) ;3184 png_size_t prefix_length, png_size_t *data_length)) PNG_PRIVATE; 3169 3185 #endif 3170 3186 3171 3187 /* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ 3172 PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); 3188 PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip) 3189 PNG_PRIVATE); 3173 3190 3174 3191 /* Read the CRC from the file and compare it to the libpng calculated CRC */ 3175 PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)) ;3192 PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3176 3193 3177 3194 /* Calculate the CRC over a section of data. Note that we are only … … 3180 3197 */ 3181 3198 PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, 3182 png_size_t length)) ;3183 3184 #if defined(PNG_WRITE_FLUSH_SUPPORTED)3185 PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)) ;3199 png_size_t length)) PNG_PRIVATE; 3200 3201 #ifdef PNG_WRITE_FLUSH_SUPPORTED 3202 PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3186 3203 #endif 3187 3204 3188 3205 /* Simple function to write the signature */ 3189 PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)) ;3206 PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3190 3207 3191 3208 /* Write various chunks */ … … 3197 3214 png_uint_32 height, 3198 3215 int bit_depth, int color_type, int compression_method, int filter_method, 3199 int interlace_method)) ;3216 int interlace_method)) PNG_PRIVATE; 3200 3217 3201 3218 PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, 3202 png_uint_32 num_pal)) ;3219 png_uint_32 num_pal)) PNG_PRIVATE; 3203 3220 3204 3221 PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, 3205 png_size_t length)) ;3206 3207 PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)) ;3208 3209 #if defined(PNG_WRITE_gAMA_SUPPORTED)3222 png_size_t length)) PNG_PRIVATE; 3223 3224 PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3225 3226 #ifdef PNG_WRITE_gAMA_SUPPORTED 3210 3227 #ifdef PNG_FLOATING_POINT_SUPPORTED 3211 PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); 3228 PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)) 3229 PNG_PRIVATE; 3212 3230 #endif 3213 3231 #ifdef PNG_FIXED_POINT_SUPPORTED 3214 PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point3215 file_gamma));3216 #endif 3217 #endif 3218 3219 #if defined(PNG_WRITE_sBIT_SUPPORTED)3232 PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, 3233 png_fixed_point file_gamma)) PNG_PRIVATE; 3234 #endif 3235 #endif 3236 3237 #ifdef PNG_WRITE_sBIT_SUPPORTED 3220 3238 PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, 3221 int color_type)) ;3222 #endif 3223 3224 #if defined(PNG_WRITE_cHRM_SUPPORTED)3239 int color_type)) PNG_PRIVATE; 3240 #endif 3241 3242 #ifdef PNG_WRITE_cHRM_SUPPORTED 3225 3243 #ifdef PNG_FLOATING_POINT_SUPPORTED 3226 3244 PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, 3227 3245 double white_x, double white_y, 3228 3246 double red_x, double red_y, double green_x, double green_y, 3229 double blue_x, double blue_y)) ;3247 double blue_x, double blue_y)) PNG_PRIVATE; 3230 3248 #endif 3231 3249 #ifdef PNG_FIXED_POINT_SUPPORTED … … 3234 3252 png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point 3235 3253 int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, 3236 png_fixed_point int_blue_y)) ;3237 #endif 3238 #endif 3239 3240 #if defined(PNG_WRITE_sRGB_SUPPORTED)3254 png_fixed_point int_blue_y)) PNG_PRIVATE; 3255 #endif 3256 #endif 3257 3258 #ifdef PNG_WRITE_sRGB_SUPPORTED 3241 3259 PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, 3242 int intent)) ;3243 #endif 3244 3245 #if defined(PNG_WRITE_iCCP_SUPPORTED)3260 int intent)) PNG_PRIVATE; 3261 #endif 3262 3263 #ifdef PNG_WRITE_iCCP_SUPPORTED 3246 3264 PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, 3247 3265 png_charp name, int compression_type, 3248 png_charp profile, int proflen)) ;3266 png_charp profile, int proflen)) PNG_PRIVATE; 3249 3267 /* Note to maintainer: profile should be png_bytep */ 3250 3268 #endif 3251 3269 3252 #if defined(PNG_WRITE_sPLT_SUPPORTED)3270 #ifdef PNG_WRITE_sPLT_SUPPORTED 3253 3271 PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, 3254 png_sPLT_tp palette)) ;3255 #endif 3256 3257 #if defined(PNG_WRITE_tRNS_SUPPORTED)3272 png_sPLT_tp palette)) PNG_PRIVATE; 3273 #endif 3274 3275 #ifdef PNG_WRITE_tRNS_SUPPORTED 3258 3276 PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, 3259 png_color_16p values, int number, int color_type)) ;3260 #endif 3261 3262 #if defined(PNG_WRITE_bKGD_SUPPORTED)3277 png_color_16p values, int number, int color_type)) PNG_PRIVATE; 3278 #endif 3279 3280 #ifdef PNG_WRITE_bKGD_SUPPORTED 3263 3281 PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, 3264 png_color_16p values, int color_type)) ;3265 #endif 3266 3267 #if defined(PNG_WRITE_hIST_SUPPORTED)3282 png_color_16p values, int color_type)) PNG_PRIVATE; 3283 #endif 3284 3285 #ifdef PNG_WRITE_hIST_SUPPORTED 3268 3286 PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, 3269 int num_hist)) ;3287 int num_hist)) PNG_PRIVATE; 3270 3288 #endif 3271 3289 … … 3273 3291 defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) 3274 3292 PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, 3275 png_charp key, png_charpp new_key)) ;3276 #endif 3277 3278 #if defined(PNG_WRITE_tEXt_SUPPORTED)3293 png_charp key, png_charpp new_key)) PNG_PRIVATE; 3294 #endif 3295 3296 #ifdef PNG_WRITE_tEXt_SUPPORTED 3279 3297 PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, 3280 png_charp text, png_size_t text_len)) ;3281 #endif 3282 3283 #if defined(PNG_WRITE_zTXt_SUPPORTED)3298 png_charp text, png_size_t text_len)) PNG_PRIVATE; 3299 #endif 3300 3301 #ifdef PNG_WRITE_zTXt_SUPPORTED 3284 3302 PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, 3285 png_charp text, png_size_t text_len, int compression)) ;3286 #endif 3287 3288 #if defined(PNG_WRITE_iTXt_SUPPORTED)3303 png_charp text, png_size_t text_len, int compression)) PNG_PRIVATE; 3304 #endif 3305 3306 #ifdef PNG_WRITE_iTXt_SUPPORTED 3289 3307 PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, 3290 3308 int compression, png_charp key, png_charp lang, png_charp lang_key, 3291 png_charp text)) ;3292 #endif 3293 3294 #if defined(PNG_TEXT_SUPPORTED)/* Added at version 1.0.14 and 1.2.4 */3309 png_charp text)) PNG_PRIVATE; 3310 #endif 3311 3312 #ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ 3295 3313 PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, 3296 png_infop info_ptr, png_textp text_ptr, int num_text)) ;3297 #endif 3298 3299 #if defined(PNG_WRITE_oFFs_SUPPORTED)3314 png_infop info_ptr, png_textp text_ptr, int num_text)) PNG_PRIVATE; 3315 #endif 3316 3317 #ifdef PNG_WRITE_oFFs_SUPPORTED 3300 3318 PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, 3301 png_int_32 x_offset, png_int_32 y_offset, int unit_type)) ;3302 #endif 3303 3304 #if defined(PNG_WRITE_pCAL_SUPPORTED)3319 png_int_32 x_offset, png_int_32 y_offset, int unit_type)) PNG_PRIVATE; 3320 #endif 3321 3322 #ifdef PNG_WRITE_pCAL_SUPPORTED 3305 3323 PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, 3306 3324 png_int_32 X0, png_int_32 X1, int type, int nparams, 3307 png_charp units, png_charpp params)) ;3308 #endif 3309 3310 #if defined(PNG_WRITE_pHYs_SUPPORTED)3325 png_charp units, png_charpp params)) PNG_PRIVATE; 3326 #endif 3327 3328 #ifdef PNG_WRITE_pHYs_SUPPORTED 3311 3329 PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, 3312 3330 png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, 3313 int unit_type)) ;3314 #endif 3315 3316 #if defined(PNG_WRITE_tIME_SUPPORTED)3331 int unit_type)) PNG_PRIVATE; 3332 #endif 3333 3334 #ifdef PNG_WRITE_tIME_SUPPORTED 3317 3335 PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, 3318 png_timep mod_time)) ;3319 #endif 3320 3321 #if defined(PNG_WRITE_sCAL_SUPPORTED)3336 png_timep mod_time)) PNG_PRIVATE; 3337 #endif 3338 3339 #ifdef PNG_WRITE_sCAL_SUPPORTED 3322 3340 #if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) 3323 3341 PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, 3324 int unit, double width, double height)) ;3342 int unit, double width, double height)) PNG_PRIVATE; 3325 3343 #else 3326 3344 #ifdef PNG_FIXED_POINT_SUPPORTED 3327 3345 PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, 3328 int unit, png_charp width, png_charp height)) ;3346 int unit, png_charp width, png_charp height)) PNG_PRIVATE; 3329 3347 #endif 3330 3348 #endif … … 3332 3350 3333 3351 /* Called when finished processing a row of data */ 3334 PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)) ;3352 PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3335 3353 3336 3354 /* Internal use only. Called before first row of data */ 3337 PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)) ;3338 3339 #if defined(PNG_READ_GAMMA_SUPPORTED)3340 PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)) ;3355 PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3356 3357 #ifdef PNG_READ_GAMMA_SUPPORTED 3358 PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3341 3359 #endif 3342 3360 3343 3361 /* Combine a row of data, dealing with alpha, etc. if requested */ 3344 3362 PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, 3345 int mask)) ;3346 3347 #if defined(PNG_READ_INTERLACING_SUPPORTED)3363 int mask)) PNG_PRIVATE; 3364 3365 #ifdef PNG_READ_INTERLACING_SUPPORTED 3348 3366 /* Expand an interlaced row */ 3349 3367 /* OLD pre-1.0.9 interface: 3350 3368 PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, 3351 png_bytep row, int pass, png_uint_32 transformations)) ;3352 */ 3353 PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)) ;3369 png_bytep row, int pass, png_uint_32 transformations)) PNG_PRIVATE; 3370 */ 3371 PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3354 3372 #endif 3355 3373 3356 3374 /* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ 3357 3375 3358 #if defined(PNG_WRITE_INTERLACING_SUPPORTED)3376 #ifdef PNG_WRITE_INTERLACING_SUPPORTED 3359 3377 /* Grab pixels out of a row for an interlaced pass */ 3360 3378 PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, 3361 png_bytep row, int pass)) ;3379 png_bytep row, int pass)) PNG_PRIVATE; 3362 3380 #endif 3363 3381 3364 3382 /* Unfilter a row */ 3365 3383 PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, 3366 png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); 3384 png_row_infop row_info, png_bytep row, png_bytep prev_row, 3385 int filter)) PNG_PRIVATE; 3367 3386 3368 3387 /* Choose the best filter to use and filter the row data */ 3369 3388 PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, 3370 png_row_infop row_info)) ;3389 png_row_infop row_info)) PNG_PRIVATE; 3371 3390 3372 3391 /* Write out the filtered row. */ 3373 3392 PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, 3374 png_bytep filtered_row)) ;3393 png_bytep filtered_row)) PNG_PRIVATE; 3375 3394 /* Finish a row while reading, dealing with interlacing passes, etc. */ 3376 3395 PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); 3377 3396 3378 3397 /* Initialize the row buffers, etc. */ 3379 PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)) ;3398 PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3380 3399 /* Optional call to update the users info structure */ 3381 3400 PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, 3382 png_infop info_ptr)) ;3401 png_infop info_ptr)) PNG_PRIVATE; 3383 3402 3384 3403 /* These are the functions that do the transformations */ 3385 #if defined(PNG_READ_FILLER_SUPPORTED)3404 #ifdef PNG_READ_FILLER_SUPPORTED 3386 3405 PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, 3387 png_bytep row, png_uint_32 filler, png_uint_32 flags)) ;3388 #endif 3389 3390 #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED)3406 png_bytep row, png_uint_32 filler, png_uint_32 flags)) PNG_PRIVATE; 3407 #endif 3408 3409 #ifdef PNG_READ_SWAP_ALPHA_SUPPORTED 3391 3410 PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, 3392 png_bytep row)) ;3393 #endif 3394 3395 #if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)3411 png_bytep row)) PNG_PRIVATE; 3412 #endif 3413 3414 #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED 3396 3415 PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, 3397 png_bytep row)) ;3398 #endif 3399 3400 #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED)3416 png_bytep row)) PNG_PRIVATE; 3417 #endif 3418 3419 #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED 3401 3420 PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, 3402 png_bytep row)) ;3403 #endif 3404 3405 #if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)3421 png_bytep row)) PNG_PRIVATE; 3422 #endif 3423 3424 #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED 3406 3425 PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, 3407 png_bytep row)) ;3426 png_bytep row)) PNG_PRIVATE; 3408 3427 #endif 3409 3428 … … 3411 3430 defined(PNG_READ_STRIP_ALPHA_SUPPORTED) 3412 3431 PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, 3413 png_bytep row, png_uint_32 flags)) ;3432 png_bytep row, png_uint_32 flags)) PNG_PRIVATE; 3414 3433 #endif 3415 3434 3416 3435 #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) 3417 PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); 3436 PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, 3437 png_bytep row)) PNG_PRIVATE; 3418 3438 #endif 3419 3439 3420 3440 #if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) 3421 PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); 3422 #endif 3423 3424 #if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) 3441 PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, 3442 png_bytep row)) PNG_PRIVATE; 3443 #endif 3444 3445 #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED 3425 3446 PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop 3426 row_info, png_bytep row)) ;3427 #endif 3428 3429 #if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED)3447 row_info, png_bytep row)) PNG_PRIVATE; 3448 #endif 3449 3450 #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED 3430 3451 PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, 3431 png_bytep row)); 3432 #endif 3433 3434 #if defined(PNG_READ_PACK_SUPPORTED) 3435 PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); 3436 #endif 3437 3438 #if defined(PNG_READ_SHIFT_SUPPORTED) 3452 png_bytep row)) PNG_PRIVATE; 3453 #endif 3454 3455 #ifdef PNG_READ_PACK_SUPPORTED 3456 PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, 3457 png_bytep row)) PNG_PRIVATE; 3458 #endif 3459 3460 #ifdef PNG_READ_SHIFT_SUPPORTED 3439 3461 PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, 3440 png_color_8p sig_bits)) ;3462 png_color_8p sig_bits)) PNG_PRIVATE; 3441 3463 #endif 3442 3464 3443 3465 #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) 3444 PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); 3445 #endif 3446 3447 #if defined(PNG_READ_16_TO_8_SUPPORTED) 3448 PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); 3449 #endif 3450 3451 #if defined(PNG_READ_DITHER_SUPPORTED) 3466 PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, 3467 png_bytep row)) PNG_PRIVATE; 3468 #endif 3469 3470 #ifdef PNG_READ_16_TO_8_SUPPORTED 3471 PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, 3472 png_bytep row)) PNG_PRIVATE; 3473 #endif 3474 3475 #ifdef PNG_READ_DITHER_SUPPORTED 3452 3476 PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info, 3453 png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup)); 3454 3455 # if defined(PNG_CORRECT_PALETTE_SUPPORTED) 3477 png_bytep row, png_bytep palette_lookup, 3478 png_bytep dither_lookup)) PNG_PRIVATE; 3479 3480 # ifdef PNG_CORRECT_PALETTE_SUPPORTED 3456 3481 PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, 3457 png_colorp palette, int num_palette)) ;3482 png_colorp palette, int num_palette)) PNG_PRIVATE; 3458 3483 # endif 3459 3484 #endif 3460 3485 3461 3486 #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) 3462 PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); 3463 #endif 3464 3465 #if defined(PNG_WRITE_PACK_SUPPORTED) 3487 PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, 3488 png_bytep row)) PNG_PRIVATE; 3489 #endif 3490 3491 #ifdef PNG_WRITE_PACK_SUPPORTED 3466 3492 PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, 3467 png_bytep row, png_uint_32 bit_depth)) ;3468 #endif 3469 3470 #if defined(PNG_WRITE_SHIFT_SUPPORTED)3493 png_bytep row, png_uint_32 bit_depth)) PNG_PRIVATE; 3494 #endif 3495 3496 #ifdef PNG_WRITE_SHIFT_SUPPORTED 3471 3497 PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, 3472 png_color_8p bit_depth)) ;3473 #endif 3474 3475 #if defined(PNG_READ_BACKGROUND_SUPPORTED)3476 #if defined(PNG_READ_GAMMA_SUPPORTED)3498 png_color_8p bit_depth)) PNG_PRIVATE; 3499 #endif 3500 3501 #ifdef PNG_READ_BACKGROUND_SUPPORTED 3502 #ifdef PNG_READ_GAMMA_SUPPORTED 3477 3503 PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, 3478 3504 png_color_16p trans_values, png_color_16p background, … … 3480 3506 png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, 3481 3507 png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, 3482 png_uint_16pp gamma_16_to_1, int gamma_shift)) ;3508 png_uint_16pp gamma_16_to_1, int gamma_shift)) PNG_PRIVATE; 3483 3509 #else 3484 3510 PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, 3485 png_color_16p trans_values, png_color_16p background)) ;3486 #endif 3487 #endif 3488 3489 #if defined(PNG_READ_GAMMA_SUPPORTED)3511 png_color_16p trans_values, png_color_16p background)) PNG_PRIVATE; 3512 #endif 3513 #endif 3514 3515 #ifdef PNG_READ_GAMMA_SUPPORTED 3490 3516 PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, 3491 3517 png_bytep gamma_table, png_uint_16pp gamma_16_table, 3492 int gamma_shift)) ;3493 #endif 3494 3495 #if defined(PNG_READ_EXPAND_SUPPORTED)3518 int gamma_shift)) PNG_PRIVATE; 3519 #endif 3520 3521 #ifdef PNG_READ_EXPAND_SUPPORTED 3496 3522 PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, 3497 png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); 3523 png_bytep row, png_colorp palette, png_bytep trans, 3524 int num_trans)) PNG_PRIVATE; 3498 3525 PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, 3499 png_bytep row, png_color_16p trans_value)) ;3526 png_bytep row, png_color_16p trans_value)) PNG_PRIVATE; 3500 3527 #endif 3501 3528 … … 3506 3533 /* Decode the IHDR chunk */ 3507 3534 PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, 3508 png_uint_32 length)) ;3535 png_uint_32 length)) PNG_PRIVATE; 3509 3536 PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, 3510 3537 png_uint_32 length)); … … 3512 3539 png_uint_32 length)); 3513 3540 3514 #if defined(PNG_READ_bKGD_SUPPORTED)3541 #ifdef PNG_READ_bKGD_SUPPORTED 3515 3542 PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, 3516 png_uint_32 length)) ;3517 #endif 3518 3519 #if defined(PNG_READ_cHRM_SUPPORTED)3543 png_uint_32 length)) PNG_PRIVATE; 3544 #endif 3545 3546 #ifdef PNG_READ_cHRM_SUPPORTED 3520 3547 PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, 3521 png_uint_32 length)) ;3522 #endif 3523 3524 #if defined(PNG_READ_gAMA_SUPPORTED)3548 png_uint_32 length)) PNG_PRIVATE; 3549 #endif 3550 3551 #ifdef PNG_READ_gAMA_SUPPORTED 3525 3552 PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, 3526 png_uint_32 length)) ;3527 #endif 3528 3529 #if defined(PNG_READ_hIST_SUPPORTED)3553 png_uint_32 length)) PNG_PRIVATE; 3554 #endif 3555 3556 #ifdef PNG_READ_hIST_SUPPORTED 3530 3557 PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, 3531 png_uint_32 length)) ;3532 #endif 3533 3534 #if defined(PNG_READ_iCCP_SUPPORTED)3558 png_uint_32 length)) PNG_PRIVATE; 3559 #endif 3560 3561 #ifdef PNG_READ_iCCP_SUPPORTED 3535 3562 extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, 3536 3563 png_uint_32 length)); 3537 3564 #endif /* PNG_READ_iCCP_SUPPORTED */ 3538 3565 3539 #if defined(PNG_READ_iTXt_SUPPORTED)3566 #ifdef PNG_READ_iTXt_SUPPORTED 3540 3567 PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, 3541 png_uint_32 length)) ;3542 #endif 3543 3544 #if defined(PNG_READ_oFFs_SUPPORTED)3568 png_uint_32 length)) PNG_PRIVATE; 3569 #endif 3570 3571 #ifdef PNG_READ_oFFs_SUPPORTED 3545 3572 PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, 3546 png_uint_32 length)) ;3547 #endif 3548 3549 #if defined(PNG_READ_pCAL_SUPPORTED)3573 png_uint_32 length)) PNG_PRIVATE; 3574 #endif 3575 3576 #ifdef PNG_READ_pCAL_SUPPORTED 3550 3577 PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, 3551 png_uint_32 length)) ;3552 #endif 3553 3554 #if defined(PNG_READ_pHYs_SUPPORTED)3578 png_uint_32 length)) PNG_PRIVATE; 3579 #endif 3580 3581 #ifdef PNG_READ_pHYs_SUPPORTED 3555 3582 PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, 3556 png_uint_32 length)) ;3557 #endif 3558 3559 #if defined(PNG_READ_sBIT_SUPPORTED)3583 png_uint_32 length)) PNG_PRIVATE; 3584 #endif 3585 3586 #ifdef PNG_READ_sBIT_SUPPORTED 3560 3587 PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, 3561 png_uint_32 length)) ;3562 #endif 3563 3564 #if defined(PNG_READ_sCAL_SUPPORTED)3588 png_uint_32 length)) PNG_PRIVATE; 3589 #endif 3590 3591 #ifdef PNG_READ_sCAL_SUPPORTED 3565 3592 PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, 3566 png_uint_32 length)) ;3567 #endif 3568 3569 #if defined(PNG_READ_sPLT_SUPPORTED)3593 png_uint_32 length)) PNG_PRIVATE; 3594 #endif 3595 3596 #ifdef PNG_READ_sPLT_SUPPORTED 3570 3597 extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, 3571 png_uint_32 length)) ;3598 png_uint_32 length)) PNG_PRIVATE; 3572 3599 #endif /* PNG_READ_sPLT_SUPPORTED */ 3573 3600 3574 #if defined(PNG_READ_sRGB_SUPPORTED)3601 #ifdef PNG_READ_sRGB_SUPPORTED 3575 3602 PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, 3576 png_uint_32 length)) ;3577 #endif 3578 3579 #if defined(PNG_READ_tEXt_SUPPORTED)3603 png_uint_32 length)) PNG_PRIVATE; 3604 #endif 3605 3606 #ifdef PNG_READ_tEXt_SUPPORTED 3580 3607 PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, 3581 png_uint_32 length)) ;3582 #endif 3583 3584 #if defined(PNG_READ_tIME_SUPPORTED)3608 png_uint_32 length)) PNG_PRIVATE; 3609 #endif 3610 3611 #ifdef PNG_READ_tIME_SUPPORTED 3585 3612 PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, 3586 png_uint_32 length)) ;3587 #endif 3588 3589 #if defined(PNG_READ_tRNS_SUPPORTED)3613 png_uint_32 length)) PNG_PRIVATE; 3614 #endif 3615 3616 #ifdef PNG_READ_tRNS_SUPPORTED 3590 3617 PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, 3591 png_uint_32 length)) ;3592 #endif 3593 3594 #if defined(PNG_READ_zTXt_SUPPORTED)3618 png_uint_32 length)) PNG_PRIVATE; 3619 #endif 3620 3621 #ifdef PNG_READ_zTXt_SUPPORTED 3595 3622 PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, 3596 png_uint_32 length)) ;3623 png_uint_32 length)) PNG_PRIVATE; 3597 3624 #endif 3598 3625 3599 3626 PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, 3600 png_infop info_ptr, png_uint_32 length)) ;3627 png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; 3601 3628 3602 3629 PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, 3603 png_bytep chunk_name)) ;3630 png_bytep chunk_name)) PNG_PRIVATE; 3604 3631 3605 3632 /* Handle the transformations for reading and writing */ 3606 PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); 3607 PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); 3608 3609 PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); 3633 PNG_EXTERN void png_do_read_transformations 3634 PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3635 PNG_EXTERN void png_do_write_transformations 3636 PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3637 3638 PNG_EXTERN void png_init_read_transformations 3639 PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3610 3640 3611 3641 #ifdef PNG_PROGRESSIVE_READ_SUPPORTED 3612 3642 PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, 3613 png_infop info_ptr)) ;3643 png_infop info_ptr)) PNG_PRIVATE; 3614 3644 PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, 3615 png_infop info_ptr)) ;3616 PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)) ;3645 png_infop info_ptr)) PNG_PRIVATE; 3646 PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3617 3647 PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, 3618 png_uint_32 length)) ;3619 PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)) ;3620 PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)) ;3648 png_uint_32 length)) PNG_PRIVATE; 3649 PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3650 PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3621 3651 PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, 3622 png_bytep buffer, png_size_t buffer_length)) ;3623 PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)) ;3652 png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE; 3653 PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3624 3654 PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, 3625 png_bytep buffer, png_size_t buffer_length)) ;3626 PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)) ;3655 png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE; 3656 PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3627 3657 PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, 3628 png_infop info_ptr, png_uint_32 length)) ;3658 png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; 3629 3659 PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, 3630 png_infop info_ptr)) ;3660 png_infop info_ptr)) PNG_PRIVATE; 3631 3661 PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, 3632 png_infop info_ptr)); 3633 PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); 3662 png_infop info_ptr)) PNG_PRIVATE; 3663 PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, 3664 png_bytep row)) PNG_PRIVATE; 3634 3665 PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, 3635 png_infop info_ptr)) ;3666 png_infop info_ptr)) PNG_PRIVATE; 3636 3667 PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, 3637 png_infop info_ptr)); 3638 PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); 3639 #if defined(PNG_READ_tEXt_SUPPORTED) 3668 png_infop info_ptr)) PNG_PRIVATE; 3669 PNG_EXTERN void png_read_push_finish_row 3670 PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3671 #ifdef PNG_READ_tEXt_SUPPORTED 3640 3672 PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, 3641 png_infop info_ptr, png_uint_32 length)) ;3673 png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; 3642 3674 PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, 3643 png_infop info_ptr)) ;3644 #endif 3645 #if defined(PNG_READ_zTXt_SUPPORTED)3675 png_infop info_ptr)) PNG_PRIVATE; 3676 #endif 3677 #ifdef PNG_READ_zTXt_SUPPORTED 3646 3678 PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, 3647 png_infop info_ptr, png_uint_32 length)) ;3679 png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; 3648 3680 PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, 3649 png_infop info_ptr)) ;3650 #endif 3651 #if defined(PNG_READ_iTXt_SUPPORTED)3681 png_infop info_ptr)) PNG_PRIVATE; 3682 #endif 3683 #ifdef PNG_READ_iTXt_SUPPORTED 3652 3684 PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, 3653 png_infop info_ptr, png_uint_32 length)) ;3685 png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE; 3654 3686 PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, 3655 png_infop info_ptr)) ;3687 png_infop info_ptr)) PNG_PRIVATE; 3656 3688 #endif 3657 3689 … … 3660 3692 #ifdef PNG_MNG_FEATURES_SUPPORTED 3661 3693 PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, 3662 png_bytep row)) ;3694 png_bytep row)) PNG_PRIVATE; 3663 3695 PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, 3664 png_bytep row)) ;3665 #endif 3666 3667 #if defined(PNG_ASSEMBLER_CODE_SUPPORTED)3668 #if defined(PNG_MMX_CODE_SUPPORTED)3696 png_bytep row)) PNG_PRIVATE; 3697 #endif 3698 3699 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED 3700 #ifdef PNG_MMX_CODE_SUPPORTED 3669 3701 /* png.c */ /* PRIVATE */ 3670 PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)); 3671 #endif 3672 #endif 3673 3702 PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3703 #endif 3704 #endif 3705 3706 3707 /* The following six functions will be exported in libpng-1.4.0. */ 3674 3708 #if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) 3675 3709 PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr, … … 3688 3722 png_infop info_ptr)); 3689 3723 3690 #if defined(PNG_pHYs_SUPPORTED)3724 #ifdef PNG_pHYs_SUPPORTED 3691 3725 PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr, 3692 3726 png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); … … 3695 3729 3696 3730 /* Read the chunk header (length + type name) */ 3697 PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr)); 3731 PNG_EXTERN png_uint_32 png_read_chunk_header 3732 PNGARG((png_structp png_ptr)) PNG_PRIVATE; 3698 3733 3699 3734 /* Added at libpng version 1.2.34 */ 3700 #if defined(PNG_cHRM_SUPPORTED)3701 PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,3735 #ifdef PNG_cHRM_SUPPORTED 3736 PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, 3702 3737 png_fixed_point int_white_x, png_fixed_point int_white_y, 3703 3738 png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point 3704 3739 int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, 3705 png_fixed_point int_blue_y)) ;3706 #endif 3707 3708 #if defined(PNG_cHRM_SUPPORTED)3709 #if !defined(PNG_NO_CHECK_cHRM)3740 png_fixed_point int_blue_y)) PNG_PRIVATE; 3741 #endif 3742 3743 #ifdef PNG_cHRM_SUPPORTED 3744 #ifdef PNG_CHECK_cHRM_SUPPORTED 3710 3745 /* Added at libpng version 1.2.34 */ 3711 PNG_EXTERN void png_64bit_product (long v1, long v2, unsigned long *hi_product, 3712 unsigned long *lo_product); 3713 #endif 3714 #endif 3746 PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, 3747 unsigned long *hi_product, unsigned long *lo_product)) PNG_PRIVATE; 3748 #endif 3749 #endif 3750 3751 /* Added at libpng version 1.2.41 */ 3752 PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr, 3753 png_uint_32 width, png_uint_32 height, int bit_depth, 3754 int color_type, int interlace_type, int compression_type, 3755 int filter_type)) PNG_PRIVATE; 3756 3757 /* Added at libpng version 1.2.41 */ 3758 PNG_EXTERN png_voidp png_calloc PNGARG((png_structp png_ptr, 3759 png_uint_32 size)); 3715 3760 3716 3761 /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
