16#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
24#ifdef PNG_READ_tRNS_SUPPORTED
48#ifdef PNG_INFO_IMAGE_SUPPORTED
59#ifdef PNG_EASY_ACCESS_SUPPORTED
128#ifdef PNG_pHYs_SUPPORTED
129 png_debug(1,
"in png_get_x_pixels_per_meter");
149#ifdef PNG_pHYs_SUPPORTED
150 png_debug(1,
"in png_get_y_pixels_per_meter");
169#ifdef PNG_pHYs_SUPPORTED
170 png_debug(1,
"in png_get_pixels_per_meter");
187#ifdef PNG_FLOATING_POINT_SUPPORTED
192#ifdef PNG_READ_pHYs_SUPPORTED
193 png_debug(1,
"in png_get_pixel_aspect_ratio");
198 if (
info_ptr->x_pixels_per_unit != 0)
199 return (
float)
info_ptr->y_pixels_per_unit
211#ifdef PNG_FIXED_POINT_SUPPORTED
216#ifdef PNG_READ_pHYs_SUPPORTED
217 png_debug(1,
"in png_get_pixel_aspect_ratio_fixed");
231 (png_int_32)
info_ptr->x_pixels_per_unit) != 0)
246#ifdef PNG_oFFs_SUPPORTED
247 png_debug(1,
"in png_get_x_offset_microns");
266#ifdef PNG_oFFs_SUPPORTED
267 png_debug(1,
"in png_get_y_offset_microns");
286#ifdef PNG_oFFs_SUPPORTED
287 png_debug(1,
"in png_get_x_offset_pixels");
306#ifdef PNG_oFFs_SUPPORTED
307 png_debug(1,
"in png_get_y_offset_pixels");
323#ifdef PNG_INCH_CONVERSIONS_SUPPORTED
333 t1001 = ppm + (ppm >> 3);
334 t1101 = t1001 + (ppm >> 1);
336 t1101 += t1101 >> 15;
338 t1001 += t1001 >> 12;
341 return (ppm + 16) >> 5;
374#ifdef PNG_FIXED_POINT_SUPPORTED
385 if (png_muldiv(&
result, microns, 500, 127) != 0)
388 png_warning(
png_ptr,
"fixed point overflow ignored");
396 return png_fixed_inches_from_microns(
png_ptr,
401#ifdef PNG_FIXED_POINT_SUPPORTED
406 return png_fixed_inches_from_microns(
png_ptr,
411#ifdef PNG_FLOATING_POINT_SUPPORTED
418 return (
float)(png_get_x_offset_microns(
png_ptr,
info_ptr) * .00003937);
422#ifdef PNG_FLOATING_POINT_SUPPORTED
429 return (
float)(png_get_y_offset_microns(
png_ptr,
info_ptr) * .00003937);
433#ifdef PNG_pHYs_SUPPORTED
440 png_debug1(1,
"in %s retrieval function",
"pHYs");
447 *res_x =
info_ptr->x_pixels_per_unit;
453 *res_y =
info_ptr->y_pixels_per_unit;
457 if (unit_type !=
NULL)
489#ifdef PNG_READ_SUPPORTED
500#ifdef PNG_bKGD_SUPPORTED
505 png_debug1(1,
"in %s retrieval function",
"bKGD");
511 *background = &(
info_ptr->background);
519#ifdef PNG_cHRM_SUPPORTED
524# ifdef PNG_FLOATING_POINT_SUPPORTED
527 double *whitex,
double *whitey,
double *redx,
double *redy,
528 double *greenx,
double *greeny,
double *bluex,
double *bluey)
530 png_debug1(1,
"in %s retrieval function",
"cHRM");
565 png_debug1(1,
"in %s retrieval function",
"cHRM_XYZ(float)");
569 png_XYZ_from_xy(&XYZ, &
info_ptr->cHRM) == 0)
596# ifdef PNG_FIXED_POINT_SUPPORTED
606 png_debug1(1,
"in %s retrieval function",
"cHRM_XYZ");
610 png_XYZ_from_xy(&XYZ, &
info_ptr->cHRM) == 0)
620 if (int_blue_Z !=
NULL) *int_blue_Z = XYZ.
blue_Z;
633 png_debug1(1,
"in %s retrieval function",
"cHRM");
655#ifdef PNG_gAMA_SUPPORTED
656# ifdef PNG_FIXED_POINT_SUPPORTED
661 png_debug1(1,
"in %s retrieval function",
"gAMA");
675# ifdef PNG_FLOATING_POINT_SUPPORTED
680 png_debug1(1,
"in %s retrieval function",
"gAMA(float)");
686 if (file_gamma !=
NULL)
697#ifdef PNG_sRGB_SUPPORTED
700 int *file_srgb_intent)
702 png_debug1(1,
"in %s retrieval function",
"sRGB");
707 if (file_srgb_intent !=
NULL)
708 *file_srgb_intent =
info_ptr->rendering_intent;
716#ifdef PNG_iCCP_SUPPORTED
722 png_debug1(1,
"in %s retrieval function",
"iCCP");
734 if (compression_type !=
NULL)
743#ifdef PNG_sPLT_SUPPORTED
748 png_debug1(1,
"in %s retrieval function",
"sPLT");
752 *spalettes =
info_ptr->splt_palettes;
760#ifdef PNG_cICP_SUPPORTED
767 png_debug1(1,
"in %s retrieval function",
"cICP");
771 colour_primaries !=
NULL && transfer_function !=
NULL &&
772 matrix_coefficients !=
NULL && video_full_range_flag !=
NULL)
774 *colour_primaries =
info_ptr->cicp_colour_primaries;
775 *transfer_function =
info_ptr->cicp_transfer_function;
776 *matrix_coefficients =
info_ptr->cicp_matrix_coefficients;
777 *video_full_range_flag =
info_ptr->cicp_video_full_range_flag;
785#ifdef PNG_cLLI_SUPPORTED
786# ifdef PNG_FIXED_POINT_SUPPORTED
792 png_debug1(1,
"in %s retrieval function",
"cLLI");
806# ifdef PNG_FLOATING_POINT_SUPPORTED
809 double *maxCLL,
double *maxFALL)
811 png_debug1(1,
"in %s retrieval function",
"cLLI(float)");
817 if (maxFALL !=
NULL) *maxFALL =
info_ptr->maxFALL * .0001;
826#ifdef PNG_mDCV_SUPPORTED
827# ifdef PNG_FIXED_POINT_SUPPORTED
836 png_debug1(1,
"in %s retrieval function",
"mDCV");
841 if (white_x !=
NULL) *white_x =
info_ptr->mastering_white_x * 2;
842 if (white_y !=
NULL) *white_y =
info_ptr->mastering_white_y * 2;
843 if (red_x !=
NULL) *red_x =
info_ptr->mastering_red_x * 2;
844 if (red_y !=
NULL) *red_y =
info_ptr->mastering_red_y * 2;
845 if (green_x !=
NULL) *green_x =
info_ptr->mastering_green_x * 2;
846 if (green_y !=
NULL) *green_y =
info_ptr->mastering_green_y * 2;
847 if (blue_x !=
NULL) *blue_x =
info_ptr->mastering_blue_x * 2;
848 if (blue_y !=
NULL) *blue_y =
info_ptr->mastering_blue_y * 2;
849 if (mastering_maxDL !=
NULL) *mastering_maxDL =
info_ptr->mastering_maxDL;
850 if (mastering_minDL !=
NULL) *mastering_minDL =
info_ptr->mastering_minDL;
858# ifdef PNG_FLOATING_POINT_SUPPORTED
861 double *white_x,
double *white_y,
double *red_x,
double *red_y,
862 double *green_x,
double *green_y,
double *blue_x,
double *blue_y,
863 double *mastering_maxDL,
double *mastering_minDL)
865 png_debug1(1,
"in %s retrieval function",
"mDCV(float)");
870 if (white_x !=
NULL) *white_x =
info_ptr->mastering_white_x * .00002;
871 if (white_y !=
NULL) *white_y =
info_ptr->mastering_white_y * .00002;
872 if (red_x !=
NULL) *red_x =
info_ptr->mastering_red_x * .00002;
873 if (red_y !=
NULL) *red_y =
info_ptr->mastering_red_y * .00002;
874 if (green_x !=
NULL) *green_x =
info_ptr->mastering_green_x * .00002;
875 if (green_y !=
NULL) *green_y =
info_ptr->mastering_green_y * .00002;
876 if (blue_x !=
NULL) *blue_x =
info_ptr->mastering_blue_x * .00002;
877 if (blue_y !=
NULL) *blue_y =
info_ptr->mastering_blue_y * .00002;
878 if (mastering_maxDL !=
NULL)
879 *mastering_maxDL =
info_ptr->mastering_maxDL * .0001;
880 if (mastering_minDL !=
NULL)
881 *mastering_minDL =
info_ptr->mastering_minDL * .0001;
890#ifdef PNG_eXIf_SUPPORTED
895 png_warning(
png_ptr,
"png_get_eXIf does not work; use png_get_eXIf_1");
905 png_debug1(1,
"in %s retrieval function",
"eXIf");
919#ifdef PNG_hIST_SUPPORTED
924 png_debug1(1,
"in %s retrieval function",
"hIST");
940 int *color_type,
int *interlace_type,
int *compression_type,
943 png_debug1(1,
"in %s retrieval function",
"IHDR");
954 if (bit_depth !=
NULL)
957 if (color_type !=
NULL)
960 if (compression_type !=
NULL)
961 *compression_type =
info_ptr->compression_type;
963 if (filter_type !=
NULL)
964 *filter_type =
info_ptr->filter_type;
966 if (interlace_type !=
NULL)
967 *interlace_type =
info_ptr->interlace_type;
981#ifdef PNG_oFFs_SUPPORTED
984 png_int_32 *offset_x, png_int_32 *offset_y,
int *unit_type)
986 png_debug1(1,
"in %s retrieval function",
"oFFs");
990 offset_x !=
NULL && offset_y !=
NULL && unit_type !=
NULL)
1002#ifdef PNG_pCAL_SUPPORTED
1005 png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
int *
type,
int *nparams,
1008 png_debug1(1,
"in %s retrieval function",
"pCAL");
1019 *nparams = (
int)
info_ptr->pcal_nparams;
1029#ifdef PNG_sCAL_SUPPORTED
1030# ifdef PNG_FIXED_POINT_SUPPORTED
1031# if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \
1032 defined(PNG_FLOATING_POINT_SUPPORTED)
1037 png_debug1(1,
"in %s retrieval function",
"sCAL");
1057# ifdef PNG_FLOATING_POINT_SUPPORTED
1062 png_debug1(1,
"in %s retrieval function",
"sCAL(float)");
1080 png_debug1(1,
"in %s retrieval function",
"sCAL(str)");
1095#ifdef PNG_pHYs_SUPPORTED
1102 png_debug1(1,
"in %s retrieval function",
"pHYs");
1109 *res_x =
info_ptr->x_pixels_per_unit;
1115 *res_y =
info_ptr->y_pixels_per_unit;
1119 if (unit_type !=
NULL)
1134 png_debug1(1,
"in %s retrieval function",
"PLTE");
1140 *num_palette =
info_ptr->num_palette;
1141 png_debug1(3,
"num_palette = %d", *num_palette);
1148#ifdef PNG_sBIT_SUPPORTED
1153 png_debug1(1,
"in %s retrieval function",
"sBIT");
1166#ifdef PNG_TEXT_SUPPORTED
1173 png_debug1(1,
"in text retrieval function, chunk typeid = 0x%lx",
1174 (
unsigned long)
png_ptr->chunk_name);
1176 if (text_ptr !=
NULL)
1179 if (num_text !=
NULL)
1185 if (num_text !=
NULL)
1192#ifdef PNG_tIME_SUPPORTED
1197 png_debug1(1,
"in %s retrieval function",
"tIME");
1210#ifdef PNG_tRNS_SUPPORTED
1217 png_debug1(1,
"in %s retrieval function",
"tRNS");
1224 if (trans_alpha !=
NULL)
1226 *trans_alpha =
info_ptr->trans_alpha;
1230 if (trans_color !=
NULL)
1231 *trans_color = &(
info_ptr->trans_color);
1236 if (trans_color !=
NULL)
1238 *trans_color = &(
info_ptr->trans_color);
1242 if (trans_alpha !=
NULL)
1243 *trans_alpha =
NULL;
1246 if (num_trans !=
NULL)
1257#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
1264 *unknowns =
info_ptr->unknown_chunks;
1265 return info_ptr->unknown_chunks_num;
1272#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
1280#ifdef PNG_USER_CHUNKS_SUPPORTED
1294#ifdef PNG_WRITE_SUPPORTED
1298#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
1299 return png_ptr->IDAT_read_size;
1305#ifdef PNG_WRITE_SUPPORTED
1311#ifdef PNG_SET_USER_LIMITS_SUPPORTED
1342#ifdef PNG_IO_STATE_SUPPORTED
1356#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
1357# ifdef PNG_GET_PALETTE_MAX_SUPPORTED
1362 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
static float(__cdecl *square_half_float)(float x
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
png_uint_32 * png_uint_32p
#define png_debug1(l, m, p1)
#define PNG_IDAT_READ_SIZE
#define PNG_UNUSED(param)
#define PNG_IS_READ_STRUCT