20 #define PNG_NO_PEDANTIC_WARNINGS 22 #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) 24 #ifdef PNG_bKGD_SUPPORTED 28 png_debug1(1,
"in %s storage function",
"bKGD");
30 if (png_ptr ==
NULL || info_ptr ==
NULL)
38 #ifdef PNG_cHRM_SUPPORTED 39 #ifdef PNG_FLOATING_POINT_SUPPORTED 45 png_debug1(1,
"in %s storage function",
"cHRM");
47 if (png_ptr ==
NULL || info_ptr ==
NULL)
50 info_ptr->x_white = (float)white_x;
51 info_ptr->y_white = (float)white_y;
52 info_ptr->x_red = (float)red_x;
53 info_ptr->y_red = (float)red_y;
54 info_ptr->x_green = (float)green_x;
55 info_ptr->y_green = (float)green_y;
56 info_ptr->x_blue = (float)blue_x;
57 info_ptr->y_blue = (float)blue_y;
58 #ifdef PNG_FIXED_POINT_SUPPORTED 72 #ifdef PNG_FIXED_POINT_SUPPORTED 79 png_debug1(1,
"in %s storage function",
"cHRM fixed");
81 if (png_ptr ==
NULL || info_ptr ==
NULL)
84 #ifdef PNG_CHECK_cHRM_SUPPORTED 86 white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y))
89 info_ptr->int_x_white =
white_x;
90 info_ptr->int_y_white =
white_y;
91 info_ptr->int_x_red =
red_x;
92 info_ptr->int_y_red =
red_y;
93 info_ptr->int_x_green =
green_x;
94 info_ptr->int_y_green =
green_y;
95 info_ptr->int_x_blue =
blue_x;
96 info_ptr->int_y_blue =
blue_y;
97 #ifdef PNG_FLOATING_POINT_SUPPORTED 98 info_ptr->x_white = (float)(white_x/100000.);
99 info_ptr->y_white = (float)(white_y/100000.);
100 info_ptr->x_red = (float)( red_x/100000.);
101 info_ptr->y_red = (float)( red_y/100000.);
102 info_ptr->x_green = (float)(green_x/100000.);
103 info_ptr->y_green = (float)(green_y/100000.);
104 info_ptr->x_blue = (float)( blue_x/100000.);
105 info_ptr->y_blue = (float)( blue_y/100000.);
113 #ifdef PNG_gAMA_SUPPORTED 114 #ifdef PNG_FLOATING_POINT_SUPPORTED 120 png_debug1(1,
"in %s storage function",
"gAMA");
122 if (png_ptr ==
NULL || info_ptr ==
NULL)
126 if (file_gamma > 21474.83)
128 png_warning(png_ptr,
"Limiting gamma to 21474.83");
133 info_ptr->gamma = (float)png_gamma;
134 #ifdef PNG_FIXED_POINT_SUPPORTED 135 info_ptr->int_gamma = (
int)(png_gamma*100000.+.5);
138 if (png_gamma == 0.0)
148 png_debug1(1,
"in %s storage function",
"gAMA");
150 if (png_ptr ==
NULL || info_ptr ==
NULL)
155 png_warning(png_ptr,
"Limiting gamma to 21474.83");
162 png_warning(png_ptr,
"Setting negative gamma to zero");
166 png_gamma = int_gamma;
168 #ifdef PNG_FLOATING_POINT_SUPPORTED 169 info_ptr->gamma = (float)(png_gamma/100000.);
171 #ifdef PNG_FIXED_POINT_SUPPORTED 172 info_ptr->int_gamma = png_gamma;
180 #ifdef PNG_hIST_SUPPORTED 186 png_debug1(1,
"in %s storage function",
"hIST");
188 if (png_ptr ==
NULL || info_ptr ==
NULL)
191 if (info_ptr->num_palette == 0 || info_ptr->num_palette
195 "Invalid palette size, hIST allocation skipped.");
199 #ifdef PNG_FREE_ME_SUPPORTED 207 if (png_ptr->hist ==
NULL)
209 png_warning(png_ptr,
"Insufficient memory for hIST chunk data.");
213 for (i = 0; i < info_ptr->num_palette; i++)
214 png_ptr->hist[i] = hist[i];
215 info_ptr->hist = png_ptr->hist;
221 png_ptr->flags |= PNG_FLAG_FREE_HIST;
232 png_debug1(1,
"in %s storage function",
"IHDR");
234 if (png_ptr ==
NULL || info_ptr ==
NULL)
237 info_ptr->width =
width;
238 info_ptr->height =
height;
239 info_ptr->bit_depth = (
png_byte)bit_depth;
240 info_ptr->color_type = (
png_byte)color_type;
241 info_ptr->compression_type = (
png_byte)compression_type;
242 info_ptr->filter_type = (
png_byte)filter_type;
243 info_ptr->interlace_type = (
png_byte)interlace_type;
246 info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,
247 info_ptr->compression_type, info_ptr->filter_type);
250 info_ptr->channels = 1;
252 info_ptr->channels = 3;
254 info_ptr->channels = 1;
256 info_ptr->channels++;
257 info_ptr->pixel_depth = (
png_byte)(info_ptr->channels * info_ptr->bit_depth);
268 png_error(png_ptr,
"Image width is too large for this architecture");
271 info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
274 #ifdef PNG_oFFs_SUPPORTED 279 png_debug1(1,
"in %s storage function",
"oFFs");
281 if (png_ptr ==
NULL || info_ptr ==
NULL)
286 info_ptr->offset_unit_type = (
png_byte)unit_type;
291 #ifdef PNG_pCAL_SUPPORTED 300 png_debug1(1,
"in %s storage function",
"pCAL");
302 if (png_ptr ==
NULL || info_ptr ==
NULL)
306 png_debug1(3,
"allocating purpose for info (%lu bytes)",
307 (
unsigned long)length);
309 if (info_ptr->pcal_purpose ==
NULL)
311 png_warning(png_ptr,
"Insufficient memory for pCAL purpose.");
316 png_debug(3,
"storing X0, X1, type, and nparams in info");
317 info_ptr->pcal_X0 =
X0;
318 info_ptr->pcal_X1 =
X1;
319 info_ptr->pcal_type = (
png_byte)type;
320 info_ptr->pcal_nparams = (
png_byte)nparams;
323 png_debug1(3,
"allocating units for info (%lu bytes)",
324 (
unsigned long)length);
326 if (info_ptr->pcal_units ==
NULL)
328 png_warning(png_ptr,
"Insufficient memory for pCAL units.");
335 if (info_ptr->pcal_params ==
NULL)
337 png_warning(png_ptr,
"Insufficient memory for pCAL params.");
346 png_debug2(3,
"allocating parameter %d for info (%lu bytes)", i,
347 (
unsigned long)length);
349 if (info_ptr->pcal_params[i] ==
NULL)
351 png_warning(png_ptr,
"Insufficient memory for pCAL parameter.");
358 #ifdef PNG_FREE_ME_SUPPORTED 364 #if defined(PNG_READ_sCAL_SUPPORTED) || defined(PNG_WRITE_sCAL_SUPPORTED) 365 #ifdef PNG_FLOATING_POINT_SUPPORTED 370 png_debug1(1,
"in %s storage function",
"sCAL");
372 if (png_ptr ==
NULL || info_ptr ==
NULL)
375 info_ptr->scal_unit = (
png_byte)unit;
376 info_ptr->scal_pixel_width =
width;
377 info_ptr->scal_pixel_height =
height;
382 #ifdef PNG_FIXED_POINT_SUPPORTED 389 png_debug1(1,
"in %s storage function",
"sCAL");
397 png_debug1(3,
"allocating unit for info (%u bytes)",
398 (
unsigned int)length);
403 "Memory allocation failed while processing sCAL.");
409 png_debug1(3,
"allocating unit for info (%u bytes)",
410 (
unsigned int)length);
417 "Memory allocation failed while processing sCAL.");
422 #ifdef PNG_FREE_ME_SUPPORTED 430 #ifdef PNG_pHYs_SUPPORTED 435 png_debug1(1,
"in %s storage function",
"pHYs");
437 if (png_ptr ==
NULL || info_ptr ==
NULL)
440 info_ptr->x_pixels_per_unit =
res_x;
441 info_ptr->y_pixels_per_unit =
res_y;
442 info_ptr->phys_unit_type = (
png_byte)unit_type;
454 png_debug1(1,
"in %s storage function",
"PLTE");
456 if (png_ptr ==
NULL || info_ptr ==
NULL)
462 if (num_palette < 0 || num_palette > (
int) max_palette_length)
465 png_error(png_ptr,
"Invalid palette length");
477 #ifdef PNG_FREE_ME_SUPPORTED 488 info_ptr->palette = png_ptr->palette;
489 info_ptr->num_palette = png_ptr->num_palette = (
png_uint_16)num_palette;
491 #ifdef PNG_FREE_ME_SUPPORTED 494 png_ptr->flags |= PNG_FLAG_FREE_PLTE;
500 #ifdef PNG_sBIT_SUPPORTED 505 png_debug1(1,
"in %s storage function",
"sBIT");
507 if (png_ptr ==
NULL || info_ptr ==
NULL)
515 #ifdef PNG_sRGB_SUPPORTED 519 png_debug1(1,
"in %s storage function",
"sRGB");
521 if (png_ptr ==
NULL || info_ptr ==
NULL)
524 info_ptr->srgb_intent = (
png_byte)intent;
532 #ifdef PNG_gAMA_SUPPORTED 533 #ifdef PNG_FLOATING_POINT_SUPPORTED 536 #ifdef PNG_FIXED_POINT_SUPPORTED 540 #ifdef PNG_cHRM_SUPPORTED 541 #ifdef PNG_FLOATING_POINT_SUPPORTED 544 #ifdef PNG_FIXED_POINT_SUPPORTED 549 png_debug1(1,
"in %s storage function",
"sRGB_gAMA_and_cHRM");
551 if (png_ptr ==
NULL || info_ptr ==
NULL)
556 #ifdef PNG_gAMA_SUPPORTED 557 #ifdef PNG_FLOATING_POINT_SUPPORTED 558 file_gamma = (float).45455;
561 #ifdef PNG_FIXED_POINT_SUPPORTED 562 int_file_gamma = 45455L;
567 #ifdef PNG_cHRM_SUPPORTED 568 # ifdef PNG_FIXED_POINT_SUPPORTED 569 int_white_x = 31270L;
570 int_white_y = 32900L;
573 int_green_x = 30000L;
574 int_green_y = 60000L;
578 int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,
579 int_green_y, int_blue_x, int_blue_y);
582 # ifdef PNG_FLOATING_POINT_SUPPORTED 583 white_x = (float).3127;
584 white_y = (float).3290;
587 green_x = (float).30;
588 green_y = (float).60;
592 white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);
599 #ifdef PNG_iCCP_SUPPORTED 609 png_debug1(1,
"in %s storage function",
"iCCP");
616 if (new_iccp_name ==
NULL)
618 png_warning(png_ptr,
"Insufficient memory to process iCCP chunk.");
623 if (new_iccp_profile ==
NULL)
627 "Insufficient memory to process iCCP profile.");
634 info_ptr->iccp_proflen =
proflen;
635 info_ptr->iccp_name = new_iccp_name;
636 info_ptr->iccp_profile = new_iccp_profile;
640 info_ptr->iccp_compression = (
png_byte)compression_type;
641 #ifdef PNG_FREE_ME_SUPPORTED 648 #ifdef PNG_TEXT_SUPPORTED 656 png_error(png_ptr,
"Insufficient memory to store text");
666 png_ptr->chunk_name[0] ==
'\0') ?
669 if (png_ptr ==
NULL || info_ptr ==
NULL || num_text == 0)
675 if (info_ptr->num_text + num_text > info_ptr->max_text)
677 int old_max_text = info_ptr->max_text;
678 int old_num_text = info_ptr->num_text;
680 if (info_ptr->text !=
NULL)
684 info_ptr->max_text = info_ptr->num_text + num_text + 8;
685 old_text = info_ptr->text;
689 if (info_ptr->text ==
NULL)
692 info_ptr->max_text = old_max_text;
693 info_ptr->text = old_text;
702 info_ptr->max_text = num_text + 8;
703 info_ptr->num_text = 0;
706 if (info_ptr->text ==
NULL)
709 info_ptr->num_text = old_num_text;
710 info_ptr->max_text = old_max_text;
713 #ifdef PNG_FREE_ME_SUPPORTED 717 png_debug1(3,
"allocated %d entries for info_ptr->text",
725 png_textp textp = &(info_ptr->text[info_ptr->num_text]);
727 if (text_ptr[i].key ==
NULL)
732 if (text_ptr[i].compression <= 0)
739 #ifdef PNG_iTXt_SUPPORTED 743 if (text_ptr[i].lang !=
NULL)
747 if (text_ptr[i].lang_key !=
NULL)
748 lang_key_len =
png_strlen(text_ptr[i].lang_key);
759 if (text_ptr[i].text ==
NULL || text_ptr[i].text[0] ==
'\0')
762 #ifdef PNG_iTXt_SUPPORTED 763 if (text_ptr[i].compression > 0)
773 textp->compression = text_ptr[
i].compression;
778 (key_len + text_length + lang_len + lang_key_len + 4));
779 if (textp->key ==
NULL)
781 png_debug2(2,
"Allocated %lu bytes at %p in png_set_text",
783 (key_len + lang_len + lang_key_len + text_length + 4),
787 *(textp->key + key_len) =
'\0';
788 #ifdef PNG_iTXt_SUPPORTED 789 if (text_ptr[i].compression > 0)
791 textp->lang = textp->key + key_len + 1;
792 png_memcpy(textp->lang, text_ptr[i].lang, lang_len);
793 *(textp->lang + lang_len) =
'\0';
794 textp->lang_key = textp->lang + lang_len + 1;
795 png_memcpy(textp->lang_key, text_ptr[i].lang_key, lang_key_len);
796 *(textp->lang_key + lang_key_len) =
'\0';
797 textp->text = textp->lang_key + lang_key_len + 1;
802 #ifdef PNG_iTXt_SUPPORTED 804 textp->lang_key=
NULL;
806 textp->text = textp->key + key_len + 1;
811 *(textp->text + text_length) =
'\0';
813 #ifdef PNG_iTXt_SUPPORTED 814 if (textp->compression > 0)
816 textp->text_length = 0;
817 textp->itxt_length = text_length;
823 textp->text_length = text_length;
824 #ifdef PNG_iTXt_SUPPORTED 825 textp->itxt_length = 0;
828 info_ptr->num_text++;
829 png_debug1(3,
"transferred text chunk %d", info_ptr->num_text);
835 #ifdef PNG_tIME_SUPPORTED 839 png_debug1(1,
"in %s storage function",
"tIME");
841 if (png_ptr ==
NULL || info_ptr ==
NULL ||
842 (png_ptr->mode & PNG_WROTE_tIME))
845 if (mod_time->month == 0 || mod_time->month > 12 ||
846 mod_time->day == 0 || mod_time->day > 31 ||
847 mod_time->hour > 23 || mod_time->minute > 59 ||
848 mod_time->second > 60)
850 png_warning(png_ptr,
"Ignoring invalid time value");
859 #ifdef PNG_tRNS_SUPPORTED 864 png_debug1(1,
"in %s storage function",
"tRNS");
866 if (png_ptr ==
NULL || info_ptr ==
NULL)
871 png_warning(png_ptr,
"Ignoring invalid num_trans value");
882 #ifdef PNG_FREE_ME_SUPPORTED 889 if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH)
893 if (trans_values !=
NULL)
895 int sample_max = (1 << info_ptr->bit_depth);
897 (
int)trans_values->gray > sample_max) ||
899 ((
int)trans_values->red > sample_max ||
900 (
int)trans_values->green > sample_max ||
901 (
int)trans_values->blue > sample_max)))
903 "tRNS chunk has out-of-range samples for bit_depth");
904 png_memcpy(&(info_ptr->trans_values), trans_values,
914 #ifdef PNG_FREE_ME_SUPPORTED 917 png_ptr->flags |= PNG_FLAG_FREE_TRNS;
923 #ifdef PNG_sPLT_SUPPORTED 938 if (png_ptr ==
NULL || info_ptr ==
NULL)
942 (info_ptr->splt_palettes_num + nentries) *
946 png_warning(png_ptr,
"No memory for sPLT palettes.");
952 png_free(png_ptr, info_ptr->splt_palettes);
953 info_ptr->splt_palettes=
NULL;
963 if (to->name ==
NULL)
966 "Out of memory while processing sPLT chunk");
972 if (to->entries ==
NULL)
975 "Out of memory while processing sPLT chunk");
982 to->nentries = from->nentries;
983 to->depth = from->depth;
986 info_ptr->splt_palettes = np;
987 info_ptr->splt_palettes_num +=
nentries;
989 #ifdef PNG_FREE_ME_SUPPORTED 995 #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED 1003 if (png_ptr ==
NULL || info_ptr ==
NULL || num_unknowns == 0)
1012 "Out of memory while processing unknown chunk.");
1018 png_free(png_ptr, info_ptr->unknown_chunks);
1019 info_ptr->unknown_chunks =
NULL;
1029 to->size = from->size;
1031 to->location = (
png_byte)(png_ptr->mode & 0xff);
1033 if (from->size == 0)
1039 if (to->data ==
NULL)
1042 "Out of memory while processing unknown chunk.");
1046 png_memcpy(to->data, from->data, from->size);
1050 info_ptr->unknown_chunks = np;
1052 #ifdef PNG_FREE_ME_SUPPORTED 1060 if (png_ptr !=
NULL && info_ptr !=
NULL && chunk >= 0 && chunk <
1061 (
int)info_ptr->unknown_chunks_num)
1062 info_ptr->unknown_chunks[
chunk].location = (
png_byte)location;
1066 #if defined(PNG_1_0_X) || defined(PNG_1_2_X) 1067 #if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ 1068 defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) 1075 png_debug(1,
"in png_permit_empty_plte, DEPRECATED.");
1077 if (png_ptr ==
NULL)
1079 png_ptr->mng_features_permitted = (
png_byte)
1086 #ifdef PNG_MNG_FEATURES_SUPPORTED 1090 png_debug(1,
"in png_permit_mng_features");
1092 if (png_ptr ==
NULL)
1094 png_ptr->mng_features_permitted =
1096 return (
png_uint_32)png_ptr->mng_features_permitted;
1100 #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED 1106 int i, old_num_chunks;
1107 if (png_ptr ==
NULL)
1109 if (num_chunks == 0)
1112 png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS;
1114 png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS;
1117 png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS;
1119 png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS;
1122 if (chunk_list ==
NULL)
1124 old_num_chunks = png_ptr->num_chunk_list;
1127 (5*(num_chunks + old_num_chunks)));
1128 if (png_ptr->chunk_list !=
NULL)
1132 png_free(png_ptr, png_ptr->chunk_list);
1133 png_ptr->chunk_list=
NULL;
1135 png_memcpy(new_list + 5*old_num_chunks, chunk_list,
1137 for (p = new_list + 5*old_num_chunks + 4, i = 0; i<
num_chunks; i++, p += 5)
1139 png_ptr->num_chunk_list = old_num_chunks +
num_chunks;
1140 png_ptr->chunk_list = new_list;
1141 #ifdef PNG_FREE_ME_SUPPORTED 1147 #ifdef PNG_READ_USER_CHUNKS_SUPPORTED 1152 png_debug(1,
"in png_set_read_user_chunk_fn");
1154 if (png_ptr ==
NULL)
1162 #ifdef PNG_INFO_IMAGE_SUPPORTED 1166 png_debug1(1,
"in %s storage function",
"rows");
1168 if (png_ptr ==
NULL || info_ptr ==
NULL)
1171 if (info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers))
1183 if (png_ptr ==
NULL)
1188 png_ptr->zstream.next_out = png_ptr->zbuf;
1189 png_ptr->zstream.avail_out = (
uInt)png_ptr->zbuf_size;
1195 if (png_ptr && info_ptr)
1196 info_ptr->valid &= ~mask;
1201 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED 1207 if (png_ptr !=
NULL)
1208 png_ptr->asm_flags = 0;
1219 if (png_ptr ==
NULL)
1227 #ifdef PNG_SET_USER_LIMITS_SUPPORTED 1237 if (png_ptr ==
NULL)
1245 #ifdef PNG_BENIGN_ERRORS_SUPPORTED 1247 png_set_benign_errors(
png_structp png_ptr,
int allowed)
1249 png_debug(1,
"in png_set_benign_errors");
1252 png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;
1254 png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;
1259 #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ 1260 defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) 1289 png_debug1(2,
"Keyword to be checked is '%s'", key);
1292 if (*new_key ==
NULL)
1294 png_warning(png_ptr,
"Out of memory while procesing keyword");
1299 for (kp = key, dp = *new_key; *kp !=
'\0'; kp++, dp++)
1304 #if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE) 1308 "invalid keyword character 0x%02X", (
png_byte)*kp);
1311 png_warning(png_ptr,
"invalid character in keyword");
1323 kp = *new_key + key_len - 1;
1326 png_warning(png_ptr,
"trailing spaces removed from keyword");
1328 while (key_len && *kp ==
' ')
1339 png_warning(png_ptr,
"leading spaces removed from keyword");
1348 png_debug1(2,
"Checking for multiple internal spaces in '%s'", kp);
1351 for (kflag = 0, dp = *new_key; *kp !=
'\0'; kp++)
1353 if (*kp ==
' ' && kflag == 0)
1358 else if (*kp ==
' ')
1371 png_warning(png_ptr,
"extra interior spaces removed from keyword");
1382 png_warning(png_ptr,
"keyword length must be 1 - 79 characters");
1383 (*new_key)[79] =
'\0';
GLenum GLuint GLenum GLsizei length
void PNGAPI png_set_iCCP(png_structp png_ptr, png_infop info_ptr, png_charp name, int compression_type, png_charp profile, png_uint_32 proflen)
png_infop png_charpp int png_charpp profile
GLint GLint GLsizei GLsizei height
png_infop png_charpp int png_charpp png_uint_32 * proflen
void PNGAPI png_set_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type)
png_infop png_uint_32 * res_x
png_unknown_chunk FAR * png_unknown_chunkp
void PNGAPI png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
#define PNG_ALL_MNG_FEATURES
void PNGAPI png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, int num)
void PNGAPI png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, png_fixed_point blue_y)
void PNGAPI png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
void PNGAPI png_set_asm_flags(png_structp png_ptr, png_uint_32 asm_flags)
png_infop png_uint_32 png_uint_32 * res_y
png_infop double double double double double double double double * blue_y
void PNGAPI png_set_mmx_thresholds(png_structp png_ptr, png_byte mmx_bitdepth_threshold, png_uint_32 mmx_rowbytes_threshold)
png_infop png_textp * text_ptr
png_colorp int num_palette
png_infop double double double double double double double * blue_x
#define PNG_MAX_PALETTE_LENGTH
png_voidp png_calloc(png_structp png_ptr, png_uint_32 size)
void PNGAPI png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
png_color_16 FAR * png_color_16p
#define PNG_COLOR_TYPE_RGB
png_infop png_fixed_point png_fixed_point png_fixed_point * int_red_x
void PNGAPI png_set_unknown_chunks(png_structp png_ptr, png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
png_infop png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point * int_blue_y
png_infop png_color_16p * background
#define PNG_COLOR_TYPE_PALETTE
void PNGAPI png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, int intent)
#define PNG_UNUSED(param)
png_infop png_charp png_int_32 png_int_32 * X1
void PNGAPI png_set_user_limits(png_structp png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)
void PNGAPI png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
GLint GLint GLsizei width
png_infop png_int_32 png_int_32 * offset_y
png_infop png_unknown_chunkp int num_unknowns
png_infop png_int_32 * offset_x
PNG_CONST char FAR * png_const_charp
void PNGAPI png_set_sCAL(png_structp png_ptr, png_infop info_ptr, int unit, double width, double height)
void PNGAPI png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr, int chunk, int location)
png_infop double double double double * red_y
void PNGAPI png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
png_uint_32 PNGAPI png_permit_mng_features(png_structp png_ptr, png_uint_32 mng_features)
void PNGAPI png_set_oFFs(png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)
png_infop png_bytep * trans
void PNGAPI png_set_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit)
png_infop png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point * int_green_x
void PNGAPI png_set_sPLT(png_structp png_ptr, png_infop info_ptr, png_sPLT_tp entries, int nentries)
png_infop png_charp png_int_32 * X0
png_infop png_bytep int png_color_16p * trans_values
png_byte FAR *FAR * png_bytepp
png_infop png_charpp int * compression_type
png_infop png_fixed_point * int_white_x
png_infop png_uint_16p * hist
png_infop png_bytepp row_pointers
#define PNG_TEXT_COMPRESSION_NONE
void png_check_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type)
png_struct FAR * png_structp
#define PNG_HANDLE_CHUNK_ALWAYS
#define png_error(s1, s2)
#define PNG_COLOR_MASK_COLOR
#define PNG_ITXT_COMPRESSION_NONE
png_byte png_uint_32 mmx_rowbytes_threshold
unsigned short png_uint_16
void PNGAPI png_set_cHRM(png_structp png_ptr, png_infop info_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)
void PNGAPI png_set_pCAL(png_structp png_ptr, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)
png_byte mmx_bitdepth_threshold
png_infop png_bytep int * num_trans
#define PNG_COLOR_TYPE_GRAY
png_sPLT_entry FAR * png_sPLT_entryp
void PNGAPI png_warning(png_structp png_ptr, png_const_charp warning_message)
png_infop png_fixed_point * int_file_gamma
int png_check_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, png_fixed_point blue_y)
png_uint_16 FAR * png_uint_16p
void PNGAPI png_set_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp palette, int num_palette)
png_uint_32 png_uint_32 user_height_max
png_infop png_fixed_point png_fixed_point * int_white_y
#define png_debug1(l, m, p1)
#define PNG_HANDLE_CHUNK_IF_SAFE
png_infop png_fixed_point png_fixed_point png_fixed_point png_fixed_point * int_red_y
png_infop double * file_gamma
int png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)
GLuint const GLchar * name
void PNGAPI png_set_compression_buffer_size(png_structp png_ptr, png_uint_32 size)
#define PNG_FREE_ME_SUPPORTED
png_infop png_textp int * num_text
png_infop png_sPLT_tpp entries
GLenum const GLfloat * params
int png_bytep int num_chunks
#define PNG_COLOR_MASK_ALPHA
png_infop png_charp * purpose
png_voidp png_user_chunk_ptr read_user_chunk_fn
png_infop double double double double double double * green_y
png_sPLT_t FAR * png_sPLT_tp
png_infop double double * white_y
png_infop png_charp png_int_32 png_int_32 int int * nparams
png_color_8 FAR * png_color_8p
png_infop png_sPLT_tp int nentries
png_uint_32 user_width_max
png_size_t png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
png_int_32 png_fixed_point
png_infop double double double * red_x
char FAR *FAR * png_charpp
png_infop png_int_32 png_int_32 int * unit_type
void PNGAPI png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
#define PNG_FLAG_MNG_EMPTY_PLTE
void PNGAPI png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)
void PNGAPI png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)
void PNGAPI png_permit_empty_plte(png_structp png_ptr, int empty_plte_permitted)
void PNGAPI png_set_tRNS(png_structp png_ptr, png_infop info_ptr, png_bytep trans, int num_trans, png_color_16p trans_values)
png_infop double double double double double * green_x
void PNGAPI png_set_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)
unsigned long png_uint_32
void PNGAPI png_free(png_structp png_ptr, png_voidp ptr)
#define png_debug2(l, m, p1, p2)
png_infop double * white_x
png_infop png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point * int_green_y
png_infop png_timep * mod_time
void PNGAPI png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep chunk_list, int num_chunks)
png_infop png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point * int_blue_x
png_voidp PNGAPI png_malloc(png_structp png_ptr, png_uint_32 size)
png_voidp PNGAPI png_malloc_warn(png_structp png_ptr, png_uint_32 size)
void PNGAPI png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
png_infop png_unknown_chunkp unknowns
void PNGAPI png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point int_gamma)
png_infop png_color_8p * sig_bit
png_color FAR * png_colorp