1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libpng/pngstruct.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,510 @@ 1.4 + 1.5 +/* pngstruct.h - header file for PNG reference library 1.6 + * 1.7 + * Copyright (c) 1998-2013 Glenn Randers-Pehrson 1.8 + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 1.9 + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) 1.10 + * 1.11 + * Last changed in libpng 1.6.1 [March 28, 2013] 1.12 + * 1.13 + * This code is released under the libpng license. 1.14 + * For conditions of distribution and use, see the disclaimer 1.15 + * and license in png.h 1.16 + */ 1.17 + 1.18 +/* The structure that holds the information to read and write PNG files. 1.19 + * The only people who need to care about what is inside of this are the 1.20 + * people who will be modifying the library for their own special needs. 1.21 + * It should NOT be accessed directly by an application. 1.22 + */ 1.23 + 1.24 +#ifndef PNGSTRUCT_H 1.25 +#define PNGSTRUCT_H 1.26 +/* zlib.h defines the structure z_stream, an instance of which is included 1.27 + * in this structure and is required for decompressing the LZ compressed 1.28 + * data in PNG files. 1.29 + */ 1.30 +#ifndef ZLIB_CONST 1.31 + /* We must ensure that zlib uses 'const' in declarations. */ 1.32 +# define ZLIB_CONST 1.33 +#endif 1.34 +#include "zlib.h" 1.35 +#ifdef const 1.36 + /* zlib.h sometimes #defines const to nothing, undo this. */ 1.37 +# undef const 1.38 +#endif 1.39 + 1.40 +/* zlib.h has mediocre z_const use before 1.2.6, this stuff is for compatibility 1.41 + * with older builds. 1.42 + */ 1.43 +#if ZLIB_VERNUM < 0x1260 1.44 +# define PNGZ_MSG_CAST(s) png_constcast(char*,s) 1.45 +# define PNGZ_INPUT_CAST(b) png_constcast(png_bytep,b) 1.46 +#else 1.47 +# define PNGZ_MSG_CAST(s) (s) 1.48 +# define PNGZ_INPUT_CAST(b) (b) 1.49 +#endif 1.50 + 1.51 +/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib 1.52 + * can handle at once. This type need be no larger than 16 bits (so maximum of 1.53 + * 65535), this define allows us to discover how big it is, but limited by the 1.54 + * maximuum for png_size_t. The value can be overriden in a library build 1.55 + * (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably 1.56 + * lower value (e.g. 255 works). A lower value may help memory usage (slightly) 1.57 + * and may even improve performance on some systems (and degrade it on others.) 1.58 + */ 1.59 +#ifndef ZLIB_IO_MAX 1.60 +# define ZLIB_IO_MAX ((uInt)-1) 1.61 +#endif 1.62 + 1.63 +#ifdef PNG_WRITE_SUPPORTED 1.64 +/* The type of a compression buffer list used by the write code. */ 1.65 +typedef struct png_compression_buffer 1.66 +{ 1.67 + struct png_compression_buffer *next; 1.68 + png_byte output[1]; /* actually zbuf_size */ 1.69 +} png_compression_buffer, *png_compression_bufferp; 1.70 + 1.71 +#define PNG_COMPRESSION_BUFFER_SIZE(pp)\ 1.72 + (offsetof(png_compression_buffer, output) + (pp)->zbuffer_size) 1.73 +#endif 1.74 + 1.75 +/* Colorspace support; structures used in png_struct, png_info and in internal 1.76 + * functions to hold and communicate information about the color space. 1.77 + * 1.78 + * PNG_COLORSPACE_SUPPORTED is only required if the application will perform 1.79 + * colorspace corrections, otherwise all the colorspace information can be 1.80 + * skipped and the size of libpng can be reduced (significantly) by compiling 1.81 + * out the colorspace support. 1.82 + */ 1.83 +#ifdef PNG_COLORSPACE_SUPPORTED 1.84 +/* The chromaticities of the red, green and blue colorants and the chromaticity 1.85 + * of the corresponding white point (i.e. of rgb(1.0,1.0,1.0)). 1.86 + */ 1.87 +typedef struct png_xy 1.88 +{ 1.89 + png_fixed_point redx, redy; 1.90 + png_fixed_point greenx, greeny; 1.91 + png_fixed_point bluex, bluey; 1.92 + png_fixed_point whitex, whitey; 1.93 +} png_xy; 1.94 + 1.95 +/* The same data as above but encoded as CIE XYZ values. When this data comes 1.96 + * from chromaticities the sum of the Y values is assumed to be 1.0 1.97 + */ 1.98 +typedef struct png_XYZ 1.99 +{ 1.100 + png_fixed_point red_X, red_Y, red_Z; 1.101 + png_fixed_point green_X, green_Y, green_Z; 1.102 + png_fixed_point blue_X, blue_Y, blue_Z; 1.103 +} png_XYZ; 1.104 +#endif /* COLORSPACE */ 1.105 + 1.106 +#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) 1.107 +/* A colorspace is all the above plus, potentially, profile information, 1.108 + * however at present libpng does not use the profile internally so it is only 1.109 + * stored in the png_info struct (if iCCP is supported.) The rendering intent 1.110 + * is retained here and is checked. 1.111 + * 1.112 + * The file gamma encoding information is also stored here and gamma correction 1.113 + * is done by libpng, whereas color correction must currently be done by the 1.114 + * application. 1.115 + */ 1.116 +typedef struct png_colorspace 1.117 +{ 1.118 +#ifdef PNG_GAMMA_SUPPORTED 1.119 + png_fixed_point gamma; /* File gamma */ 1.120 +#endif 1.121 + 1.122 +#ifdef PNG_COLORSPACE_SUPPORTED 1.123 + png_xy end_points_xy; /* End points as chromaticities */ 1.124 + png_XYZ end_points_XYZ; /* End points as CIE XYZ colorant values */ 1.125 + png_uint_16 rendering_intent; /* Rendering intent of a profile */ 1.126 +#endif 1.127 + 1.128 + /* Flags are always defined to simplify the code. */ 1.129 + png_uint_16 flags; /* As defined below */ 1.130 +} png_colorspace, * PNG_RESTRICT png_colorspacerp; 1.131 + 1.132 +typedef const png_colorspace * PNG_RESTRICT png_const_colorspacerp; 1.133 + 1.134 +/* General flags for the 'flags' field */ 1.135 +#define PNG_COLORSPACE_HAVE_GAMMA 0x0001 1.136 +#define PNG_COLORSPACE_HAVE_ENDPOINTS 0x0002 1.137 +#define PNG_COLORSPACE_HAVE_INTENT 0x0004 1.138 +#define PNG_COLORSPACE_FROM_gAMA 0x0008 1.139 +#define PNG_COLORSPACE_FROM_cHRM 0x0010 1.140 +#define PNG_COLORSPACE_FROM_sRGB 0x0020 1.141 +#define PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB 0x0040 1.142 +#define PNG_COLORSPACE_MATCHES_sRGB 0x0080 /* exact match on profile */ 1.143 +#define PNG_COLORSPACE_INVALID 0x8000 1.144 +#define PNG_COLORSPACE_CANCEL(flags) (0xffff ^ (flags)) 1.145 +#endif /* COLORSPACE || GAMMA */ 1.146 + 1.147 +struct png_struct_def 1.148 +{ 1.149 +#ifdef PNG_SETJMP_SUPPORTED 1.150 + jmp_buf jmp_buf_local; /* New name in 1.6.0 for jmp_buf in png_struct */ 1.151 + png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ 1.152 + jmp_buf *jmp_buf_ptr; /* passed to longjmp_fn */ 1.153 + size_t jmp_buf_size; /* size of the above, if allocated */ 1.154 +#endif 1.155 + png_error_ptr error_fn; /* function for printing errors and aborting */ 1.156 +#ifdef PNG_WARNINGS_SUPPORTED 1.157 + png_error_ptr warning_fn; /* function for printing warnings */ 1.158 +#endif 1.159 + png_voidp error_ptr; /* user supplied struct for error functions */ 1.160 + png_rw_ptr write_data_fn; /* function for writing output data */ 1.161 + png_rw_ptr read_data_fn; /* function for reading input data */ 1.162 + png_voidp io_ptr; /* ptr to application struct for I/O functions */ 1.163 + 1.164 +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED 1.165 + png_user_transform_ptr read_user_transform_fn; /* user read transform */ 1.166 +#endif 1.167 + 1.168 +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED 1.169 + png_user_transform_ptr write_user_transform_fn; /* user write transform */ 1.170 +#endif 1.171 + 1.172 +/* These were added in libpng-1.0.2 */ 1.173 +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED 1.174 +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ 1.175 + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) 1.176 + png_voidp user_transform_ptr; /* user supplied struct for user transform */ 1.177 + png_byte user_transform_depth; /* bit depth of user transformed pixels */ 1.178 + png_byte user_transform_channels; /* channels in user transformed pixels */ 1.179 +#endif 1.180 +#endif 1.181 + 1.182 + png_uint_32 mode; /* tells us where we are in the PNG file */ 1.183 + png_uint_32 flags; /* flags indicating various things to libpng */ 1.184 + png_uint_32 transformations; /* which transformations to perform */ 1.185 + 1.186 + png_uint_32 zowner; /* ID (chunk type) of zstream owner, 0 if none */ 1.187 + z_stream zstream; /* decompression structure */ 1.188 + 1.189 +#ifdef PNG_WRITE_SUPPORTED 1.190 + png_compression_bufferp zbuffer_list; /* Created on demand during write */ 1.191 + uInt zbuffer_size; /* size of the actual buffer */ 1.192 + 1.193 + int zlib_level; /* holds zlib compression level */ 1.194 + int zlib_method; /* holds zlib compression method */ 1.195 + int zlib_window_bits; /* holds zlib compression window bits */ 1.196 + int zlib_mem_level; /* holds zlib compression memory level */ 1.197 + int zlib_strategy; /* holds zlib compression strategy */ 1.198 +#endif 1.199 +/* Added at libpng 1.5.4 */ 1.200 +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED 1.201 + int zlib_text_level; /* holds zlib compression level */ 1.202 + int zlib_text_method; /* holds zlib compression method */ 1.203 + int zlib_text_window_bits; /* holds zlib compression window bits */ 1.204 + int zlib_text_mem_level; /* holds zlib compression memory level */ 1.205 + int zlib_text_strategy; /* holds zlib compression strategy */ 1.206 +#endif 1.207 +/* End of material added at libpng 1.5.4 */ 1.208 +/* Added at libpng 1.6.0 */ 1.209 +#ifdef PNG_WRITE_SUPPORTED 1.210 + int zlib_set_level; /* Actual values set into the zstream on write */ 1.211 + int zlib_set_method; 1.212 + int zlib_set_window_bits; 1.213 + int zlib_set_mem_level; 1.214 + int zlib_set_strategy; 1.215 +#endif 1.216 + 1.217 + png_uint_32 width; /* width of image in pixels */ 1.218 + png_uint_32 height; /* height of image in pixels */ 1.219 + png_uint_32 num_rows; /* number of rows in current pass */ 1.220 + png_uint_32 usr_width; /* width of row at start of write */ 1.221 + png_size_t rowbytes; /* size of row in bytes */ 1.222 + png_uint_32 iwidth; /* width of current interlaced row in pixels */ 1.223 + png_uint_32 row_number; /* current row in interlace pass */ 1.224 + png_uint_32 chunk_name; /* PNG_CHUNK() id of current chunk */ 1.225 + png_bytep prev_row; /* buffer to save previous (unfiltered) row. 1.226 + * This is a pointer into big_prev_row 1.227 + */ 1.228 + png_bytep row_buf; /* buffer to save current (unfiltered) row. 1.229 + * This is a pointer into big_row_buf 1.230 + */ 1.231 +#ifdef PNG_WRITE_SUPPORTED 1.232 + png_bytep sub_row; /* buffer to save "sub" row when filtering */ 1.233 + png_bytep up_row; /* buffer to save "up" row when filtering */ 1.234 + png_bytep avg_row; /* buffer to save "avg" row when filtering */ 1.235 + png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ 1.236 +#endif 1.237 + png_size_t info_rowbytes; /* Added in 1.5.4: cache of updated row bytes */ 1.238 + 1.239 + png_uint_32 idat_size; /* current IDAT size for read */ 1.240 + png_uint_32 crc; /* current chunk CRC value */ 1.241 + png_colorp palette; /* palette from the input file */ 1.242 + png_uint_16 num_palette; /* number of color entries in palette */ 1.243 + 1.244 +/* Added at libpng-1.5.10 */ 1.245 +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED 1.246 + int num_palette_max; /* maximum palette index found in IDAT */ 1.247 +#endif 1.248 + 1.249 + png_uint_16 num_trans; /* number of transparency values */ 1.250 + png_byte compression; /* file compression type (always 0) */ 1.251 + png_byte filter; /* file filter type (always 0) */ 1.252 + png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ 1.253 + png_byte pass; /* current interlace pass (0 - 6) */ 1.254 + png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ 1.255 + png_byte color_type; /* color type of file */ 1.256 + png_byte bit_depth; /* bit depth of file */ 1.257 + png_byte usr_bit_depth; /* bit depth of users row: write only */ 1.258 + png_byte pixel_depth; /* number of bits per pixel */ 1.259 + png_byte channels; /* number of channels in file */ 1.260 +#ifdef PNG_WRITE_SUPPORTED 1.261 + png_byte usr_channels; /* channels at start of write: write only */ 1.262 +#endif 1.263 + png_byte sig_bytes; /* magic bytes read/written from start of file */ 1.264 + png_byte maximum_pixel_depth; 1.265 + /* pixel depth used for the row buffers */ 1.266 + png_byte transformed_pixel_depth; 1.267 + /* pixel depth after read/write transforms */ 1.268 +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) 1.269 + png_uint_16 filler; /* filler bytes for pixel expansion */ 1.270 +#endif 1.271 + 1.272 +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ 1.273 + defined(PNG_READ_ALPHA_MODE_SUPPORTED) 1.274 + png_byte background_gamma_type; 1.275 + png_fixed_point background_gamma; 1.276 + png_color_16 background; /* background color in screen gamma space */ 1.277 +#ifdef PNG_READ_GAMMA_SUPPORTED 1.278 + png_color_16 background_1; /* background normalized to gamma 1.0 */ 1.279 +#endif 1.280 +#endif /* PNG_bKGD_SUPPORTED */ 1.281 + 1.282 +#ifdef PNG_WRITE_FLUSH_SUPPORTED 1.283 + png_flush_ptr output_flush_fn; /* Function for flushing output */ 1.284 + png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ 1.285 + png_uint_32 flush_rows; /* number of rows written since last flush */ 1.286 +#endif 1.287 + 1.288 +#ifdef PNG_READ_GAMMA_SUPPORTED 1.289 + int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */ 1.290 + png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */ 1.291 + 1.292 + png_bytep gamma_table; /* gamma table for 8-bit depth files */ 1.293 + png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ 1.294 +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ 1.295 + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ 1.296 + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) 1.297 + png_bytep gamma_from_1; /* converts from 1.0 to screen */ 1.298 + png_bytep gamma_to_1; /* converts from file to 1.0 */ 1.299 + png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ 1.300 + png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ 1.301 +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ 1.302 +#endif 1.303 + 1.304 +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) 1.305 + png_color_8 sig_bit; /* significant bits in each available channel */ 1.306 +#endif 1.307 + 1.308 +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) 1.309 + png_color_8 shift; /* shift for significant bit tranformation */ 1.310 +#endif 1.311 + 1.312 +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ 1.313 + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) 1.314 + png_bytep trans_alpha; /* alpha values for paletted files */ 1.315 + png_color_16 trans_color; /* transparent color for non-paletted files */ 1.316 +#endif 1.317 + 1.318 + png_read_status_ptr read_row_fn; /* called after each row is decoded */ 1.319 + png_write_status_ptr write_row_fn; /* called after each row is encoded */ 1.320 +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED 1.321 + png_progressive_info_ptr info_fn; /* called after header data fully read */ 1.322 + png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */ 1.323 + png_progressive_end_ptr end_fn; /* called after image is complete */ 1.324 + png_bytep save_buffer_ptr; /* current location in save_buffer */ 1.325 + png_bytep save_buffer; /* buffer for previously read data */ 1.326 + png_bytep current_buffer_ptr; /* current location in current_buffer */ 1.327 + png_bytep current_buffer; /* buffer for recently used data */ 1.328 + png_uint_32 push_length; /* size of current input chunk */ 1.329 + png_uint_32 skip_length; /* bytes to skip in input data */ 1.330 + png_size_t save_buffer_size; /* amount of data now in save_buffer */ 1.331 + png_size_t save_buffer_max; /* total size of save_buffer */ 1.332 + png_size_t buffer_size; /* total amount of available input data */ 1.333 + png_size_t current_buffer_size; /* amount of data now in current_buffer */ 1.334 + int process_mode; /* what push library is currently doing */ 1.335 + int cur_palette; /* current push library palette index */ 1.336 + 1.337 +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ 1.338 + 1.339 +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) 1.340 +/* For the Borland special 64K segment handler */ 1.341 + png_bytepp offset_table_ptr; 1.342 + png_bytep offset_table; 1.343 + png_uint_16 offset_table_number; 1.344 + png_uint_16 offset_table_count; 1.345 + png_uint_16 offset_table_count_free; 1.346 +#endif 1.347 + 1.348 +#ifdef PNG_READ_QUANTIZE_SUPPORTED 1.349 + png_bytep palette_lookup; /* lookup table for quantizing */ 1.350 + png_bytep quantize_index; /* index translation for palette files */ 1.351 +#endif 1.352 + 1.353 +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED 1.354 + png_byte heuristic_method; /* heuristic for row filter selection */ 1.355 + png_byte num_prev_filters; /* number of weights for previous rows */ 1.356 + png_bytep prev_filters; /* filter type(s) of previous row(s) */ 1.357 + png_uint_16p filter_weights; /* weight(s) for previous line(s) */ 1.358 + png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ 1.359 + png_uint_16p filter_costs; /* relative filter calculation cost */ 1.360 + png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ 1.361 +#endif 1.362 + 1.363 + /* Options */ 1.364 +#ifdef PNG_SET_OPTION_SUPPORTED 1.365 + png_byte options; /* On/off state (up to 4 options) */ 1.366 +#endif 1.367 + 1.368 +#if PNG_LIBPNG_VER < 10700 1.369 +/* To do: remove this from libpng-1.7 */ 1.370 +#ifdef PNG_TIME_RFC1123_SUPPORTED 1.371 + char time_buffer[29]; /* String to hold RFC 1123 time text */ 1.372 +#endif 1.373 +#endif 1.374 + 1.375 +/* New members added in libpng-1.0.6 */ 1.376 + 1.377 + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ 1.378 + 1.379 +#ifdef PNG_USER_CHUNKS_SUPPORTED 1.380 + png_voidp user_chunk_ptr; 1.381 +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED 1.382 + png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ 1.383 +#endif 1.384 +#endif 1.385 + 1.386 +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED 1.387 + int unknown_default; /* As PNG_HANDLE_* */ 1.388 + unsigned int num_chunk_list; /* Number of entries in the list */ 1.389 + png_bytep chunk_list; /* List of png_byte[5]; the textual chunk name 1.390 + * followed by a PNG_HANDLE_* byte */ 1.391 +#endif 1.392 + 1.393 +/* New members added in libpng-1.0.3 */ 1.394 +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED 1.395 + png_byte rgb_to_gray_status; 1.396 + /* Added in libpng 1.5.5 to record setting of coefficients: */ 1.397 + png_byte rgb_to_gray_coefficients_set; 1.398 + /* These were changed from png_byte in libpng-1.0.6 */ 1.399 + png_uint_16 rgb_to_gray_red_coeff; 1.400 + png_uint_16 rgb_to_gray_green_coeff; 1.401 + /* deleted in 1.5.5: rgb_to_gray_blue_coeff; */ 1.402 +#endif 1.403 + 1.404 +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ 1.405 +#if defined(PNG_MNG_FEATURES_SUPPORTED) 1.406 +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ 1.407 + png_uint_32 mng_features_permitted; 1.408 +#endif 1.409 + 1.410 +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ 1.411 +#ifdef PNG_MNG_FEATURES_SUPPORTED 1.412 + png_byte filter_type; 1.413 +#endif 1.414 + 1.415 +#ifdef PNG_APNG_SUPPORTED 1.416 + png_uint_32 apng_flags; 1.417 + png_uint_32 next_seq_num; /* next fcTL/fdAT chunk sequence number */ 1.418 + png_uint_32 first_frame_width; 1.419 + png_uint_32 first_frame_height; 1.420 + 1.421 +#ifdef PNG_READ_APNG_SUPPORTED 1.422 + png_uint_32 num_frames_read; /* incremented after all image data of */ 1.423 + /* a frame is read */ 1.424 +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED 1.425 + png_progressive_frame_ptr frame_info_fn; /* frame info read callback */ 1.426 + png_progressive_frame_ptr frame_end_fn; /* frame data read callback */ 1.427 +#endif 1.428 +#endif 1.429 + 1.430 +#ifdef PNG_WRITE_APNG_SUPPORTED 1.431 + png_uint_32 num_frames_to_write; 1.432 + png_uint_32 num_frames_written; 1.433 +#endif 1.434 +#endif /* PNG_APNG_SUPPORTED */ 1.435 + 1.436 +/* New members added in libpng-1.2.0 */ 1.437 + 1.438 +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ 1.439 +#ifdef PNG_USER_MEM_SUPPORTED 1.440 + png_voidp mem_ptr; /* user supplied struct for mem functions */ 1.441 + png_malloc_ptr malloc_fn; /* function for allocating memory */ 1.442 + png_free_ptr free_fn; /* function for freeing memory */ 1.443 +#endif 1.444 + 1.445 +/* New member added in libpng-1.0.13 and 1.2.0 */ 1.446 + png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ 1.447 + 1.448 +#ifdef PNG_READ_QUANTIZE_SUPPORTED 1.449 +/* The following three members were added at version 1.0.14 and 1.2.4 */ 1.450 + png_bytep quantize_sort; /* working sort array */ 1.451 + png_bytep index_to_palette; /* where the original index currently is 1.452 + in the palette */ 1.453 + png_bytep palette_to_index; /* which original index points to this 1.454 + palette color */ 1.455 +#endif 1.456 + 1.457 +/* New members added in libpng-1.0.16 and 1.2.6 */ 1.458 + png_byte compression_type; 1.459 + 1.460 +#ifdef PNG_USER_LIMITS_SUPPORTED 1.461 + png_uint_32 user_width_max; 1.462 + png_uint_32 user_height_max; 1.463 + 1.464 + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown 1.465 + * chunks that can be stored (0 means unlimited). 1.466 + */ 1.467 + png_uint_32 user_chunk_cache_max; 1.468 + 1.469 + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk 1.470 + * can occupy when decompressed. 0 means unlimited. 1.471 + */ 1.472 + png_alloc_size_t user_chunk_malloc_max; 1.473 +#endif 1.474 + 1.475 +/* New member added in libpng-1.0.25 and 1.2.17 */ 1.476 +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED 1.477 + /* Temporary storage for unknown chunk that the library doesn't recognize, 1.478 + * used while reading the chunk. 1.479 + */ 1.480 + png_unknown_chunk unknown_chunk; 1.481 +#endif 1.482 + 1.483 +/* New member added in libpng-1.2.26 */ 1.484 + png_size_t old_big_row_buf_size; 1.485 + 1.486 +#ifdef PNG_READ_SUPPORTED 1.487 +/* New member added in libpng-1.2.30 */ 1.488 + png_bytep read_buffer; /* buffer for reading chunk data */ 1.489 + png_alloc_size_t read_buffer_size; /* current size of the buffer */ 1.490 +#endif 1.491 +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED 1.492 + uInt IDAT_read_size; /* limit on read buffer size for IDAT */ 1.493 +#endif 1.494 + 1.495 +#ifdef PNG_IO_STATE_SUPPORTED 1.496 +/* New member added in libpng-1.4.0 */ 1.497 + png_uint_32 io_state; 1.498 +#endif 1.499 + 1.500 +/* New member added in libpng-1.5.6 */ 1.501 + png_bytep big_prev_row; 1.502 + 1.503 +/* New member added in libpng-1.5.7 */ 1.504 + void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info, 1.505 + png_bytep row, png_const_bytep prev_row); 1.506 + 1.507 +#ifdef PNG_READ_SUPPORTED 1.508 +#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) 1.509 + png_colorspace colorspace; 1.510 +#endif 1.511 +#endif 1.512 +}; 1.513 +#endif /* PNGSTRUCT_H */