mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Corrected const_png_ in png.h to png_const_ to avoid polluting
the namespace. Added png_get_current_row_number and png_get_current_pass_number for the benefit of the user transform callback. Added png_process_data_pause and png_process_data_skip for the benefit of progressive readers that need to stop data processing or want to optimize skipping of unread data (e.g. if the reader marks a chunk to be skipped.)
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
155ce40218
commit
0a5c9c02fa
196
png.h
196
png.h
@@ -663,7 +663,7 @@ typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
|
||||
|
||||
typedef struct png_info_def png_info;
|
||||
typedef png_info FAR * png_infop;
|
||||
typedef PNG_CONST png_info FAR * const_png_infop;
|
||||
typedef PNG_CONST png_info FAR * png_const_infop;
|
||||
typedef png_info FAR * FAR * png_infopp;
|
||||
|
||||
/* Maximum positive integer used in PNG is (2^31)-1 */
|
||||
@@ -791,7 +791,7 @@ typedef png_row_info FAR * FAR * png_row_infopp;
|
||||
* expected to return the read data in the buffer.
|
||||
*/
|
||||
typedef struct png_struct_def png_struct;
|
||||
typedef PNG_CONST png_struct FAR * const_png_structp;
|
||||
typedef PNG_CONST png_struct FAR * png_const_structp;
|
||||
typedef png_struct FAR * png_structp;
|
||||
|
||||
typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp), );
|
||||
@@ -947,7 +947,7 @@ PNG_EXPORTA(5, png_structp, png_create_write_struct,
|
||||
PNG_ALLOCATED);
|
||||
|
||||
PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
|
||||
PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr,
|
||||
png_size_t size));
|
||||
@@ -1074,7 +1074,7 @@ PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structp png_ptr,
|
||||
PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr,
|
||||
int error_action, png_fixed_point red, png_fixed_point green));
|
||||
|
||||
PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (const_png_structp
|
||||
PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structp
|
||||
png_ptr));
|
||||
#endif
|
||||
|
||||
@@ -1412,7 +1412,7 @@ PNG_EXPORT(75, void, png_set_error_fn,
|
||||
png_error_ptr error_fn, png_error_ptr warning_fn));
|
||||
|
||||
/* Return the user pointer associated with the error functions */
|
||||
PNG_EXPORT(76, png_voidp, png_get_error_ptr, (const_png_structp png_ptr));
|
||||
PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structp png_ptr));
|
||||
|
||||
/* Replace the default data output functions with a user supplied one(s).
|
||||
* If buffered output is not used, then output_flush_fn can be set to NULL.
|
||||
@@ -1445,7 +1445,7 @@ PNG_EXPORT(81, void, png_set_write_status_fn, (png_structp png_ptr,
|
||||
PNG_EXPORT(82, void, png_set_mem_fn, (png_structp png_ptr, png_voidp mem_ptr,
|
||||
png_malloc_ptr malloc_fn, png_free_ptr free_fn));
|
||||
/* Return the user pointer associated with the memory functions */
|
||||
PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (const_png_structp png_ptr));
|
||||
PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||
@@ -1458,20 +1458,31 @@ PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structp png_ptr,
|
||||
png_user_transform_ptr write_user_transform_fn));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
|
||||
PNG_EXPORT(86, void, png_set_user_transform_info, (png_structp png_ptr,
|
||||
png_voidp user_transform_ptr, int user_transform_depth,
|
||||
int user_transform_channels));
|
||||
/* Return the user pointer associated with the user transform functions */
|
||||
PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED
|
||||
/* Return information about the row currently being processed. Note that these
|
||||
* APIs do not fail but will return unexpected results if called outside a user
|
||||
* transform callback. Also note that when transforming an interlaced image the
|
||||
* row number is still the row in the final, de-interlaced, image but the row
|
||||
* only contains the data of the current pass - consult png_row_info for the
|
||||
* actual width of the row!
|
||||
*/
|
||||
PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structp));
|
||||
PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structp));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_USER_CHUNKS_SUPPORTED
|
||||
PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structp png_ptr,
|
||||
png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
|
||||
PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (const_png_structp png_ptr));
|
||||
PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
@@ -1483,13 +1494,30 @@ PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structp png_ptr,
|
||||
png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn));
|
||||
|
||||
/* Returns the user pointer associated with the push read functions */
|
||||
PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, (const_png_structp png_ptr));
|
||||
PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, (png_const_structp png_ptr));
|
||||
|
||||
/* Function to be called when data becomes available */
|
||||
PNG_EXPORT(92, void, png_process_data,
|
||||
(png_structp png_ptr, png_infop info_ptr,
|
||||
png_bytep buffer, png_size_t buffer_size));
|
||||
|
||||
/* A function which may be called *only* within png_process_data to stop the
|
||||
* processing of any more data. The function returns the number of bytes
|
||||
* remaining, excluding any that libpng has cached internally. A subsequent
|
||||
* call to png_process_data must supply these bytes again. If the argument
|
||||
* 'save' is set to true the routine will first save all the pending data and
|
||||
* will always return 0.
|
||||
*/
|
||||
PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structp, int save));
|
||||
|
||||
/* A function which may be called *only* outside (after) a call to
|
||||
* png_process_data. It returns the number of bytes of data to skip in the
|
||||
* input. Normally it will return 0, but if it returns a non-zero value the
|
||||
* application must skip than number of bytes of input data and pass the
|
||||
* following data to the next call to png_process_data.
|
||||
*/
|
||||
PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structp));
|
||||
|
||||
/* Function that combines rows. 'new_row' is a flag that should come from
|
||||
* the callback and be non-NULL if anything needs to be done; the library
|
||||
* stores its own version of the new data internally and ignores the passed
|
||||
@@ -1609,19 +1637,19 @@ PNG_EXPORT(109, void, png_set_benign_errors,
|
||||
*/
|
||||
/* Returns "flag" if chunk data is valid in info_ptr. */
|
||||
PNG_EXPORT(110, png_uint_32, png_get_valid,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_uint_32 flag));
|
||||
|
||||
/* Returns number of bytes needed to hold a transformed row. */
|
||||
PNG_EXPORT(111, png_size_t, png_get_rowbytes, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr));
|
||||
PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
|
||||
#ifdef PNG_INFO_IMAGE_SUPPORTED
|
||||
/* Returns row_pointers, which is an array of pointers to scanlines that was
|
||||
* returned from png_read_png().
|
||||
*/
|
||||
PNG_EXPORT(112, png_bytepp, png_get_rows,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
/* Set row_pointers, which is an array of pointers to scanlines for use
|
||||
* by png_write_png().
|
||||
*/
|
||||
@@ -1631,70 +1659,70 @@ PNG_EXPORT(113, void, png_set_rows, (png_structp png_ptr,
|
||||
|
||||
/* Returns number of color channels in image. */
|
||||
PNG_EXPORT(114, png_byte, png_get_channels,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
|
||||
#ifdef PNG_EASY_ACCESS_SUPPORTED
|
||||
/* Returns image width in pixels. */
|
||||
PNG_EXPORT(115, png_uint_32, png_get_image_width, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr));
|
||||
PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
|
||||
/* Returns image height in pixels. */
|
||||
PNG_EXPORT(116, png_uint_32, png_get_image_height, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr));
|
||||
PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
|
||||
/* Returns image bit_depth. */
|
||||
PNG_EXPORT(117, png_byte, png_get_bit_depth,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
|
||||
/* Returns image color_type. */
|
||||
PNG_EXPORT(118, png_byte, png_get_color_type, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr));
|
||||
PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
|
||||
/* Returns image filter_type. */
|
||||
PNG_EXPORT(119, png_byte, png_get_filter_type, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr));
|
||||
PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
|
||||
/* Returns image interlace_type. */
|
||||
PNG_EXPORT(120, png_byte, png_get_interlace_type, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr));
|
||||
PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
|
||||
/* Returns image compression_type. */
|
||||
PNG_EXPORT(121, png_byte, png_get_compression_type, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr));
|
||||
PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
|
||||
/* Returns image resolution in pixels per meter, from pHYs chunk data. */
|
||||
PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
|
||||
/* Returns pixel aspect ratio, computed from pHYs chunk data. */
|
||||
PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
|
||||
/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
|
||||
PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
PNG_EXPORT(128, png_int_32, png_get_x_offset_microns,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
PNG_EXPORT(129, png_int_32, png_get_y_offset_microns,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
|
||||
#endif /* PNG_EASY_ACCESS_SUPPORTED */
|
||||
|
||||
/* Returns pointer to signature string read from PNG header */
|
||||
PNG_EXPORT(130, png_const_bytep, png_get_signature,
|
||||
(const_png_structp png_ptr, png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_infop info_ptr));
|
||||
|
||||
#ifdef PNG_bKGD_SUPPORTED
|
||||
PNG_EXPORT(131, png_uint_32, png_get_bKGD,
|
||||
(const_png_structp png_ptr, png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_infop info_ptr,
|
||||
png_color_16p *background));
|
||||
#endif
|
||||
|
||||
@@ -1704,14 +1732,14 @@ PNG_EXPORT(132, void, png_set_bKGD, (png_structp png_ptr, png_infop info_ptr,
|
||||
#endif
|
||||
|
||||
#ifdef PNG_cHRM_SUPPORTED
|
||||
PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr, double *white_x, double *white_y, double *red_x,
|
||||
PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structp png_ptr,
|
||||
png_const_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));
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED /* Otherwise not implemented */
|
||||
PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed,
|
||||
(const_png_structp png_ptr,
|
||||
const_png_infop info_ptr, png_fixed_point *int_white_x,
|
||||
(png_const_structp png_ptr,
|
||||
png_const_infop info_ptr, png_fixed_point *int_white_x,
|
||||
png_fixed_point *int_white_y, png_fixed_point *int_red_x,
|
||||
png_fixed_point *int_red_y, png_fixed_point *int_green_x,
|
||||
png_fixed_point *int_green_y, png_fixed_point *int_blue_x,
|
||||
@@ -1734,10 +1762,10 @@ PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_structp png_ptr,
|
||||
|
||||
#ifdef PNG_gAMA_SUPPORTED
|
||||
PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
double *file_gamma));
|
||||
PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_fixed_point *int_file_gamma));
|
||||
#endif
|
||||
|
||||
@@ -1750,7 +1778,7 @@ PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_structp png_ptr,
|
||||
|
||||
#ifdef PNG_hIST_SUPPORTED
|
||||
PNG_EXPORT(141, png_uint_32, png_get_hIST,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_uint_16p *hist));
|
||||
#endif
|
||||
|
||||
@@ -1771,7 +1799,7 @@ PNG_EXPORT(144, void, png_set_IHDR,
|
||||
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
PNG_EXPORT(145, png_uint_32, png_get_oFFs,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type));
|
||||
#endif
|
||||
|
||||
@@ -1783,7 +1811,7 @@ PNG_EXPORT(146, void, png_set_oFFs,
|
||||
|
||||
#ifdef PNG_pCAL_SUPPORTED
|
||||
PNG_EXPORT(147, png_uint_32, png_get_pCAL,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type,
|
||||
int *nparams,
|
||||
png_charp *units, png_charpp *params));
|
||||
@@ -1798,7 +1826,7 @@ PNG_EXPORT(148, void, png_set_pCAL, (png_structp png_ptr,
|
||||
|
||||
#ifdef PNG_pHYs_SUPPORTED
|
||||
PNG_EXPORT(149, png_uint_32, png_get_pHYs,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
|
||||
#endif
|
||||
|
||||
@@ -1809,7 +1837,7 @@ PNG_EXPORT(150, void, png_set_pHYs,
|
||||
#endif
|
||||
|
||||
PNG_EXPORT(151, png_uint_32, png_get_PLTE,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_colorp *palette, int *num_palette));
|
||||
|
||||
PNG_EXPORT(152, void, png_set_PLTE,
|
||||
@@ -1818,7 +1846,7 @@ PNG_EXPORT(152, void, png_set_PLTE,
|
||||
|
||||
#ifdef PNG_sBIT_SUPPORTED
|
||||
PNG_EXPORT(153, png_uint_32, png_get_sBIT,
|
||||
(const_png_structp png_ptr, png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_infop info_ptr,
|
||||
png_color_8p *sig_bit));
|
||||
#endif
|
||||
|
||||
@@ -1828,8 +1856,8 @@ PNG_EXPORT(154, void, png_set_sBIT,
|
||||
#endif
|
||||
|
||||
#ifdef PNG_sRGB_SUPPORTED
|
||||
PNG_EXPORT(155, png_uint_32, png_get_sRGB, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr, int *intent));
|
||||
PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr, int *intent));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_sRGB_SUPPORTED
|
||||
@@ -1841,7 +1869,7 @@ PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr,
|
||||
|
||||
#ifdef PNG_iCCP_SUPPORTED
|
||||
PNG_EXPORT(158, png_uint_32, png_get_iCCP,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_charpp name, int *compression_type, png_bytepp profile,
|
||||
png_uint_32 *proflen));
|
||||
#endif
|
||||
@@ -1855,7 +1883,7 @@ PNG_EXPORT(159, void, png_set_iCCP,
|
||||
|
||||
#ifdef PNG_sPLT_SUPPORTED
|
||||
PNG_EXPORT(160, png_uint_32, png_get_sPLT,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_sPLT_tpp entries));
|
||||
#endif
|
||||
|
||||
@@ -1868,7 +1896,7 @@ PNG_EXPORT(161, void, png_set_sPLT,
|
||||
#ifdef PNG_TEXT_SUPPORTED
|
||||
/* png_get_text also returns the number of text chunks in *num_text */
|
||||
PNG_EXPORT(162, png_uint_32, png_get_text,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
png_textp *text_ptr, int *num_text));
|
||||
#endif
|
||||
|
||||
@@ -1887,7 +1915,7 @@ PNG_EXPORT(163, void, png_set_text,
|
||||
|
||||
#ifdef PNG_tIME_SUPPORTED
|
||||
PNG_EXPORT(164, png_uint_32, png_get_tIME,
|
||||
(const_png_structp png_ptr, png_infop info_ptr, png_timep *mod_time));
|
||||
(png_const_structp png_ptr, png_infop info_ptr, png_timep *mod_time));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_tIME_SUPPORTED
|
||||
@@ -1897,7 +1925,7 @@ PNG_EXPORT(165, void, png_set_tIME,
|
||||
|
||||
#ifdef PNG_tRNS_SUPPORTED
|
||||
PNG_EXPORT(166, png_uint_32, png_get_tRNS,
|
||||
(const_png_structp png_ptr, png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_infop info_ptr,
|
||||
png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color));
|
||||
#endif
|
||||
|
||||
@@ -1910,7 +1938,7 @@ PNG_EXPORT(167, void, png_set_tRNS,
|
||||
|
||||
#ifdef PNG_sCAL_SUPPORTED
|
||||
PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
int *unit, double *width, double *height));
|
||||
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||
/* NOTE: this API is currently implemented using floating point arithmetic,
|
||||
@@ -1919,12 +1947,12 @@ PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL,
|
||||
* is highly recommended that png_get_sCAL_s be used instead.
|
||||
*/
|
||||
PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed,
|
||||
(png_structp png_ptr, const_png_infop info_ptr, int *unit,
|
||||
(png_structp png_ptr, png_const_infop info_ptr, int *unit,
|
||||
png_fixed_point *width,
|
||||
png_fixed_point *height));
|
||||
#endif
|
||||
PNG_EXPORT(169, png_uint_32, png_get_sCAL_s,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr,
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr,
|
||||
int *unit, png_charpp swidth, png_charpp sheight));
|
||||
|
||||
PNG_FP_EXPORT(170, void, png_set_sCAL,
|
||||
@@ -1960,8 +1988,8 @@ PNG_EXPORT(174, void, png_set_unknown_chunks, (png_structp png_ptr,
|
||||
int num_unknowns));
|
||||
PNG_EXPORT(175, void, png_set_unknown_chunk_location,
|
||||
(png_structp png_ptr, png_infop info_ptr, int chunk, int location));
|
||||
PNG_EXPORT(176, int, png_get_unknown_chunks, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr, png_unknown_chunkpp entries));
|
||||
PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr, png_unknown_chunkpp entries));
|
||||
#endif
|
||||
|
||||
/* Png_free_data() will turn off the "valid" flag for anything it frees.
|
||||
@@ -1980,13 +2008,13 @@ PNG_EXPORT(179, void, png_write_png, (png_structp png_ptr, png_infop info_ptr,
|
||||
#endif
|
||||
|
||||
PNG_EXPORT(180, png_const_charp, png_get_copyright,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
PNG_EXPORT(181, png_const_charp, png_get_header_ver,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
PNG_EXPORT(182, png_const_charp, png_get_header_version,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
PNG_EXPORT(183, png_const_charp, png_get_libpng_ver,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
|
||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||
PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp png_ptr,
|
||||
@@ -2013,48 +2041,48 @@ PNG_EXPORT(185, void, png_set_strip_error_numbers,
|
||||
PNG_EXPORT(186, void, png_set_user_limits, (png_structp png_ptr,
|
||||
png_uint_32 user_width_max, png_uint_32 user_height_max));
|
||||
PNG_EXPORT(187, png_uint_32, png_get_user_width_max,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
PNG_EXPORT(188, png_uint_32, png_get_user_height_max,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
/* Added in libpng-1.4.0 */
|
||||
PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structp png_ptr,
|
||||
png_uint_32 user_chunk_cache_max));
|
||||
PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
/* Added in libpng-1.4.1 */
|
||||
PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structp png_ptr,
|
||||
png_alloc_size_t user_chunk_cache_max));
|
||||
PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_INCH_CONVERSIONS_SUPPORTED)
|
||||
PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
|
||||
PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
|
||||
PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
|
||||
PNG_FP_EXPORT(196, float, png_get_x_offset_inches,
|
||||
(const_png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_const_structp png_ptr, png_const_infop info_ptr));
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
|
||||
PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed,
|
||||
(png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_structp png_ptr, png_const_infop info_ptr));
|
||||
#endif
|
||||
|
||||
PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr));
|
||||
PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr));
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
|
||||
PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed,
|
||||
(png_structp png_ptr, const_png_infop info_ptr));
|
||||
(png_structp png_ptr, png_const_infop info_ptr));
|
||||
#endif
|
||||
|
||||
# ifdef PNG_pHYs_SUPPORTED
|
||||
PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (const_png_structp png_ptr,
|
||||
const_png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
|
||||
PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
|
||||
int *unit_type));
|
||||
# endif /* PNG_pHYs_SUPPORTED */
|
||||
#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */
|
||||
@@ -2066,7 +2094,7 @@ PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_structp png_ptr));
|
||||
PNG_EXPORTA(200, png_const_bytep, png_get_io_chunk_name,
|
||||
(png_structp png_ptr), PNG_DEPRECATED);
|
||||
PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
|
||||
(const_png_structp png_ptr));
|
||||
(png_const_structp png_ptr));
|
||||
|
||||
/* The flags returned by png_get_io_state() are the following: */
|
||||
# define PNG_IO_NONE 0x0000 /* no I/O at this moment */
|
||||
@@ -2236,7 +2264,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
|
||||
* scripts/symbols.def as well.
|
||||
*/
|
||||
#ifdef PNG_EXPORT_LAST_ORDINAL
|
||||
PNG_EXPORT_LAST_ORDINAL(216);
|
||||
PNG_EXPORT_LAST_ORDINAL(220);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user