39#if ZLIB_VERNUM < 0x1260
40# define PNGZ_MSG_CAST(s) png_constcast(char*,s)
41# define PNGZ_INPUT_CAST(b) png_constcast(png_bytep,b)
43# define PNGZ_MSG_CAST(s) (s)
44# define PNGZ_INPUT_CAST(b) (b)
56# define ZLIB_IO_MAX ((uInt)-1)
59#ifdef PNG_WRITE_SUPPORTED
61typedef struct png_compression_buffer
63 struct png_compression_buffer *
next;
65} png_compression_buffer, *png_compression_bufferp;
67#define PNG_COMPRESSION_BUFFER_SIZE(pp)\
68 (offsetof(png_compression_buffer, output) + (pp)->zbuffer_size)
79#ifdef PNG_COLORSPACE_SUPPORTED
102#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED)
112typedef struct png_colorspace
114#ifdef PNG_GAMMA_SUPPORTED
118#ifdef PNG_COLORSPACE_SUPPORTED
119 png_xy end_points_xy;
120 png_XYZ end_points_XYZ;
121 png_uint_16 rendering_intent;
128typedef const png_colorspace *
PNG_RESTRICT png_const_colorspacerp;
131#define PNG_COLORSPACE_HAVE_GAMMA 0x0001
132#define PNG_COLORSPACE_HAVE_ENDPOINTS 0x0002
133#define PNG_COLORSPACE_HAVE_INTENT 0x0004
134#define PNG_COLORSPACE_FROM_gAMA 0x0008
135#define PNG_COLORSPACE_FROM_cHRM 0x0010
136#define PNG_COLORSPACE_FROM_sRGB 0x0020
137#define PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB 0x0040
138#define PNG_COLORSPACE_MATCHES_sRGB 0x0080
139#define PNG_COLORSPACE_INVALID 0x8000
140#define PNG_COLORSPACE_CANCEL(flags) (0xffff ^ (flags))
145#ifdef PNG_SETJMP_SUPPORTED
147 png_longjmp_ptr longjmp_fn;
152#ifdef PNG_WARNINGS_SUPPORTED
153 png_error_ptr warning_fn;
160#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
161 png_user_transform_ptr read_user_transform_fn;
164#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
165 png_user_transform_ptr write_user_transform_fn;
169#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
170#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
171 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
173 png_byte user_transform_depth;
174 png_byte user_transform_channels;
185#ifdef PNG_WRITE_SUPPORTED
186 png_compression_bufferp zbuffer_list;
191 int zlib_window_bits;
196#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
198 int zlib_text_method;
199 int zlib_text_window_bits;
200 int zlib_text_mem_level;
201 int zlib_text_strategy;
205#ifdef PNG_WRITE_SUPPORTED
208 int zlib_set_window_bits;
209 int zlib_set_mem_level;
210 int zlib_set_strategy;
231#ifdef PNG_WRITE_FILTER_SUPPORTED
243#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
258#ifdef PNG_WRITE_SUPPORTED
259 png_byte usr_channels;
266#if ZLIB_VERNUM >= 0x1240
267 png_byte zstream_start;
269#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
273#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) ||\
274 defined(PNG_READ_ALPHA_MODE_SUPPORTED)
275 png_byte background_gamma_type;
278#ifdef PNG_READ_GAMMA_SUPPORTED
283#ifdef PNG_WRITE_FLUSH_SUPPORTED
284 png_flush_ptr output_flush_fn;
289#ifdef PNG_READ_GAMMA_SUPPORTED
295#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
296 defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \
297 defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
305#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
309#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
313#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
314 || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
321#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
322 png_progressive_info_ptr info_fn;
323 png_progressive_row_ptr row_fn;
324 png_progressive_end_ptr end_fn;
331 size_t save_buffer_size;
332 size_t save_buffer_max;
334 size_t current_buffer_size;
339#ifdef PNG_READ_QUANTIZE_SUPPORTED
345#ifdef PNG_SET_OPTION_SUPPORTED
349#if PNG_LIBPNG_VER < 10700
351#ifdef PNG_TIME_RFC1123_SUPPORTED
352 char time_buffer[29];
360#ifdef PNG_USER_CHUNKS_SUPPORTED
362#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
363 png_user_chunk_ptr read_user_chunk_fn;
367#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
369 unsigned int num_chunk_list;
375#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
376 png_byte rgb_to_gray_status;
378 png_byte rgb_to_gray_coefficients_set;
380 png_uint_16 rgb_to_gray_red_coeff;
381 png_uint_16 rgb_to_gray_green_coeff;
386#if defined(PNG_READ_EXPAND_SUPPORTED) && \
387 defined(PNG_ARM_NEON_IMPLEMENTATION)
392#if defined(PNG_MNG_FEATURES_SUPPORTED)
398#ifdef PNG_MNG_FEATURES_SUPPORTED
399 png_byte filter_type;
405#ifdef PNG_USER_MEM_SUPPORTED
407 png_malloc_ptr malloc_fn;
408 png_free_ptr free_fn;
414#ifdef PNG_READ_QUANTIZE_SUPPORTED
426#ifdef PNG_USER_LIMITS_SUPPORTED
442#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
452#ifdef PNG_READ_SUPPORTED
457#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
461#ifdef PNG_IO_STATE_SUPPORTED
473#ifdef PNG_READ_SUPPORTED
474#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
static const char filler[0x1000]
png_structrp png_fixed_point screen_gamma
png_const_structrp png_const_inforp double * red_X
png_const_structrp png_const_inforp double double double double double double double double * blue_Y
png_const_structrp png_const_inforp double double double double double double * green_Z
png_const_structrp png_const_inforp double double double * red_Z
png_const_structrp png_const_inforp double double double double double * green_Y
png_const_structrp png_const_inforp double double double double * green_X
png_const_structrp png_const_inforp double double * red_Y
#define PNG_FILTER_VALUE_LAST
png_const_structrp png_const_inforp double double double double double double double * blue_X
png_int_32 png_fixed_point
const png_byte * png_const_bytep
png_uint_16 ** png_uint_16pp
static unsigned __int64 next
png_read_status_ptr read_row_fn
png_write_status_ptr write_row_fn
png_uint_32 transformations
size_t old_big_row_buf_size
void(* read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info, png_bytep row, png_const_bytep prev_row)
png_byte transformed_pixel_depth
png_byte maximum_pixel_depth
png_byte compression_type
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)