17#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
38#ifdef PNG_INFO_IMAGE_SUPPORTED
49#ifdef PNG_EASY_ACCESS_SUPPORTED
118#ifdef PNG_pHYs_SUPPORTED
123 "png_get_x_pixels_per_meter");
126 return (
info_ptr->x_pixels_per_unit);
140#ifdef PNG_pHYs_SUPPORTED
145 "png_get_y_pixels_per_meter");
148 return (
info_ptr->y_pixels_per_unit);
161#ifdef PNG_pHYs_SUPPORTED
165 png_debug1(1,
"in %s retrieval function",
"png_get_pixels_per_meter");
169 return (
info_ptr->x_pixels_per_unit);
179#ifdef PNG_FLOATING_POINT_SUPPORTED
184#ifdef PNG_READ_pHYs_SUPPORTED
188 png_debug1(1,
"in %s retrieval function",
"png_get_aspect_ratio");
190 if (
info_ptr->x_pixels_per_unit != 0)
191 return ((
float)((
float)
info_ptr->y_pixels_per_unit
192 /(
float)
info_ptr->x_pixels_per_unit));
203#ifdef PNG_FIXED_POINT_SUPPORTED
208#ifdef PNG_READ_pHYs_SUPPORTED
217 png_debug1(1,
"in %s retrieval function",
"png_get_aspect_ratio_fixed");
223 (png_int_32)
info_ptr->x_pixels_per_unit) != 0)
238#ifdef PNG_oFFs_SUPPORTED
242 png_debug1(1,
"in %s retrieval function",
"png_get_x_offset_microns");
258#ifdef PNG_oFFs_SUPPORTED
262 png_debug1(1,
"in %s retrieval function",
"png_get_y_offset_microns");
278#ifdef PNG_oFFs_SUPPORTED
282 png_debug1(1,
"in %s retrieval function",
"png_get_x_offset_pixels");
298#ifdef PNG_oFFs_SUPPORTED
302 png_debug1(1,
"in %s retrieval function",
"png_get_y_offset_pixels");
315#ifdef PNG_INCH_CONVERSIONS_SUPPORTED
325 t1001 = ppm + (ppm >> 3);
326 t1101 = t1001 + (ppm >> 1);
328 t1101 += t1101 >> 15;
330 t1001 += t1001 >> 12;
333 return (ppm + 16) >> 5;
366#ifdef PNG_FIXED_POINT_SUPPORTED
375 return png_muldiv_warn(
png_ptr, microns, 500, 127);
382 return png_fixed_inches_from_microns(
png_ptr,
387#ifdef PNG_FIXED_POINT_SUPPORTED
392 return png_fixed_inches_from_microns(
png_ptr,
397#ifdef PNG_FLOATING_POINT_SUPPORTED
404 return (
float)(png_get_x_offset_microns(
png_ptr,
info_ptr) * .00003937);
408#ifdef PNG_FLOATING_POINT_SUPPORTED
415 return (
float)(png_get_y_offset_microns(
png_ptr,
info_ptr) * .00003937);
419#ifdef PNG_pHYs_SUPPORTED
429 png_debug1(1,
"in %s retrieval function",
"pHYs");
433 *res_x =
info_ptr->x_pixels_per_unit;
439 *res_y =
info_ptr->y_pixels_per_unit;
443 if (unit_type !=
NULL)
475#ifdef PNG_READ_SUPPORTED
486#ifdef PNG_bKGD_SUPPORTED
495 png_debug1(1,
"in %s retrieval function",
"bKGD");
497 *background = &(
info_ptr->background);
505#ifdef PNG_cHRM_SUPPORTED
510# ifdef PNG_FLOATING_POINT_SUPPORTED
513 double *white_x,
double *white_y,
double *red_x,
double *red_y,
514 double *green_x,
double *green_y,
double *blue_x,
double *blue_y)
523 (
info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
525 png_debug1(1,
"in %s retrieval function",
"cHRM");
529 info_ptr->colorspace.end_points_xy.whitex,
"cHRM white X");
532 info_ptr->colorspace.end_points_xy.whitey,
"cHRM white Y");
541 info_ptr->colorspace.end_points_xy.greenx,
"cHRM green X");
544 info_ptr->colorspace.end_points_xy.greeny,
"cHRM green Y");
564 (
info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
566 png_debug1(1,
"in %s retrieval function",
"cHRM_XYZ(float)");
579 info_ptr->colorspace.end_points_XYZ.green_X,
"cHRM green X");
582 info_ptr->colorspace.end_points_XYZ.green_Y,
"cHRM green Y");
585 info_ptr->colorspace.end_points_XYZ.green_Z,
"cHRM green Z");
588 info_ptr->colorspace.end_points_XYZ.blue_X,
"cHRM blue X");
591 info_ptr->colorspace.end_points_XYZ.blue_Y,
"cHRM blue Y");
594 info_ptr->colorspace.end_points_XYZ.blue_Z,
"cHRM blue Z");
602# ifdef PNG_FIXED_POINT_SUPPORTED
612 (
info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
614 png_debug1(1,
"in %s retrieval function",
"cHRM_XYZ");
632 if (int_blue_Z !=
NULL)
633 *int_blue_Z =
info_ptr->colorspace.end_points_XYZ.blue_Z;
646 png_debug1(1,
"in %s retrieval function",
"cHRM");
649 (
info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0)
652 *white_x =
info_ptr->colorspace.end_points_xy.whitex;
654 *white_y =
info_ptr->colorspace.end_points_xy.whitey;
656 *red_x =
info_ptr->colorspace.end_points_xy.redx;
658 *red_y =
info_ptr->colorspace.end_points_xy.redy;
660 *green_x =
info_ptr->colorspace.end_points_xy.greenx;
662 *green_y =
info_ptr->colorspace.end_points_xy.greeny;
664 *blue_x =
info_ptr->colorspace.end_points_xy.bluex;
666 *blue_y =
info_ptr->colorspace.end_points_xy.bluey;
675#ifdef PNG_gAMA_SUPPORTED
676# ifdef PNG_FIXED_POINT_SUPPORTED
681 png_debug1(1,
"in %s retrieval function",
"gAMA");
684 (
info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) != 0 &&
687 *file_gamma =
info_ptr->colorspace.gamma;
695# ifdef PNG_FLOATING_POINT_SUPPORTED
700 png_debug1(1,
"in %s retrieval function",
"gAMA(float)");
703 (
info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) != 0 &&
716#ifdef PNG_sRGB_SUPPORTED
719 int *file_srgb_intent)
721 png_debug1(1,
"in %s retrieval function",
"sRGB");
726 *file_srgb_intent =
info_ptr->colorspace.rendering_intent;
734#ifdef PNG_iCCP_SUPPORTED
740 png_debug1(1,
"in %s retrieval function",
"iCCP");
752 if (compression_type !=
NULL)
762#ifdef PNG_sPLT_SUPPORTED
769 *spalettes =
info_ptr->splt_palettes;
777#ifdef PNG_eXIf_SUPPORTED
782 png_warning(
png_ptr,
"png_get_eXIf does not work; use png_get_eXIf_1");
792 png_debug1(1,
"in %s retrieval function",
"eXIf");
806#ifdef PNG_hIST_SUPPORTED
811 png_debug1(1,
"in %s retrieval function",
"hIST");
827 int *color_type,
int *interlace_type,
int *compression_type,
830 png_debug1(1,
"in %s retrieval function",
"IHDR");
841 if (bit_depth !=
NULL)
844 if (color_type !=
NULL)
847 if (compression_type !=
NULL)
848 *compression_type =
info_ptr->compression_type;
850 if (filter_type !=
NULL)
851 *filter_type =
info_ptr->filter_type;
853 if (interlace_type !=
NULL)
854 *interlace_type =
info_ptr->interlace_type;
868#ifdef PNG_oFFs_SUPPORTED
871 png_int_32 *offset_x, png_int_32 *offset_y,
int *unit_type)
873 png_debug1(1,
"in %s retrieval function",
"oFFs");
877 offset_x !=
NULL && offset_y !=
NULL && unit_type !=
NULL)
889#ifdef PNG_pCAL_SUPPORTED
892 png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
int *
type,
int *nparams,
895 png_debug1(1,
"in %s retrieval function",
"pCAL");
906 *nparams = (
int)
info_ptr->pcal_nparams;
916#ifdef PNG_sCAL_SUPPORTED
917# ifdef PNG_FIXED_POINT_SUPPORTED
918# if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \
919 defined(PNG_FLOATING_POINT_SUPPORTED)
942# ifdef PNG_FLOATING_POINT_SUPPORTED
976#ifdef PNG_pHYs_SUPPORTED
983 png_debug1(1,
"in %s retrieval function",
"pHYs");
990 *res_x =
info_ptr->x_pixels_per_unit;
996 *res_y =
info_ptr->y_pixels_per_unit;
1000 if (unit_type !=
NULL)
1015 png_debug1(1,
"in %s retrieval function",
"PLTE");
1021 *num_palette =
info_ptr->num_palette;
1022 png_debug1(3,
"num_palette = %d", *num_palette);
1029#ifdef PNG_sBIT_SUPPORTED
1034 png_debug1(1,
"in %s retrieval function",
"sBIT");
1047#ifdef PNG_TEXT_SUPPORTED
1055 (
unsigned long)
png_ptr->chunk_name);
1057 if (text_ptr !=
NULL)
1060 if (num_text !=
NULL)
1066 if (num_text !=
NULL)
1073#ifdef PNG_tIME_SUPPORTED
1078 png_debug1(1,
"in %s retrieval function",
"tIME");
1091#ifdef PNG_tRNS_SUPPORTED
1100 png_debug1(1,
"in %s retrieval function",
"tRNS");
1104 if (trans_alpha !=
NULL)
1106 *trans_alpha =
info_ptr->trans_alpha;
1110 if (trans_color !=
NULL)
1111 *trans_color = &(
info_ptr->trans_color);
1116 if (trans_color !=
NULL)
1118 *trans_color = &(
info_ptr->trans_color);
1122 if (trans_alpha !=
NULL)
1123 *trans_alpha =
NULL;
1126 if (num_trans !=
NULL)
1137#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
1144 *unknowns =
info_ptr->unknown_chunks;
1145 return info_ptr->unknown_chunks_num;
1152#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
1160#ifdef PNG_USER_CHUNKS_SUPPORTED
1174#ifdef PNG_WRITE_SUPPORTED
1178#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1179 return png_ptr->IDAT_read_size;
1185#ifdef PNG_WRITE_SUPPORTED
1191#ifdef PNG_SET_USER_LIMITS_SUPPORTED
1222#ifdef PNG_IO_STATE_SUPPORTED
1236#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
1237# ifdef PNG_GET_PALETTE_MAX_SUPPORTED
1242 return png_ptr->num_palette_max;
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum const GLfloat * params
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 flag
#define PNG_COLOR_TYPE_PALETTE
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_get_x_offset_inches_fixed
png_const_structrp png_const_inforp int * unit
png_const_structrp png_const_inforp double double double double double double double double double *blue_Z png_const_structrp png_const_inforp 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_const_structrp png_const_inforp double double double double double double double double double *blue_Z png_const_structrp png_const_inforp png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point * int_green_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
#define PNG_OFFSET_MICROMETER
png_const_structrp png_const_inforp double double double double double double double double double *blue_Z png_const_structrp png_const_inforp png_fixed_point * int_red_X
png_const_structrp png_const_inforp double double double double double double double double double *blue_Z png_const_structrp png_const_inforp png_fixed_point png_fixed_point * int_red_Y
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 double double double double double double double *blue_Z png_const_structrp png_const_inforp 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_const_structrp png_const_inforp double double double double double double double double double *blue_Z png_get_cHRM_XYZ_fixed
png_const_structrp png_const_inforp double double * red_Y
#define PNG_RESOLUTION_METER
png_const_structrp png_const_inforp info_ptr png_get_y_offset_inches_fixed
png_const_structrp png_const_inforp double double double double double double double double double *blue_Z png_const_structrp png_const_inforp png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point png_fixed_point * int_green_Z
png_const_structrp png_const_inforp double double double double double double double * blue_X
#define png_get_uint_32(buf)
png_get_pixel_aspect_ratio_fixed
png_const_structrp png_const_inforp double double double double double double double double double *blue_Z png_const_structrp png_const_inforp png_fixed_point png_fixed_point png_fixed_point png_fixed_point * int_green_X
png_const_structrp png_const_inforp double double double double double double double double double *blue_Z png_const_structrp png_const_inforp png_fixed_point png_fixed_point png_fixed_point * int_red_Z
const png_struct *PNG_RESTRICT png_const_structrp
const png_info *PNG_RESTRICT png_const_inforp
png_info *PNG_RESTRICT png_inforp
#define PNG_COMPRESSION_TYPE_BASE
png_const_structrp png_const_inforp info_ptr
png_int_32 png_fixed_point
const png_byte * png_const_bytep
png_uint_16 * png_uint_16p
#define png_debug1(l, m, p1)
#define PNG_IDAT_READ_SIZE
#define PNG_UNUSED(param)
#define PNG_IS_READ_STRUCT