18#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
22#ifdef PNG_READ_SUPPORTED
29#ifndef PNG_USER_MEM_SUPPORTED
33 return png_create_read_struct_2(user_png_ver, error_ptr, error_fn,
42 png_error_ptr error_fn, png_error_ptr warn_fn,
png_voidp mem_ptr,
43 png_malloc_ptr malloc_fn, png_free_ptr free_fn),
PNG_ALLOCATED)
46 error_fn, warn_fn, mem_ptr, malloc_fn, free_fn);
56# ifdef PNG_SEQUENTIAL_READ_SUPPORTED
60# ifdef PNG_BENIGN_READ_ERRORS_SUPPORTED
82#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
94#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
117 png_chunk_error(
png_ptr,
"Missing IHDR before IDAT");
121 png_chunk_error(
png_ptr,
"Missing PLTE before IDAT");
124 png_chunk_benign_error(
png_ptr,
"Too many IDATs found");
144#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
145 else if ((keep = png_chunk_unknown_handling(
png_ptr, chunk_name)) != 0)
168#ifdef PNG_READ_bKGD_SUPPORTED
173#ifdef PNG_READ_cHRM_SUPPORTED
178#ifdef PNG_READ_eXIf_SUPPORTED
183#ifdef PNG_READ_gAMA_SUPPORTED
188#ifdef PNG_READ_hIST_SUPPORTED
193#ifdef PNG_READ_oFFs_SUPPORTED
198#ifdef PNG_READ_pCAL_SUPPORTED
203#ifdef PNG_READ_sCAL_SUPPORTED
208#ifdef PNG_READ_pHYs_SUPPORTED
213#ifdef PNG_READ_sBIT_SUPPORTED
218#ifdef PNG_READ_sRGB_SUPPORTED
223#ifdef PNG_READ_iCCP_SUPPORTED
228#ifdef PNG_READ_sPLT_SUPPORTED
233#ifdef PNG_READ_tEXt_SUPPORTED
238#ifdef PNG_READ_tIME_SUPPORTED
243#ifdef PNG_READ_tRNS_SUPPORTED
248#ifdef PNG_READ_zTXt_SUPPORTED
253#ifdef PNG_READ_iTXt_SUPPORTED
277# ifdef PNG_READ_TRANSFORMS_SUPPORTED
287 "png_read_update_info/png_start_read_image: duplicate call");
291#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
310 "png_start_read_image/png_read_update_info: duplicate call");
315#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
316#ifdef PNG_MNG_FEATURES_SUPPORTED
323 png_debug(1,
"in png_do_read_intrapixel");
345 for (
i = 0, rp =
row;
i < row_width;
i++, rp += bytes_per_pixel)
347 *(rp) = (png_byte)((256 + *rp + *(rp + 1)) & 0xff);
348 *(rp+2) = (png_byte)((256 + *(rp + 2) + *(rp + 1)) & 0xff);
365 for (
i = 0, rp =
row;
i < row_width;
i++, rp += bytes_per_pixel)
372 *(rp ) = (png_byte)((
red >> 8) & 0xff);
373 *(rp + 1) = (png_byte)(
red & 0xff);
374 *(rp + 4) = (png_byte)((
blue >> 8) & 0xff);
375 *(rp + 5) = (png_byte)(
blue & 0xff);
390 png_debug2(1,
"in png_read_row (row %lu, pass %d)",
407#ifdef PNG_WARNINGS_SUPPORTED
411#if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED)
413 png_warning(
png_ptr,
"PNG_READ_INVERT_SUPPORTED is not defined");
416#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED)
418 png_warning(
png_ptr,
"PNG_READ_FILLER_SUPPORTED is not defined");
421#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
422 !defined(PNG_READ_PACKSWAP_SUPPORTED)
424 png_warning(
png_ptr,
"PNG_READ_PACKSWAP_SUPPORTED is not defined");
427#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED)
429 png_warning(
png_ptr,
"PNG_READ_PACK_SUPPORTED is not defined");
432#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED)
434 png_warning(
png_ptr,
"PNG_READ_SHIFT_SUPPORTED is not defined");
437#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED)
439 png_warning(
png_ptr,
"PNG_READ_BGR_SUPPORTED is not defined");
442#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED)
444 png_warning(
png_ptr,
"PNG_READ_SWAP_SUPPORTED is not defined");
449#ifdef PNG_READ_INTERLACING_SUPPORTED
456 if (
png_ptr->interlaced != 0 &&
462 if (
png_ptr->row_number & 0x07)
465 png_combine_row(
png_ptr, dsp_row, 1);
475 png_combine_row(
png_ptr, dsp_row, 1);
483 if ((
png_ptr->row_number & 0x07) != 4)
486 png_combine_row(
png_ptr, dsp_row, 1);
497 png_combine_row(
png_ptr, dsp_row, 1);
505 if ((
png_ptr->row_number & 3) != 2)
508 png_combine_row(
png_ptr, dsp_row, 1);
519 png_combine_row(
png_ptr, dsp_row, 1);
528 if ((
png_ptr->row_number & 1) == 0)
539 png_error(
png_ptr,
"Invalid attempt to read row data");
551 png_error(
png_ptr,
"bad adaptive filter value");
561#ifdef PNG_MNG_FEATURES_SUPPORTED
566 png_do_read_intrapixel(&row_info,
png_ptr->row_buf + 1);
570#ifdef PNG_READ_TRANSFORMS_SUPPORTED
572 png_do_read_transformations(
png_ptr, &row_info);
576 if (
png_ptr->transformed_pixel_depth == 0)
580 png_error(
png_ptr,
"sequential row overflow");
584 png_error(
png_ptr,
"internal sequential row size calculation error");
586#ifdef PNG_READ_INTERLACING_SUPPORTED
588 if (
png_ptr->interlaced != 0 &&
592 png_do_read_interlace(&row_info,
png_ptr->row_buf + 1,
png_ptr->pass,
596 png_combine_row(
png_ptr, dsp_row, 1);
609 png_combine_row(
png_ptr, dsp_row, -1);
619#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
665 png_read_row(
png_ptr, rptr, dptr);
686#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
711#ifdef PNG_READ_INTERLACING_SUPPORTED
720 if (
png_ptr->interlaced != 0 &&
727 png_warning(
png_ptr,
"Interlace handling should be turned on when "
728 "using png_read_image");
741 "Cannot read interlaced image -- interlace handler disabled");
760#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
768#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
780#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
785#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
789 png_benign_error(
png_ptr,
"Read palette index exceeding num_palette");
809#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
810 else if ((keep = png_chunk_unknown_handling(
png_ptr, chunk_name)) != 0)
816 png_benign_error(
png_ptr,
".Too many IDATs found");
834 png_benign_error(
png_ptr,
"..Too many IDATs found");
841#ifdef PNG_READ_bKGD_SUPPORTED
846#ifdef PNG_READ_cHRM_SUPPORTED
851#ifdef PNG_READ_eXIf_SUPPORTED
856#ifdef PNG_READ_gAMA_SUPPORTED
861#ifdef PNG_READ_hIST_SUPPORTED
866#ifdef PNG_READ_oFFs_SUPPORTED
871#ifdef PNG_READ_pCAL_SUPPORTED
876#ifdef PNG_READ_sCAL_SUPPORTED
881#ifdef PNG_READ_pHYs_SUPPORTED
886#ifdef PNG_READ_sBIT_SUPPORTED
891#ifdef PNG_READ_sRGB_SUPPORTED
896#ifdef PNG_READ_iCCP_SUPPORTED
901#ifdef PNG_READ_sPLT_SUPPORTED
906#ifdef PNG_READ_tEXt_SUPPORTED
911#ifdef PNG_READ_tIME_SUPPORTED
916#ifdef PNG_READ_tRNS_SUPPORTED
921#ifdef PNG_READ_zTXt_SUPPORTED
926#ifdef PNG_READ_iTXt_SUPPORTED
944#ifdef PNG_READ_GAMMA_SUPPORTED
945 png_destroy_gamma_table(
png_ptr);
955#ifdef PNG_READ_QUANTIZE_SUPPORTED
967 png_ptr->free_me &= ~PNG_FREE_PLTE;
969#if defined(PNG_tRNS_SUPPORTED) || \
970 defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
976 png_ptr->free_me &= ~PNG_FREE_TRNS;
981#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
986#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) && \
987 defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
992#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
997#if defined(PNG_READ_EXPAND_SUPPORTED) && \
998 defined(PNG_ARM_NEON_IMPLEMENTATION)
1016 png_debug(1,
"in png_destroy_read_struct");
1018 if (png_ptr_ptr !=
NULL)
1028 png_destroy_info_struct(
png_ptr, end_info_ptr_ptr);
1029 png_destroy_info_struct(
png_ptr, info_ptr_ptr);
1031 *png_ptr_ptr =
NULL;
1033 png_destroy_png_struct(
png_ptr);
1042 png_ptr->read_row_fn = read_row_fn;
1046#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1047#ifdef PNG_INFO_IMAGE_SUPPORTED
1060 png_error(
png_ptr,
"Image is too high to process with png_read_png()");
1071 if ((transforms & PNG_TRANSFORM_SCALE_16) != 0)
1075#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED
1086#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED
1096#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
1106#ifdef PNG_READ_PACK_SUPPORTED
1116#ifdef PNG_READ_PACKSWAP_SUPPORTED
1128#ifdef PNG_READ_EXPAND_SUPPORTED
1140#ifdef PNG_READ_INVERT_SUPPORTED
1151#ifdef PNG_READ_SHIFT_SUPPORTED
1160#ifdef PNG_READ_BGR_SUPPORTED
1168#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
1176#ifdef PNG_READ_SWAP_SUPPORTED
1185#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
1186 png_set_invert_alpha(
png_ptr);
1194#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
1202#ifdef PNG_READ_EXPAND_16_SUPPORTED
1231 for (iptr=0; iptr<
info_ptr->height; iptr++)
1252#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
1270#define PNG_CMAP_NONE 0
1271#define PNG_CMAP_GA 1
1272#define PNG_CMAP_TRANS 2
1273#define PNG_CMAP_RGB 3
1274#define PNG_CMAP_RGB_ALPHA 4
1277#define PNG_CMAP_NONE_BACKGROUND 256
1278#define PNG_CMAP_GA_BACKGROUND 231
1279#define PNG_CMAP_TRANS_BACKGROUND 254
1280#define PNG_CMAP_RGB_BACKGROUND 256
1281#define PNG_CMAP_RGB_ALPHA_BACKGROUND 216
1288 png_int_32 row_stride;
1297 int colormap_processing;
1298} png_image_read_control;
1311 png_safe_error, png_safe_warning);
1347 return png_image_error(
image,
"png_image_read: out of memory");
1350 return png_image_error(
image,
"png_image_read: opaque pointer not NULL");
1370 else if (
png_ptr->num_trans > 0)
1396 return png_gamma_significant((
g * 11 + 2)/5 );
1407png_image_read_header(
png_voidp argument)
1413#ifdef PNG_BENIGN_ERRORS_SUPPORTED
1414 png_set_benign_errors(
png_ptr, 1);
1427#ifdef PNG_COLORSPACE_SUPPORTED
1434 & (PNG_COLORSPACE_HAVE_ENDPOINTS|PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB|
1435 PNG_COLORSPACE_INVALID)) == PNG_COLORSPACE_HAVE_ENDPOINTS))
1449 cmap_entries = 1U <<
png_ptr->bit_depth;
1461 if (cmap_entries > 256)
1464 image->colormap_entries = cmap_entries;
1470#ifdef PNG_STDIO_SUPPORTED
1478 if (png_image_read_init(
image) != 0)
1485 return png_safe_execute(
image, png_image_read_header,
image);
1490 return png_image_error(
image,
1491 "png_image_begin_read_from_stdio: invalid argument");
1495 return png_image_error(
image,
1496 "png_image_begin_read_from_stdio: incorrect PNG_IMAGE_VERSION");
1512 if (png_image_read_init(
image) != 0)
1514 image->opaque->png_ptr->io_ptr = fp;
1515 image->opaque->owned_file = 1;
1516 return png_safe_execute(
image, png_image_read_header,
image);
1528 return png_image_error(
image,
1529 "png_image_begin_read_from_file: invalid argument");
1533 return png_image_error(
image,
1534 "png_image_begin_read_from_file: incorrect PNG_IMAGE_VERSION");
1562 png_error(
png_ptr,
"read beyond end of data");
1566 png_error(
png_ptr,
"invalid memory read");
1577 if (png_image_read_init(
image) != 0)
1586 image->opaque->png_ptr->read_data_fn = png_image_memory_read;
1588 return png_safe_execute(
image, png_image_read_header,
image);
1593 return png_image_error(
image,
1594 "png_image_begin_read_from_memory: invalid argument");
1598 return png_image_error(
image,
1599 "png_image_begin_read_from_memory: incorrect PNG_IMAGE_VERSION");
1607#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
1630 static const png_byte chunks_to_process[] = {
1631 98, 75, 71, 68,
'\0',
1632 99, 72, 82, 77,
'\0',
1633 103, 65, 77, 65,
'\0',
1634# ifdef PNG_READ_iCCP_SUPPORTED
1635 105, 67, 67, 80,
'\0',
1637 115, 66, 73, 84,
'\0',
1638 115, 82, 71, 66,
'\0',
1649 chunks_to_process, (
int)(
sizeof chunks_to_process)/5);
1653# define PNG_SKIP_CHUNKS(p) png_image_skip_unused_chunks(p)
1655# define PNG_SKIP_CHUNKS(p) ((void)0)
1662#define PNG_DIV51(v8) (((v8) * 5 + 130) >> 8)
1666set_file_encoding(png_image_read_control *
display)
1669 if (png_gamma_significant(
g) != 0)
1671 if (png_gamma_not_sRGB(
g) != 0)
1673 display->file_encoding = P_FILE;
1674 display->gamma_to_linear = png_reciprocal(
g);
1678 display->file_encoding = P_sRGB;
1682 display->file_encoding = P_LINEAR8;
1716 png_error(
display->image->opaque->png_ptr,
1717 "unexpected encoding (internal error)");
1725png_colormap_compose(png_image_read_control *
display,
1749 f = (
f+32768) >> 16;
1753 f = PNG_sRGB_FROM_LINEAR(
f);
1762png_create_colormap_entry(png_image_read_control *
display,
1773 png_error(
image->opaque->png_ptr,
"color-map index out of range");
1780 if (
display->file_encoding == P_NOTSET)
1793 red = png_gamma_16bit_correct(
red*257,
g);
1795 blue = png_gamma_16bit_correct(
blue*257,
g);
1797 if (convert_to_Y != 0 || output_encoding == P_LINEAR)
1805 red = PNG_sRGB_FROM_LINEAR(
red * 255);
1807 blue = PNG_sRGB_FROM_LINEAR(
blue * 255);
1825 (convert_to_Y != 0 || output_encoding == P_LINEAR))
1830 red = png_sRGB_table[
red];
1840 if (convert_to_Y != 0)
1846 if (output_encoding == P_LINEAR)
1847 y = (
y + 16384) >> 15;
1854 y = PNG_sRGB_FROM_LINEAR((
y + 64) >> 7);
1862 else if (output_encoding == P_sRGB)
1864 red = PNG_sRGB_FROM_LINEAR(
red * 255);
1866 blue = PNG_sRGB_FROM_LINEAR(
blue * 255);
1873 png_error(
image->opaque->png_ptr,
"bad encoding (internal error)");
1877# ifdef PNG_FORMAT_AFIRST_SUPPORTED
1883# ifdef PNG_FORMAT_BGR_SUPPORTED
1889 if (output_encoding == P_LINEAR)
1918 entry[afirst + (2 ^ bgr)] = (png_uint_16)
blue;
1920 entry[afirst + bgr] = (png_uint_16)
red;
1956 entry[afirst + (2 ^ bgr)] = (png_byte)
blue;
1958 entry[afirst + bgr] = (png_byte)
red;
1983make_gray_file_colormap(png_image_read_control *
display)
1987 for (
i=0;
i<256; ++
i)
1988 png_create_colormap_entry(
display,
i,
i,
i,
i, 255, P_FILE);
1994make_gray_colormap(png_image_read_control *
display)
1998 for (
i=0;
i<256; ++
i)
1999 png_create_colormap_entry(
display,
i,
i,
i,
i, 255, P_sRGB);
2003#define PNG_GRAY_COLORMAP_ENTRIES 256
2006make_ga_colormap(png_image_read_control *
display)
2037 unsigned int gray = (
i * 256 + 115) / 231;
2038 png_create_colormap_entry(
display,
i++, gray, gray, gray, 255, P_sRGB);
2044 png_create_colormap_entry(
display,
i++, 255, 255, 255, 0, P_sRGB);
2051 png_create_colormap_entry(
display,
i++,
g*51,
g*51,
g*51,
a*51,
2058#define PNG_GA_COLORMAP_ENTRIES 256
2061make_rgb_colormap(png_image_read_control *
display)
2066 for (
i=
r=0;
r<6; ++
r)
2075 png_create_colormap_entry(
display,
i++,
r*51,
g*51,
b*51, 255,
2083#define PNG_RGB_COLORMAP_ENTRIES 216
2086#define PNG_RGB_INDEX(r,g,b) \
2087 ((png_byte)(6 * (6 * PNG_DIV51(r) + PNG_DIV51(g)) + PNG_DIV51(b)))
2090png_image_read_colormap(
png_voidp argument)
2092 png_image_read_control *
display =
2101 unsigned int cmap_entries;
2102 unsigned int output_processing;
2103 unsigned int data_encoding = P_NOTSET;
2108 unsigned int background_index = 256;
2112 int expand_tRNS = 0;
2123 if (output_encoding == P_LINEAR)
2124 back_b = back_g = back_r = 0;
2128 "background color must be supplied to remove alpha/transparency");
2136 back_g =
display->background->green;
2139 back_r =
display->background->red;
2140 back_b =
display->background->blue;
2143 back_b = back_r = back_g;
2147 else if (output_encoding == P_LINEAR)
2148 back_b = back_r = back_g = 65535;
2151 back_b = back_r = back_g = 255;
2158 if ((
png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) == 0)
2165 if (
png_ptr->bit_depth == 16 &&
2172 png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_GAMMA;
2188 unsigned int step,
i,
val, trans = 256, back_alpha = 0;
2190 cmap_entries = 1U <<
png_ptr->bit_depth;
2191 if (cmap_entries >
image->colormap_entries)
2192 png_error(
png_ptr,
"gray[8] color-map: too few entries");
2194 step = 255 / (cmap_entries - 1);
2195 output_processing = PNG_CMAP_NONE;
2202 trans =
png_ptr->trans_color.gray;
2205 back_alpha = output_encoding == P_LINEAR ? 65535 : 255;
2215 for (
i=
val=0;
i<cmap_entries; ++
i,
val += step)
2234 png_create_colormap_entry(
display,
i, back_r, back_g, back_b,
2235 back_alpha, output_encoding);
2239 data_encoding = P_FILE;
2268 data_encoding = P_sRGB;
2270 if (PNG_GRAY_COLORMAP_ENTRIES >
image->colormap_entries)
2271 png_error(
png_ptr,
"gray[16] color-map: too few entries");
2273 cmap_entries = (
unsigned int)make_gray_colormap(
display);
2277 unsigned int back_alpha;
2284 if (back_r == back_g && back_g == back_b)
2292 if (output_encoding == P_LINEAR)
2294 gray = PNG_sRGB_FROM_LINEAR(gray * 255);
2299 png_create_colormap_entry(
display, gray, back_g, back_g,
2300 back_g, 65535, P_LINEAR);
2307 c.gray =
c.red =
c.green =
c.blue = (png_uint_16)gray;
2317 output_processing = PNG_CMAP_NONE;
2326 back_alpha = output_encoding == P_LINEAR ? 65535 : 255;
2338 output_processing = PNG_CMAP_TRANS;
2339 background_index = 254;
2344 png_create_colormap_entry(
display, 254, back_r, back_g, back_b,
2345 back_alpha, output_encoding);
2349 output_processing = PNG_CMAP_NONE;
2364 data_encoding = P_sRGB;
2368 if (PNG_GA_COLORMAP_ENTRIES >
image->colormap_entries)
2369 png_error(
png_ptr,
"gray+alpha color-map: too few entries");
2371 cmap_entries = (
unsigned int)make_ga_colormap(
display);
2373 background_index = PNG_CMAP_GA_BACKGROUND;
2374 output_processing = PNG_CMAP_GA;
2396 (back_r == back_g && back_g == back_b))
2402 if (PNG_GRAY_COLORMAP_ENTRIES >
image->colormap_entries)
2403 png_error(
png_ptr,
"gray-alpha color-map: too few entries");
2405 cmap_entries = (
unsigned int)make_gray_colormap(
display);
2407 if (output_encoding == P_LINEAR)
2409 gray = PNG_sRGB_FROM_LINEAR(gray * 255);
2412 png_create_colormap_entry(
display, gray, back_g, back_g,
2413 back_g, 65535, P_LINEAR);
2420 c.gray =
c.red =
c.green =
c.blue = (png_uint_16)gray;
2426 output_processing = PNG_CMAP_NONE;
2436 if (PNG_GA_COLORMAP_ENTRIES >
image->colormap_entries)
2437 png_error(
png_ptr,
"ga-alpha color-map: too few entries");
2443 png_create_colormap_entry(
display,
i++, gray, gray, gray,
2450 background_index =
i;
2451 png_create_colormap_entry(
display,
i++, back_r, back_g, back_b,
2457 output_encoding == P_LINEAR ? 65535U : 255U,
2469 if (output_encoding == P_sRGB)
2475 back_r = png_sRGB_table[back_r];
2476 back_g = png_sRGB_table[back_g];
2477 back_b = png_sRGB_table[back_b];
2496 png_create_colormap_entry(
display,
i++,
2497 PNG_sRGB_FROM_LINEAR(gray + back_rx),
2498 PNG_sRGB_FROM_LINEAR(gray + back_gx),
2499 PNG_sRGB_FROM_LINEAR(gray + back_bx), 255, P_sRGB);
2504 output_processing = PNG_CMAP_GA;
2526 data_encoding = P_sRGB;
2541 if (PNG_GA_COLORMAP_ENTRIES >
image->colormap_entries)
2542 png_error(
png_ptr,
"rgb[ga] color-map: too few entries");
2544 cmap_entries = (
unsigned int)make_ga_colormap(
display);
2545 background_index = PNG_CMAP_GA_BACKGROUND;
2546 output_processing = PNG_CMAP_GA;
2555 if (PNG_GRAY_COLORMAP_ENTRIES >
image->colormap_entries)
2556 png_error(
png_ptr,
"rgb[gray] color-map: too few entries");
2568 png_gamma_not_sRGB(
png_ptr->colorspace.gamma) != 0)
2570 cmap_entries = (
unsigned int)make_gray_file_colormap(
display);
2571 data_encoding = P_FILE;
2575 cmap_entries = (
unsigned int)make_gray_colormap(
display);
2590 if (data_encoding == P_FILE)
2597 if (output_encoding == P_sRGB)
2598 gray = png_sRGB_table[gray];
2600 gray =
PNG_DIV257(png_gamma_16bit_correct(gray,
2606 png_create_colormap_entry(
display, gray, back_g, back_g,
2607 back_g, 0, output_encoding);
2610 else if (output_encoding == P_LINEAR)
2612 gray = PNG_sRGB_FROM_LINEAR(gray * 255);
2616 png_create_colormap_entry(
display, gray, back_g, back_g,
2617 back_g, 0, P_LINEAR);
2624 c.gray =
c.red =
c.green =
c.blue = (png_uint_16)gray;
2636 output_processing = PNG_CMAP_NONE;
2647 data_encoding = P_sRGB;
2660 if (PNG_RGB_COLORMAP_ENTRIES+1+27 >
image->colormap_entries)
2661 png_error(
png_ptr,
"rgb+alpha color-map: too few entries");
2663 cmap_entries = (
unsigned int)make_rgb_colormap(
display);
2666 png_create_colormap_entry(
display, cmap_entries, 255, 255,
2672 background_index = cmap_entries++;
2675 for (
r=0;
r<256;
r = (
r << 1) | 0x7f)
2679 for (
g=0;
g<256;
g = (
g << 1) | 0x7f)
2686 for (
b=0;
b<256;
b = (
b << 1) | 0x7f)
2687 png_create_colormap_entry(
display, cmap_entries++,
2688 r,
g,
b, 128, P_sRGB);
2693 output_processing = PNG_CMAP_RGB_ALPHA;
2705 unsigned int sample_size =
2709 if (PNG_RGB_COLORMAP_ENTRIES+1+27 >
image->colormap_entries)
2710 png_error(
png_ptr,
"rgb-alpha color-map: too few entries");
2712 cmap_entries = (
unsigned int)make_rgb_colormap(
display);
2714 png_create_colormap_entry(
display, cmap_entries, back_r,
2715 back_g, back_b, 0, output_encoding);
2717 if (output_encoding == P_LINEAR)
2719 r = PNG_sRGB_FROM_LINEAR(back_r * 255);
2720 g = PNG_sRGB_FROM_LINEAR(back_g * 255);
2721 b = PNG_sRGB_FROM_LINEAR(back_b * 255);
2737 sample_size * cmap_entries,
2739 sample_size * PNG_RGB_INDEX(
r,
g,
b),
2743 background_index = cmap_entries++;
2748 for (
r=0;
r<256;
r = (
r << 1) | 0x7f)
2750 for (
g=0;
g<256;
g = (
g << 1) | 0x7f)
2755 for (
b=0;
b<256;
b = (
b << 1) | 0x7f)
2756 png_create_colormap_entry(
display, cmap_entries++,
2757 png_colormap_compose(
display,
r, P_sRGB, 128,
2758 back_r, output_encoding),
2759 png_colormap_compose(
display,
g, P_sRGB, 128,
2760 back_g, output_encoding),
2761 png_colormap_compose(
display,
b, P_sRGB, 128,
2762 back_b, output_encoding),
2763 0, output_encoding);
2768 output_processing = PNG_CMAP_RGB_ALPHA;
2776 c.red = (png_uint_16)back_r;
2777 c.gray =
c.green = (png_uint_16)back_g;
2778 c.blue = (png_uint_16)back_b;
2784 output_processing = PNG_CMAP_RGB;
2794 if (PNG_RGB_COLORMAP_ENTRIES >
image->colormap_entries)
2795 png_error(
png_ptr,
"rgb color-map: too few entries");
2797 cmap_entries = (
unsigned int)make_rgb_colormap(
display);
2798 output_processing = PNG_CMAP_RGB;
2808 unsigned int num_trans =
png_ptr->num_trans;
2811 int do_background = trans !=
NULL &&
2819 output_processing = PNG_CMAP_NONE;
2820 data_encoding = P_FILE;
2821 cmap_entries = (
unsigned int)
png_ptr->num_palette;
2822 if (cmap_entries > 256)
2825 if (cmap_entries > (
unsigned int)
image->colormap_entries)
2826 png_error(
png_ptr,
"palette color-map: too few entries");
2828 for (
i=0;
i < cmap_entries; ++
i)
2830 if (do_background != 0 &&
i < num_trans && trans[
i] < 255)
2833 png_create_colormap_entry(
display,
i, back_r, back_g,
2834 back_b, 0, output_encoding);
2841 png_create_colormap_entry(
display,
i,
2843 P_FILE, trans[
i], back_r, output_encoding),
2845 P_FILE, trans[
i], back_g, output_encoding),
2847 P_FILE, trans[
i], back_b, output_encoding),
2848 output_encoding == P_LINEAR ? trans[
i] * 257U :
2857 i < num_trans ? trans[
i] : 255U, P_FILE);
2869 png_error(
png_ptr,
"invalid PNG color type");
2874 if (expand_tRNS != 0 &&
png_ptr->num_trans > 0 &&
2876 png_set_tRNS_to_alpha(
png_ptr);
2878 switch (data_encoding)
2892 png_error(
png_ptr,
"bad data option (internal error)");
2896 if (cmap_entries > 256 || cmap_entries >
image->colormap_entries)
2897 png_error(
png_ptr,
"color map overflow (BAD internal error)");
2899 image->colormap_entries = cmap_entries;
2902 switch (output_processing)
2905 if (background_index != PNG_CMAP_NONE_BACKGROUND)
2906 goto bad_background;
2910 if (background_index != PNG_CMAP_GA_BACKGROUND)
2911 goto bad_background;
2914 case PNG_CMAP_TRANS:
2915 if (background_index >= cmap_entries ||
2916 background_index != PNG_CMAP_TRANS_BACKGROUND)
2917 goto bad_background;
2921 if (background_index != PNG_CMAP_RGB_BACKGROUND)
2922 goto bad_background;
2925 case PNG_CMAP_RGB_ALPHA:
2926 if (background_index != PNG_CMAP_RGB_ALPHA_BACKGROUND)
2927 goto bad_background;
2931 png_error(
png_ptr,
"bad processing option (internal error)");
2934 png_error(
png_ptr,
"bad background index (internal error)");
2937 display->colormap_processing = (
int)output_processing;
2944png_image_read_and_map(
png_voidp argument)
2967 png_error(
png_ptr,
"unknown interlace type");
2980 unsigned int startx, stepx, stepy;
3019 for (; outrow < end_row; outrow += stepx)
3022 unsigned int gray = *inrow++;
3023 unsigned int alpha = *inrow++;
3032 entry = (231 * gray + 128) >> 8;
3034 else if (
alpha < 26)
3040 entry = 226 + 6 * PNG_DIV51(
alpha) + PNG_DIV51(gray);
3043 *outrow = (png_byte)
entry;
3047 case PNG_CMAP_TRANS:
3048 for (; outrow < end_row; outrow += stepx)
3050 png_byte gray = *inrow++;
3051 png_byte
alpha = *inrow++;
3054 *outrow = PNG_CMAP_TRANS_BACKGROUND;
3056 else if (gray != PNG_CMAP_TRANS_BACKGROUND)
3060 *outrow = (png_byte)(PNG_CMAP_TRANS_BACKGROUND+1);
3065 for (; outrow < end_row; outrow += stepx)
3067 *outrow = PNG_RGB_INDEX(inrow[0], inrow[1], inrow[2]);
3072 case PNG_CMAP_RGB_ALPHA:
3073 for (; outrow < end_row; outrow += stepx)
3075 unsigned int alpha = inrow[3];
3083 *outrow = PNG_RGB_INDEX(inrow[0], inrow[1],
3086 else if (
alpha < 64)
3087 *outrow = PNG_CMAP_RGB_ALPHA_BACKGROUND;
3097 unsigned int back_i = PNG_CMAP_RGB_ALPHA_BACKGROUND+1;
3108 if (inrow[0] & 0x80) back_i += 9;
3109 if (inrow[0] & 0x40) back_i += 9;
3110 if (inrow[0] & 0x80) back_i += 3;
3111 if (inrow[0] & 0x40) back_i += 3;
3112 if (inrow[0] & 0x80) back_i += 1;
3113 if (inrow[0] & 0x40) back_i += 1;
3115 *outrow = (png_byte)back_i;
3133png_image_read_colormapped(
png_voidp argument)
3150 if (
display->colormap_processing == PNG_CMAP_NONE)
3151 passes = png_set_interlace_handling(
png_ptr);
3156 switch (
display->colormap_processing)
3169 case PNG_CMAP_TRANS:
3178 image->colormap_entries == 256)
3188 image->colormap_entries == 216)
3193 case PNG_CMAP_RGB_ALPHA:
3198 image->colormap_entries == 244 )
3205 png_error(
png_ptr,
"bad color-map processing (internal error)");
3222 ptr += (
image->height-1) * (-row_bytes);
3226 display->first_row = first_row;
3227 display->row_bytes = row_bytes;
3247 while (--passes >= 0)
3265png_image_read_composite(
png_voidp argument)
3284 png_error(
png_ptr,
"unknown interlace type");
3297 unsigned int startx, stepx, stepy;
3330 outrow +=
y * step_row;
3335 for (; outrow < end_row; outrow += stepx)
3355 component *= 257*255;
3356 component += (255-
alpha)*png_sRGB_table[outrow[
c]];
3362 component = PNG_sRGB_FROM_LINEAR(component);
3365 outrow[
c] = (png_byte)component;
3392png_image_read_background(
png_voidp argument)
3409 png_error(
png_ptr,
"lost rgb to gray");
3412 png_error(
png_ptr,
"unexpected compose");
3415 png_error(
png_ptr,
"lost/gained channels");
3420 png_error(
png_ptr,
"unexpected 8-bit transformation");
3433 png_error(
png_ptr,
"unknown interlace type");
3455 unsigned int startx, stepx, stepy;
3491 for (; outrow < end_row; outrow += stepx)
3493 png_byte
alpha = inrow[1];
3505 component = png_sRGB_table[component] *
alpha;
3506 component += png_sRGB_table[outrow[0]] *
3508 component = PNG_sRGB_FROM_LINEAR(component);
3511 outrow[0] = (png_byte)component;
3521 png_byte background8 =
display->background->green;
3522 png_uint_16 background = png_sRGB_table[background8];
3536 for (; outrow < end_row; outrow += stepx)
3538 png_byte
alpha = inrow[1];
3546 component = png_sRGB_table[component] *
alpha;
3547 component += background * (255-
alpha);
3548 component = PNG_sRGB_FROM_LINEAR(component);
3551 outrow[0] = (png_byte)component;
3555 outrow[0] = background8;
3577 unsigned int preserve_alpha = (
image->format &
3579 unsigned int outchannels = 1U+preserve_alpha;
3582# ifdef PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED
3583 if (preserve_alpha != 0 &&
3590 unsigned int startx, stepx, stepy;
3611 stepx = outchannels;
3629 for (; outrow < end_row; outrow += stepx)
3632 png_uint_16
alpha = inrow[1];
3647 outrow[swap_alpha] = (png_uint_16)component;
3648 if (preserve_alpha != 0)
3649 outrow[1 ^ swap_alpha] =
alpha;
3660 png_error(
png_ptr,
"unexpected bit depth");
3669png_image_read_direct(
png_voidp argument)
3679 int do_local_compose = 0;
3680 int do_local_background = 0;
3692 ~PNG_FORMAT_FLAG_COLORMAP ;
3720 do_local_background = 1;
3726 change &= ~PNG_FORMAT_FLAG_COLOR;
3769 change &= ~PNG_FORMAT_FLAG_ASSOCIATED_ALPHA;
3778 if (do_local_background != 0)
3787 if (png_muldiv(>est, output_gamma,
png_ptr->colorspace.gamma,
3788 PNG_FP_1) != 0 && png_gamma_significant(gtest) == 0)
3789 do_local_background = 0;
3793 do_local_background = 2;
3809 change &= ~PNG_FORMAT_FLAG_LINEAR;
3826 if (do_local_background != 0)
3827 do_local_background = 2;
3830 else if (linear != 0)
3840 c.green =
display->background->green;
3841 c.blue =
display->background->blue;
3842 c.gray =
display->background->green;
3857 do_local_compose = 1;
3883#ifdef PNG_FORMAT_AFIRST_SUPPORTED
3887 change &= ~PNG_FORMAT_FLAG_AFIRST;
3898 change &= ~PNG_FORMAT_FLAG_ALPHA;
3907# ifdef PNG_FORMAT_BGR_SUPPORTED
3917 format &= ~PNG_FORMAT_FLAG_BGR;
3919 change &= ~PNG_FORMAT_FLAG_BGR;
3923# ifdef PNG_FORMAT_AFIRST_SUPPORTED
3936 if (do_local_background != 2)
3941 format &= ~PNG_FORMAT_FLAG_AFIRST;
3943 change &= ~PNG_FORMAT_FLAG_AFIRST;
3952 png_uint_16 le = 0x0001;
3960 png_error(
png_ptr,
"png_read_image: unsupported transformation");
3971 if (do_local_compose == 0 && do_local_background != 2)
3972 passes = png_set_interlace_handling(
png_ptr);
3985 if (do_local_compose == 0)
3988 if (do_local_background != 2 ||
3994 else if (do_local_compose != 0)
3995 png_error(
png_ptr,
"png_image_read: alpha channel lost");
4004#ifdef PNG_FORMAT_BGR_SUPPORTED
4009#ifdef PNG_FORMAT_AFIRST_SUPPORTED
4010 if (do_local_background == 2)
4020 if (do_local_background == 2)
4021 png_error(
png_ptr,
"unexpected alpha swap transformation");
4028 if (info_format !=
format)
4029 png_error(
png_ptr,
"png_read_image: invalid transformations");
4050 ptr += (
image->height-1) * (-row_bytes);
4054 display->first_row = first_row;
4055 display->row_bytes = row_bytes;
4058 if (do_local_compose != 0)
4071 else if (do_local_background == 2)
4088 while (--passes >= 0)
4106 void *
buffer, png_int_32 row_stride,
void *colormap)
4127 if (row_stride == 0)
4128 row_stride = (png_int_32)png_row_stride;
4158 if (
image->height <=
4162 (
image->colormap_entries > 0 && colormap !=
NULL))
4165 png_image_read_control
display;
4170 display.row_stride = row_stride;
4172 display.background = background;
4180 png_safe_execute(
image,
4181 png_image_read_colormap, &
display) &&
4182 png_safe_execute(
image,
4183 png_image_read_colormapped, &
display);
4187 png_safe_execute(
image,
4188 png_image_read_direct, &
display);
4190 png_image_free(
image);
4195 return png_image_error(
image,
4196 "png_image_finish_read[color-map]: no color-map");
4200 return png_image_error(
image,
4201 "png_image_finish_read: image too large");
4205 return png_image_error(
image,
4206 "png_image_finish_read: invalid argument");
4210 return png_image_error(
image,
4211 "png_image_finish_read: row_stride too large");
4215 return png_image_error(
image,
4216 "png_image_finish_read: damaged PNG_IMAGE_VERSION");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
int inflateEnd(z_streamp strm)
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
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define check(expected, result)
__kernel_ptrdiff_t ptrdiff_t
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLuint GLsizei GLsizei * length
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
void display_row(char *data, int off, int len)
int JSAMPARRAY int int num_rows
#define memcpy(s1, s2, n)
#define PNG_COLOR_TYPE_RGB
#define PNG_COLOR_TYPE_RGB_ALPHA
#define PNG_COLOR_TYPE_GRAY_ALPHA
#define PNG_COLOR_TYPE_GRAY
#define PNG_COLOR_TYPE_PALETTE
static const char filler[0x1000]
static char memory[1024 *256]
static UINT PSTR DWORD UINT * need
const char * strerror(int err)
#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB
#define PNG_FORMAT_FLAG_COLOR
#define PNG_TRANSFORM_SWAP_ENDIAN
#define PNG_TRANSFORM_EXPAND_16
#define PNG_IMAGE_VERSION
png_set_rgb_to_gray_fixed
#define PNG_TRANSFORM_GRAY_TO_RGB
#define PNG_TRANSFORM_INVERT_ALPHA
#define PNG_INTRAPIXEL_DIFFERENCING
#define PNG_TRANSFORM_EXPAND
#define PNG_FILLER_BEFORE
#define PNG_TRANSFORM_PACKING
#define PNG_FORMAT_FLAG_AFIRST
#define PNG_INTERLACE_ADAM7_PASSES
#define PNG_TRANSFORM_SWAP_ALPHA
#define PNG_FORMAT_FLAG_COLORMAP
#define PNG_TRANSFORM_STRIP_ALPHA
#define PNG_ERROR_ACTION_NONE
struct png_control * png_controlp
#define PNG_TRANSFORM_INVERT_MONO
#define PNG_FLAG_MNG_FILTER_64
#define PNG_TRANSFORM_PACKSWAP
#define PNG_PASS_START_COL(pass)
#define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)
#define PNG_FORMAT_FLAG_BGR
#define PNG_COLOR_MASK_COLOR
#define PNG_RGB_TO_GRAY_DEFAULT
#define PNG_COLOR_MASK_PALETTE
#define PNG_PASS_START_ROW(pass)
#define PNG_FILTER_VALUE_LAST
#define PNG_TRANSFORM_BGR
#define PNG_IMAGE_SAMPLE_SIZE(fmt)
#define PNG_HANDLE_CHUNK_NEVER
#define PNG_COLOR_MASK_ALPHA
#define PNG_FORMAT_FLAG_LINEAR
#define PNG_PASS_COLS(width, pass)
#define PNG_INTERLACE_ADAM7
#define PNG_ALPHA_OPTIMIZED
#define PNG_ALPHA_STANDARD
#define PNG_IMAGE_FLAG_16BIT_sRGB
#define PNG_LIBPNG_VER_STRING
#define PNG_FORMAT_FLAG_ALPHA
#define PNG_FILTER_VALUE_NONE
#define PNG_INTERLACE_NONE
#define PNG_FORMAT_FLAG_ASSOCIATED_ALPHA
#define PNG_IMAGE_SAMPLE_CHANNELS(fmt)
png_info *PNG_RESTRICT png_inforp
#define PNG_PASS_COL_OFFSET(pass)
#define PNG_PASS_ROW_OFFSET(pass)
#define PNG_TRANSFORM_STRIP_16
#define PNG_BACKGROUND_GAMMA_SCREEN
#define PNG_IMAGE_PIXEL_CHANNELS(fmt)
#define PNG_HANDLE_CHUNK_AS_DEFAULT
png_struct *PNG_RESTRICT png_structrp
#define PNG_TRANSFORM_SHIFT
png_const_structrp png_const_inforp info_ptr
#define PNG_FUNCTION(type, name, args, attributes)
png_int_32 png_fixed_point
const png_byte * png_const_bytep
const png_uint_16 * png_const_uint_16p
png_uint_16 * png_uint_16p
const char * png_const_charp
#define png_debug2(l, m, p1, p2)
#define PNG_IDAT_READ_SIZE
#define PNG_UNUSED(param)
#define PNG_ROWBYTES(pixel_bits, width)
#define png_app_error(pp, s)
#define PNG_FLAG_BENIGN_ERRORS_WARN
#define PNG_HAVE_CHUNK_AFTER_IDAT
#define PNG_FLAG_APP_WARNINGS_WARN
#define PNG_IS_READ_STRUCT
#define PNG_FLAG_ZSTREAM_ENDED
#define PNG_FLAG_FILLER_AFTER
#define PNG_GAMMA_sRGB_INVERSE
#define PNG_FLAG_ROW_INIT
#define png_voidcast(type, value)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList