mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Fixed more inconsistent indentation in the header files.
This commit is contained in:
parent
d4df36c7f0
commit
e8b1aa0c5a
381
png.h
381
png.h
@ -345,7 +345,7 @@
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.5.0beta11"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.5.0beta11 - March 3, 2010\n"
|
||||
" libpng version 1.5.0beta11 - March 3, 2010\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 15
|
||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||
@ -409,11 +409,11 @@
|
||||
|
||||
#ifdef PNG_USER_PRIVATEBUILD
|
||||
# define PNG_LIBPNG_BUILD_TYPE \
|
||||
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
|
||||
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
|
||||
#else
|
||||
# ifdef PNG_LIBPNG_SPECIALBUILD
|
||||
# define PNG_LIBPNG_BUILD_TYPE \
|
||||
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
|
||||
(PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
|
||||
# else
|
||||
# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
|
||||
# endif
|
||||
@ -567,7 +567,7 @@ typedef png_time FAR * png_timep;
|
||||
typedef png_time FAR * FAR * png_timepp;
|
||||
|
||||
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
|
||||
defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
|
||||
defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
|
||||
/* png_unknown_chunk is a structure to hold queued chunks for which there is
|
||||
* no specific support. The idea is that we can use this to queue
|
||||
* up private chunks for output even though the library doesn't actually
|
||||
@ -723,16 +723,16 @@ typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));
|
||||
typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));
|
||||
typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp));
|
||||
typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32,
|
||||
int));
|
||||
int));
|
||||
typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32,
|
||||
int));
|
||||
int));
|
||||
|
||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp,
|
||||
png_infop));
|
||||
png_infop));
|
||||
typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
|
||||
typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
|
||||
png_uint_32, int));
|
||||
png_uint_32, int));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
@ -743,7 +743,7 @@ typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,
|
||||
|
||||
#ifdef PNG_USER_CHUNKS_SUPPORTED
|
||||
typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp,
|
||||
png_unknown_chunkp));
|
||||
png_unknown_chunkp));
|
||||
#endif
|
||||
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
|
||||
typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
|
||||
@ -813,7 +813,7 @@ extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void));
|
||||
* Handling more than 8 bytes from the beginning of the file is an error.
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,
|
||||
int num_bytes));
|
||||
int num_bytes));
|
||||
|
||||
/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
|
||||
* PNG file. Returns zero if the supplied bytes match the 8-byte PNG
|
||||
@ -821,23 +821,23 @@ extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,
|
||||
* start > 7 will always fail (ie return non-zero).
|
||||
*/
|
||||
extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,
|
||||
png_size_t num_to_check));
|
||||
png_size_t num_to_check));
|
||||
|
||||
/* Allocate and initialize png_ptr struct for reading, and any other memory. */
|
||||
extern PNG_EXPORT(png_structp,png_create_read_struct)
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
|
||||
|
||||
/* Allocate and initialize png_ptr struct for writing, and any other memory */
|
||||
extern PNG_EXPORT(png_structp,png_create_write_struct)
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
|
||||
|
||||
extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size)
|
||||
PNGARG((png_structp png_ptr));
|
||||
PNGARG((png_structp png_ptr));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_compression_buffer_size)
|
||||
PNGARG((png_structp png_ptr, png_size_t size));
|
||||
PNGARG((png_structp png_ptr, png_size_t size));
|
||||
|
||||
/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
|
||||
* match up.
|
||||
@ -851,13 +851,13 @@ extern PNG_EXPORT(void,png_set_compression_buffer_size)
|
||||
* indicating an ABI mismatch.
|
||||
*/
|
||||
extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn)
|
||||
PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t
|
||||
jmp_buf_size));
|
||||
PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t
|
||||
jmp_buf_size));
|
||||
# define png_jmpbuf(png_ptr) \
|
||||
(*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
|
||||
(*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
|
||||
#else
|
||||
# define png_jmpbuf(png_ptr) \
|
||||
(LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
|
||||
(LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
|
||||
#endif
|
||||
/* This function should be used by libpng applications in place of
|
||||
* longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it
|
||||
@ -873,13 +873,13 @@ extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
|
||||
/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
extern PNG_EXPORT(png_structp,png_create_read_struct_2)
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
|
||||
png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
|
||||
png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
|
||||
extern PNG_EXPORT(png_structp,png_create_write_struct_2)
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
|
||||
png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
|
||||
PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
|
||||
png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
|
||||
#endif
|
||||
|
||||
/* Write the PNG file signature. */
|
||||
@ -887,51 +887,51 @@ extern PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr));
|
||||
|
||||
/* Write a PNG chunk - size, type, (optional) data, CRC. */
|
||||
extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,
|
||||
png_bytep chunk_name, png_bytep data, png_size_t length));
|
||||
png_bytep chunk_name, png_bytep data, png_size_t length));
|
||||
|
||||
/* Write the start of a PNG chunk - length and chunk name. */
|
||||
extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr,
|
||||
png_bytep chunk_name, png_uint_32 length));
|
||||
png_bytep chunk_name, png_uint_32 length));
|
||||
|
||||
/* Write the data of a PNG chunk started with png_write_chunk_start(). */
|
||||
extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr,
|
||||
png_bytep data, png_size_t length));
|
||||
png_bytep data, png_size_t length));
|
||||
|
||||
/* Finish a chunk started with png_write_chunk_start() (includes CRC). */
|
||||
extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
|
||||
|
||||
/* Allocate and initialize the info structure */
|
||||
extern PNG_EXPORT(png_infop,png_create_info_struct)
|
||||
PNGARG((png_structp png_ptr)) PNG_ALLOCATED;
|
||||
PNGARG((png_structp png_ptr)) PNG_ALLOCATED;
|
||||
|
||||
extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
|
||||
png_size_t png_info_struct_size));
|
||||
|
||||
/* Writes all the PNG information before the image. */
|
||||
extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
|
||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
/* Read the information before the actual image data. */
|
||||
extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_TIME_RFC1123_SUPPORTED
|
||||
extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
|
||||
PNGARG((png_structp png_ptr, png_timep ptime));
|
||||
PNGARG((png_structp png_ptr, png_timep ptime));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_CONVERT_tIME_SUPPORTED
|
||||
/* Convert from a struct tm to png_time */
|
||||
extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
|
||||
struct tm FAR * ttime));
|
||||
struct tm FAR * ttime));
|
||||
|
||||
/* Convert from time_t to png_time. Uses gmtime() */
|
||||
extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
|
||||
time_t ttime));
|
||||
time_t ttime));
|
||||
#endif /* PNG_CONVERT_tIME_SUPPORTED */
|
||||
|
||||
#ifdef PNG_READ_EXPAND_SUPPORTED
|
||||
@ -957,16 +957,16 @@ extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));
|
||||
/* Reduce RGB to grayscale. */
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
|
||||
int error_action, double red, double green ));
|
||||
int error_action, double red, double green ));
|
||||
# endif
|
||||
extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,
|
||||
int error_action, png_fixed_point red, png_fixed_point green ));
|
||||
int error_action, png_fixed_point red, png_fixed_point green ));
|
||||
extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp
|
||||
png_ptr));
|
||||
png_ptr));
|
||||
#endif
|
||||
|
||||
extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,
|
||||
png_colorp palette));
|
||||
png_colorp palette));
|
||||
|
||||
#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));
|
||||
@ -985,13 +985,13 @@ extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
|
||||
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
|
||||
/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
|
||||
extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
|
||||
png_uint_32 filler, int flags));
|
||||
png_uint_32 filler, int flags));
|
||||
/* The values of the PNG_FILLER_ defines should NOT be changed */
|
||||
# define PNG_FILLER_BEFORE 0
|
||||
# define PNG_FILLER_AFTER 1
|
||||
/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
|
||||
extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr,
|
||||
png_uint_32 filler, int flags));
|
||||
png_uint_32 filler, int flags));
|
||||
#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
|
||||
|
||||
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
|
||||
@ -1013,7 +1013,7 @@ extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr));
|
||||
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
|
||||
/* Converts files to legal bit depths. */
|
||||
extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr,
|
||||
png_color_8p true_bits));
|
||||
png_color_8p true_bits));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
|
||||
@ -1031,8 +1031,8 @@ extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));
|
||||
/* Handle alpha and tRNS by replacing with a background color. */
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
|
||||
png_color_16p background_color, int background_gamma_code,
|
||||
int need_expand, double background_gamma));
|
||||
png_color_16p background_color, int background_gamma_code,
|
||||
int need_expand, double background_gamma));
|
||||
# endif
|
||||
# define PNG_BACKGROUND_GAMMA_UNKNOWN 0
|
||||
# define PNG_BACKGROUND_GAMMA_SCREEN 1
|
||||
@ -1050,15 +1050,15 @@ extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
|
||||
* available.
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,
|
||||
png_colorp palette, int num_palette, int maximum_colors,
|
||||
png_uint_16p histogram, int full_dither));
|
||||
png_colorp palette, int num_palette, int maximum_colors,
|
||||
png_uint_16p histogram, int full_dither));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||
/* Handle gamma correction. Screen_gamma=(display_exponent) */
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
|
||||
double screen_gamma, double default_file_gamma));
|
||||
double screen_gamma, double default_file_gamma));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -1075,64 +1075,64 @@ extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));
|
||||
|
||||
/* Optional call to update the users info structure */
|
||||
extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
|
||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
/* Read one or more rows of image data. */
|
||||
extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,
|
||||
png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
|
||||
png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
/* Read a row of data. */
|
||||
extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,
|
||||
png_bytep row,
|
||||
png_bytep display_row));
|
||||
png_bytep row,
|
||||
png_bytep display_row));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
/* Read the whole image into memory at once. */
|
||||
extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,
|
||||
png_bytepp image));
|
||||
png_bytepp image));
|
||||
#endif
|
||||
|
||||
/* Write a row of image data */
|
||||
extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,
|
||||
png_bytep row));
|
||||
png_bytep row));
|
||||
|
||||
/* Write a few rows of image data */
|
||||
extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,
|
||||
png_bytepp row, png_uint_32 num_rows));
|
||||
png_bytepp row, png_uint_32 num_rows));
|
||||
|
||||
/* Write the image data */
|
||||
extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
|
||||
png_bytepp image));
|
||||
png_bytepp image));
|
||||
|
||||
/* Write the end of the PNG file. */
|
||||
extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
|
||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
/* Read the end of the PNG file. */
|
||||
extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
#endif
|
||||
|
||||
/* Free any memory associated with the png_info_struct */
|
||||
extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,
|
||||
png_infopp info_ptr_ptr));
|
||||
png_infopp info_ptr_ptr));
|
||||
|
||||
/* Free any memory associated with the png_struct and the png_info_structs */
|
||||
extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp
|
||||
png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
|
||||
png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
|
||||
|
||||
/* Free any memory associated with the png_struct and the png_info_structs */
|
||||
extern PNG_EXPORT(void,png_destroy_write_struct)
|
||||
PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
|
||||
PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
|
||||
|
||||
/* Set the libpng method of handling chunk CRC errors */
|
||||
extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
|
||||
int crit_action, int ancil_action));
|
||||
int crit_action, int ancil_action));
|
||||
|
||||
/* Values for png_set_crc_action() to say how to handle CRC errors in
|
||||
* ancillary and critical chunks, and whether to use the data contained
|
||||
@ -1162,7 +1162,7 @@ extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
|
||||
* value for "method" is 0.
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
|
||||
int filters));
|
||||
int filters));
|
||||
|
||||
/* Flags for png_set_filter() to say which filters to use. The flags
|
||||
* are chosen so that they don't conflict with real filter types
|
||||
@ -1219,8 +1219,8 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
|
||||
*/
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
|
||||
int heuristic_method, int num_weights, png_doublep filter_weights,
|
||||
png_doublep filter_costs));
|
||||
int heuristic_method, int num_weights, png_doublep filter_weights,
|
||||
png_doublep filter_costs));
|
||||
# endif
|
||||
#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
|
||||
|
||||
@ -1240,19 +1240,19 @@ extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
|
||||
* these values may not correspond directly to the zlib compression levels.
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr,
|
||||
int level));
|
||||
int level));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_compression_mem_level)
|
||||
PNGARG((png_structp png_ptr, int mem_level));
|
||||
PNGARG((png_structp png_ptr, int mem_level));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_compression_strategy)
|
||||
PNGARG((png_structp png_ptr, int strategy));
|
||||
PNGARG((png_structp png_ptr, int strategy));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_compression_window_bits)
|
||||
PNGARG((png_structp png_ptr, int window_bits));
|
||||
PNGARG((png_structp png_ptr, int window_bits));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr,
|
||||
int method));
|
||||
int method));
|
||||
|
||||
/* These next functions are called for input/output, memory, and error
|
||||
* handling. They are in the file pngrio.c, pngwio.c, and pngerror.c,
|
||||
@ -1278,7 +1278,7 @@ extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr,
|
||||
*/
|
||||
|
||||
extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr,
|
||||
png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
|
||||
png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
|
||||
|
||||
/* Return the user pointer associated with the error functions */
|
||||
extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
|
||||
@ -1294,54 +1294,54 @@ extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
|
||||
* be used.
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,
|
||||
png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
|
||||
png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
|
||||
|
||||
/* Replace the default data input function with a user supplied one. */
|
||||
extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr,
|
||||
png_voidp io_ptr, png_rw_ptr read_data_fn));
|
||||
png_voidp io_ptr, png_rw_ptr read_data_fn));
|
||||
|
||||
/* Return the user pointer associated with the I/O functions */
|
||||
extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr,
|
||||
png_read_status_ptr read_row_fn));
|
||||
png_read_status_ptr read_row_fn));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr,
|
||||
png_write_status_ptr write_row_fn));
|
||||
png_write_status_ptr write_row_fn));
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
/* Replace the default memory allocation functions with user supplied one(s). */
|
||||
extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
|
||||
png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
|
||||
png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
|
||||
/* Return the user pointer associated with the memory functions */
|
||||
extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp
|
||||
png_ptr, png_user_transform_ptr read_user_transform_fn));
|
||||
png_ptr, png_user_transform_ptr read_user_transform_fn));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp
|
||||
png_ptr, png_user_transform_ptr write_user_transform_fn));
|
||||
png_ptr, png_user_transform_ptr write_user_transform_fn));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
|
||||
png_ptr, png_voidp user_transform_ptr, int user_transform_depth,
|
||||
int user_transform_channels));
|
||||
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 */
|
||||
extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr)
|
||||
PNGARG((png_structp png_ptr));
|
||||
PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_USER_CHUNKS_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,
|
||||
png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
|
||||
png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
|
||||
extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp
|
||||
png_ptr));
|
||||
png_ptr));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
@ -1349,45 +1349,45 @@ extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp
|
||||
* user-defined structure available to the callback functions.
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,
|
||||
png_voidp progressive_ptr,
|
||||
png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
|
||||
png_progressive_end_ptr end_fn));
|
||||
png_voidp progressive_ptr,
|
||||
png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
|
||||
png_progressive_end_ptr end_fn));
|
||||
|
||||
/* Returns the user pointer associated with the push read functions */
|
||||
extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
|
||||
PNGARG((png_structp png_ptr));
|
||||
PNGARG((png_structp png_ptr));
|
||||
|
||||
/* Function to be called when data becomes available */
|
||||
extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
|
||||
png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
|
||||
|
||||
/* Function that combines rows. Not very much different than the
|
||||
* png_combine_row() call. Is this even used?????
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
|
||||
png_bytep old_row, png_bytep new_row));
|
||||
png_bytep old_row, png_bytep new_row));
|
||||
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||
|
||||
extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
|
||||
png_alloc_size_t size)) PNG_ALLOCATED;
|
||||
png_alloc_size_t size)) PNG_ALLOCATED;
|
||||
/* Added at libpng version 1.4.0 */
|
||||
extern PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr,
|
||||
png_alloc_size_t size)) PNG_ALLOCATED;
|
||||
|
||||
/* Added at libpng version 1.2.4 */
|
||||
extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
|
||||
png_alloc_size_t size)) PNG_ALLOCATED;
|
||||
png_alloc_size_t size)) PNG_ALLOCATED;
|
||||
|
||||
/* Frees a pointer allocated by png_malloc() */
|
||||
extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
|
||||
|
||||
/* Free data that was allocated internally */
|
||||
extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 free_me, int num));
|
||||
png_infop info_ptr, png_uint_32 free_me, int num));
|
||||
/* Reassign responsibility for freeing existing data, whether allocated
|
||||
* by libpng or by the application */
|
||||
extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int freer, png_uint_32 mask));
|
||||
png_infop info_ptr, int freer, png_uint_32 mask));
|
||||
/* Assignments for png_data_freer */
|
||||
#define PNG_DESTROY_WILL_FREE_DATA 1
|
||||
#define PNG_SET_WILL_FREE_DATA 1
|
||||
@ -1409,19 +1409,19 @@ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,
|
||||
png_alloc_size_t size)) PNG_ALLOCATED;
|
||||
png_alloc_size_t size)) PNG_ALLOCATED;
|
||||
extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,
|
||||
png_voidp ptr));
|
||||
png_voidp ptr));
|
||||
#endif
|
||||
|
||||
#ifndef PNG_NO_ERROR_TEXT
|
||||
/* Fatal error in PNG image of libpng - can't continue */
|
||||
extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
|
||||
png_const_charp error_message)) PNG_NORETURN;
|
||||
png_const_charp error_message)) PNG_NORETURN;
|
||||
|
||||
/* The same, but the chunk name is prepended to the error string. */
|
||||
extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,
|
||||
png_const_charp error_message)) PNG_NORETURN;
|
||||
png_const_charp error_message)) PNG_NORETURN;
|
||||
|
||||
#else
|
||||
/* Fatal error in PNG image of libpng - can't continue */
|
||||
@ -1430,24 +1430,24 @@ extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN;
|
||||
|
||||
/* Non-fatal error in libpng. Can continue, but may have a problem. */
|
||||
extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
|
||||
png_const_charp warning_message));
|
||||
png_const_charp warning_message));
|
||||
|
||||
/* Non-fatal error in libpng, chunk name is prepended to message. */
|
||||
extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
|
||||
png_const_charp warning_message));
|
||||
png_const_charp warning_message));
|
||||
|
||||
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
|
||||
/* Benign error in libpng. Can continue, but may have a problem.
|
||||
* User can choose whether to handle as a fatal error or as a warning. */
|
||||
extern PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr,
|
||||
png_const_charp warning_message));
|
||||
png_const_charp warning_message));
|
||||
|
||||
/* Same, chunk name is prepended to message. */
|
||||
extern PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr,
|
||||
png_const_charp warning_message));
|
||||
png_const_charp warning_message));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp
|
||||
png_ptr, int allowed));
|
||||
png_ptr, int allowed));
|
||||
#endif
|
||||
|
||||
/* The png_set_<chunk> functions are for storing values in the png_info_struct.
|
||||
@ -1480,7 +1480,7 @@ png_infop info_ptr));
|
||||
* by png_write_png().
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_bytepp row_pointers));
|
||||
png_infop info_ptr, png_bytepp row_pointers));
|
||||
#endif
|
||||
|
||||
/* Returns number of color channels in image. */
|
||||
@ -1548,173 +1548,176 @@ png_infop info_ptr));
|
||||
|
||||
#ifdef PNG_bKGD_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_color_16p *background));
|
||||
png_infop info_ptr, png_color_16p *background));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_bKGD_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_color_16p background));
|
||||
png_infop info_ptr, png_color_16p background));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_cHRM_SUPPORTED
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((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));
|
||||
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));
|
||||
# endif
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,
|
||||
png_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, png_fixed_point *int_blue_y));
|
||||
png_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, png_fixed_point *int_blue_y));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef PNG_cHRM_SUPPORTED
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_cHRM) PNGARG((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));
|
||||
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));
|
||||
# endif
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
|
||||
png_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,
|
||||
png_fixed_point int_blue_y));
|
||||
png_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, png_fixed_point int_blue_y));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef PNG_gAMA_SUPPORTED
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, double *file_gamma));
|
||||
png_infop info_ptr, double *file_gamma));
|
||||
# endif
|
||||
extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_fixed_point *int_file_gamma));
|
||||
png_infop info_ptr, png_fixed_point *int_file_gamma));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_gAMA_SUPPORTED
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, double file_gamma));
|
||||
png_infop info_ptr, double file_gamma));
|
||||
# endif
|
||||
extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_fixed_point int_file_gamma));
|
||||
png_infop info_ptr, png_fixed_point int_file_gamma));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_hIST_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_16p *hist));
|
||||
png_infop info_ptr, png_uint_16p *hist));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_hIST_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_16p hist));
|
||||
png_infop info_ptr, png_uint_16p hist));
|
||||
#endif
|
||||
|
||||
extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,
|
||||
int *bit_depth, int *color_type, int *interlace_method,
|
||||
int *compression_method, int *filter_method));
|
||||
png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,
|
||||
int *bit_depth, int *color_type, int *interlace_method,
|
||||
int *compression_method, int *filter_method));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
|
||||
int color_type, int interlace_method, int compression_method,
|
||||
int filter_method));
|
||||
png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
|
||||
int color_type, int interlace_method, int compression_method,
|
||||
int filter_method));
|
||||
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
|
||||
int *unit_type));
|
||||
png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
|
||||
int *unit_type));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_oFFs_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
|
||||
int unit_type));
|
||||
png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
|
||||
int unit_type));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_pCAL_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((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_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
|
||||
int *type, int *nparams, png_charp *units, png_charpp *params));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_pCAL_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_pCAL) PNGARG((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_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,
|
||||
int type, int nparams, png_charp units, png_charpp params));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_pHYs_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
|
||||
png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_pHYs_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
|
||||
png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
|
||||
#endif
|
||||
|
||||
extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_colorp *palette, int *num_palette));
|
||||
png_infop info_ptr, png_colorp *palette, int *num_palette));
|
||||
|
||||
extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_colorp palette, int num_palette));
|
||||
png_infop info_ptr, png_colorp palette, int num_palette));
|
||||
|
||||
#ifdef PNG_sBIT_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_color_8p *sig_bit));
|
||||
png_infop info_ptr, png_color_8p *sig_bit));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_sBIT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_color_8p sig_bit));
|
||||
png_infop info_ptr, png_color_8p sig_bit));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_sRGB_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int *intent));
|
||||
png_infop info_ptr, int *intent));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_sRGB_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int intent));
|
||||
png_infop info_ptr, int intent));
|
||||
extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int intent));
|
||||
png_infop info_ptr, int intent));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_iCCP_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_charpp name, int *compression_type,
|
||||
png_charpp profile, png_uint_32 *proflen));
|
||||
/* Note to maintainer: profile should be png_bytepp */
|
||||
png_infop info_ptr, png_charpp name, int *compression_type,
|
||||
png_charpp profile, png_uint_32 *proflen));
|
||||
/* Note to maintainer: profile should be png_bytepp */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_iCCP_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_charp name, int compression_type,
|
||||
png_charp profile, png_uint_32 proflen));
|
||||
/* Note to maintainer: profile should be png_bytep */
|
||||
png_infop info_ptr, png_charp name, int compression_type,
|
||||
png_charp profile, png_uint_32 proflen));
|
||||
/* Note to maintainer: profile should be png_bytep */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_sPLT_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_sPLT_tpp entries));
|
||||
png_infop info_ptr, png_sPLT_tpp entries));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_sPLT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_sPLT_tp entries, int nentries));
|
||||
png_infop info_ptr, png_sPLT_tp entries, int nentries));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_TEXT_SUPPORTED
|
||||
/* png_get_text also returns the number of text chunks in *num_text */
|
||||
extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_textp *text_ptr, int *num_text));
|
||||
png_infop info_ptr, png_textp *text_ptr, int *num_text));
|
||||
#endif
|
||||
|
||||
/* Note while png_set_text() will accept a structure whose text,
|
||||
@ -1726,29 +1729,29 @@ extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
|
||||
|
||||
#ifdef PNG_TEXT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_textp text_ptr, int num_text));
|
||||
png_infop info_ptr, png_textp text_ptr, int num_text));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_tIME_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_timep *mod_time));
|
||||
png_infop info_ptr, png_timep *mod_time));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_tIME_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_timep mod_time));
|
||||
png_infop info_ptr, png_timep mod_time));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_tRNS_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_bytep *trans_alpha, int *num_trans,
|
||||
png_color_16p *trans_color));
|
||||
png_color_16p *trans_color));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_tRNS_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_bytep trans_alpha, int num_trans,
|
||||
png_color_16p trans_color));
|
||||
png_color_16p trans_color));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_tRNS_SUPPORTED
|
||||
@ -1757,11 +1760,11 @@ extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
|
||||
#ifdef PNG_sCAL_SUPPORTED
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int *unit, double *width, double *height));
|
||||
png_infop info_ptr, int *unit, double *width, double *height));
|
||||
# else
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
|
||||
png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
|
||||
# endif
|
||||
# endif
|
||||
#endif /* PNG_sCAL_SUPPORTED */
|
||||
@ -1769,11 +1772,11 @@ extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
|
||||
#ifdef PNG_sCAL_SUPPORTED
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int unit, double width, double height));
|
||||
png_infop info_ptr, int unit, double width, double height));
|
||||
# else
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
|
||||
png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
|
||||
# endif
|
||||
# endif
|
||||
#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
|
||||
@ -1789,17 +1792,17 @@ extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
|
||||
= 3: keep even if unsafe-to-copy
|
||||
*/
|
||||
extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
|
||||
png_ptr, int keep, png_bytep chunk_list, int num_chunks));
|
||||
png_ptr, int keep, png_bytep chunk_list, int num_chunks));
|
||||
PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
|
||||
chunk_name));
|
||||
chunk_name));
|
||||
#endif
|
||||
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
|
||||
extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
|
||||
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
|
||||
extern PNG_EXPORT(void, png_set_unknown_chunk_location)
|
||||
PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));
|
||||
PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));
|
||||
extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
|
||||
png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
|
||||
png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
|
||||
#endif
|
||||
|
||||
/* Png_free_data() will turn off the "valid" flag for anything it frees.
|
||||
@ -1807,7 +1810,7 @@ extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
|
||||
* you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK);
|
||||
*/
|
||||
extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, int mask));
|
||||
png_infop info_ptr, int mask));
|
||||
|
||||
#ifdef PNG_INFO_IMAGE_SUPPORTED
|
||||
/* The "params" pointer is currently not used and is for future expansion. */
|
||||
@ -1829,7 +1832,7 @@ extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
|
||||
|
||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||
extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
|
||||
png_ptr, png_uint_32 mng_features_permitted));
|
||||
png_ptr, png_uint_32 mng_features_permitted));
|
||||
#endif
|
||||
|
||||
/* For use in png_set_keep_unknown, added to version 1.2.6 */
|
||||
@ -1843,27 +1846,27 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
|
||||
*/
|
||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
|
||||
png_ptr, png_uint_32 strip_mode));
|
||||
png_ptr, png_uint_32 strip_mode));
|
||||
#endif
|
||||
|
||||
/* Added in libpng-1.2.6 */
|
||||
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||
extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
|
||||
png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
|
||||
png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
|
||||
extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp
|
||||
png_ptr));
|
||||
png_ptr));
|
||||
extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
|
||||
png_ptr));
|
||||
png_ptr));
|
||||
/* Added in libpng-1.4.0 */
|
||||
extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp
|
||||
png_ptr, png_uint_32 user_chunk_cache_max));
|
||||
png_ptr, png_uint_32 user_chunk_cache_max));
|
||||
extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max)
|
||||
PNGARG((png_structp png_ptr));
|
||||
PNGARG((png_structp png_ptr));
|
||||
/* Added in libpng-1.4.1 */
|
||||
extern PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp
|
||||
png_ptr, png_alloc_size_t user_chunk_cache_max));
|
||||
png_ptr, png_alloc_size_t user_chunk_cache_max));
|
||||
extern PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max)
|
||||
PNGARG((png_structp png_ptr));
|
||||
PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
@ -1893,7 +1896,7 @@ png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
|
||||
extern PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr));
|
||||
|
||||
extern PNG_EXPORT(png_bytep,png_get_io_chunk_name)
|
||||
PNGARG((png_structp png_ptr));
|
||||
PNGARG((png_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 */
|
||||
@ -1944,13 +1947,13 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name)
|
||||
|
||||
# define png_composite(composite, fg, alpha, bg) \
|
||||
(composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \
|
||||
(png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
|
||||
(png_uint_16)127) / 255)
|
||||
(png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
|
||||
(png_uint_16)127) / 255)
|
||||
|
||||
# define png_composite_16(composite, fg, alpha, bg) \
|
||||
(composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
|
||||
(png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \
|
||||
(png_uint_32)32767) / (png_uint_32)65535L)
|
||||
(png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \
|
||||
(png_uint_32)32767) / (png_uint_32)65535L)
|
||||
#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
|
||||
|
||||
#ifdef PNG_USE_READ_MACROS
|
||||
@ -1987,16 +1990,16 @@ extern PNG_EXPORT(png_uint_32,png_get_uint_31)
|
||||
|
||||
/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */
|
||||
extern PNG_EXPORT(void,png_save_uint_32)
|
||||
PNGARG((png_bytep buf, png_uint_32 i));
|
||||
PNGARG((png_bytep buf, png_uint_32 i));
|
||||
extern PNG_EXPORT(void,png_save_int_32)
|
||||
PNGARG((png_bytep buf, png_int_32 i));
|
||||
PNGARG((png_bytep buf, png_int_32 i));
|
||||
|
||||
/* Place a 16-bit number into a buffer in PNG byte order.
|
||||
* The parameter is declared unsigned int, not png_uint_16,
|
||||
* just to avoid potential problems on pre-ANSI C compilers.
|
||||
*/
|
||||
extern PNG_EXPORT(void,png_save_uint_16)
|
||||
PNGARG((png_bytep buf, unsigned int i));
|
||||
PNGARG((png_bytep buf, unsigned int i));
|
||||
/* No png_save_int_16 -- may be added if there's a real need for it. */
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
71
pngconf.h
71
pngconf.h
@ -71,13 +71,13 @@
|
||||
|
||||
#ifdef __STDC__
|
||||
# ifdef SPECIALBUILD
|
||||
# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
|
||||
are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
|
||||
# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD) \
|
||||
are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
|
||||
# endif
|
||||
|
||||
# ifdef PRIVATEBUILD
|
||||
# pragma message("PRIVATEBUILD is deprecated.\
|
||||
Use PNG_USER_PRIVATEBUILD instead.")
|
||||
Use PNG_USER_PRIVATEBUILD instead.")
|
||||
# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
|
||||
# endif
|
||||
#endif /* __STDC__ */
|
||||
@ -162,7 +162,7 @@
|
||||
#endif
|
||||
|
||||
/* Added at libpng-1.4.0beta49 for testing (this test is no longer used
|
||||
in libpng and png_calloc() is always present)
|
||||
* in libpng and png_calloc() is always present)
|
||||
*/
|
||||
#define PNG_CALLOC_SUPPORTED
|
||||
|
||||
@ -374,7 +374,6 @@
|
||||
* being called to fill in the gamma tables. Don't set this value
|
||||
* less then 8, and even that may not work (I haven't tested it).
|
||||
*/
|
||||
|
||||
#ifndef PNG_MAX_GAMMA_8
|
||||
# define PNG_MAX_GAMMA_8 11
|
||||
#endif
|
||||
@ -390,7 +389,6 @@
|
||||
* and warning message functions, so some compilers won't complain.
|
||||
* If you do not want to use const, define PNG_NO_CONST here.
|
||||
*/
|
||||
|
||||
#ifndef PNG_CONST
|
||||
# ifndef PNG_NO_CONST
|
||||
# define PNG_CONST const
|
||||
@ -499,14 +497,16 @@
|
||||
# endif
|
||||
# endif /* PNG_READ_TRANSFORMS_SUPPORTED */
|
||||
|
||||
/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */
|
||||
# if !defined(PNG_NO_PROGRESSIVE_READ) && \
|
||||
!defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
|
||||
# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
|
||||
# endif /* about interlacing capability! You'll */
|
||||
/* still have interlacing unless you change the following define: */
|
||||
# ifndef PNG_NO_PROGRESSIVE_READ
|
||||
# define PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
# endif
|
||||
/* You can define PNG_NO_PROGRESSIVE_READ if you don't do progressive reading.
|
||||
* This is not talking about interlacing capability! You'll still have
|
||||
* interlacing unless you change the following define which is required
|
||||
* for PNG-compliant decoders:
|
||||
*/
|
||||
|
||||
# define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
|
||||
# define PNG_READ_INTERLACING_SUPPORTED
|
||||
|
||||
/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */
|
||||
# if !defined(PNG_NO_SEQUENTIAL_READ) && \
|
||||
@ -517,7 +517,8 @@
|
||||
|
||||
# ifndef PNG_NO_READ_COMPOSITE_NODIV
|
||||
# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
|
||||
# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
|
||||
/* well tested on Intel, SGI */
|
||||
# define PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||
# endif
|
||||
# endif
|
||||
|
||||
@ -534,7 +535,7 @@
|
||||
|
||||
/* PNG_WRITE_TRANSFORMS_NOT_SUPPORTED is deprecated. */
|
||||
# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
|
||||
!defined(PNG_NO_WRITE_TRANSFORMS)
|
||||
!defined(PNG_NO_WRITE_TRANSFORMS)
|
||||
# define PNG_WRITE_TRANSFORMS_SUPPORTED
|
||||
# endif
|
||||
|
||||
@ -572,7 +573,7 @@
|
||||
# endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
|
||||
|
||||
# if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
|
||||
!defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
||||
!defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
||||
/* This is not required for PNG-compliant encoders, but can cause
|
||||
* trouble if left undefined
|
||||
*/
|
||||
@ -580,8 +581,8 @@
|
||||
# endif
|
||||
|
||||
# if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
|
||||
!defined(PNG_WRITE_WEIGHTED_FILTER) && \
|
||||
defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
!defined(PNG_WRITE_WEIGHTED_FILTER) && \
|
||||
defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||
# endif
|
||||
|
||||
@ -590,7 +591,7 @@
|
||||
# endif
|
||||
|
||||
# if !defined(PNG_NO_SAVE_INT_32) || defined(PNG_WRITE_oFFS_SUPPORTED) || \
|
||||
defined(PNG_WRITE_pCAL_SUPPORTED)
|
||||
defined(PNG_WRITE_pCAL_SUPPORTED)
|
||||
# ifndef PNG_SAVE_INT_32_SUPPORTED
|
||||
# define PNG_SAVE_INT_32_SUPPORTED
|
||||
# endif
|
||||
@ -700,20 +701,20 @@
|
||||
|
||||
/* These are currently experimental features, define them if you want */
|
||||
|
||||
/* Very little testing */
|
||||
/* Very little testing, not enabled by default. */
|
||||
/*
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||
# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||
# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* This is only for PowerPC big-endian and 680x0 systems */
|
||||
/* some testing */
|
||||
/* some testing, not enabled by default. */
|
||||
/*
|
||||
#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
|
||||
# define PNG_READ_BIG_ENDIAN_SUPPORTED
|
||||
# define PNG_READ_BIG_ENDIAN_SUPPORTED
|
||||
#endif
|
||||
*/
|
||||
|
||||
@ -840,7 +841,7 @@
|
||||
# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
|
||||
# endif /* optional PLTE chunk in RGB and RGBA images */
|
||||
# if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
|
||||
defined(PNG_READ_zTXt_SUPPORTED)
|
||||
defined(PNG_READ_zTXt_SUPPORTED)
|
||||
# define PNG_READ_TEXT_SUPPORTED
|
||||
# define PNG_TEXT_SUPPORTED
|
||||
# endif
|
||||
@ -984,8 +985,9 @@
|
||||
# define PNG_zTXt_SUPPORTED
|
||||
# endif
|
||||
# endif
|
||||
# if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
|
||||
defined(PNG_WRITE_zTXt_SUPPORTED)
|
||||
# if defined(PNG_WRITE_iTXt_SUPPORTED) || \
|
||||
defined(PNG_WRITE_tEXt_SUPPORTED) || \
|
||||
defined(PNG_WRITE_zTXt_SUPPORTED)
|
||||
# define PNG_WRITE_TEXT_SUPPORTED
|
||||
# ifndef PNG_TEXT_SUPPORTED
|
||||
# define PNG_TEXT_SUPPORTED
|
||||
@ -1034,7 +1036,7 @@
|
||||
|
||||
/* Need the time information for converting tIME chunks */
|
||||
#ifdef PNG_CONVERT_tIME_SUPPORTED
|
||||
/* "time.h" functions are not supported on WindowsCE */
|
||||
/* "time.h" functions are not supported on WindowsCE */
|
||||
# include <time.h>
|
||||
#endif
|
||||
|
||||
@ -1125,7 +1127,8 @@ typedef unsigned char png_byte;
|
||||
#endif
|
||||
|
||||
/* Typedef for floating-point numbers that are converted
|
||||
to fixed-point with a multiple of 100,000, e.g., int_gamma */
|
||||
* to fixed-point with a multiple of 100,000, e.g., int_gamma
|
||||
*/
|
||||
typedef png_int_32 png_fixed_point;
|
||||
|
||||
/* Add typedefs for pointers */
|
||||
@ -1212,7 +1215,7 @@ typedef char FAR * FAR * FAR * png_charppp;
|
||||
|
||||
#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
|
||||
(( defined(_Windows) || defined(_WINDOWS) || \
|
||||
defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
|
||||
defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
|
||||
|
||||
# ifndef PNGAPI
|
||||
# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
|
||||
@ -1223,7 +1226,7 @@ typedef char FAR * FAR * FAR * png_charppp;
|
||||
# endif
|
||||
|
||||
# if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
|
||||
0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
|
||||
0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
|
||||
# define PNG_IMPEXP
|
||||
# endif
|
||||
|
||||
@ -1242,8 +1245,8 @@ typedef char FAR * FAR * FAR * png_charppp;
|
||||
# define PNG_IMPEXP __export
|
||||
# else
|
||||
# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in VC++ */
|
||||
# endif /* Exists in Borland C++ for
|
||||
C++ classes (== huge) */
|
||||
# endif /* Exists in Borland C++ for
|
||||
C++ classes (== huge) */
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
248
pngpriv.h
248
pngpriv.h
@ -203,7 +203,7 @@
|
||||
* integers, "value" a variable. Added to libpng-1.2.6 JB
|
||||
*/
|
||||
#define PNG_OUT_OF_RANGE(value, ideal, delta) \
|
||||
( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
|
||||
( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
|
||||
|
||||
/* Constant strings for known chunk types. If you need to add a chunk,
|
||||
* define the name here, and add an invocation of the macro wherever it's
|
||||
@ -251,13 +251,13 @@ PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
|
||||
PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
|
||||
|
||||
PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
|
||||
malloc_fn, png_voidp mem_ptr));
|
||||
malloc_fn, png_voidp mem_ptr));
|
||||
PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
|
||||
png_free_ptr free_fn, png_voidp mem_ptr));
|
||||
png_free_ptr free_fn, png_voidp mem_ptr));
|
||||
|
||||
/* Free any memory that info_ptr points to and reset struct. */
|
||||
PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
|
||||
/* Function to allocate memory for zlib. PNGAPI is disallowed. */
|
||||
PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
|
||||
@ -269,15 +269,15 @@ PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
|
||||
* but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */
|
||||
|
||||
PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
|
||||
png_bytep data, png_size_t length));
|
||||
png_bytep data, png_size_t length));
|
||||
|
||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
|
||||
png_bytep buffer, png_size_t length));
|
||||
png_bytep buffer, png_size_t length));
|
||||
#endif
|
||||
|
||||
PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,
|
||||
png_bytep data, png_size_t length));
|
||||
png_bytep data, png_size_t length));
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
# ifdef PNG_STDIO_SUPPORTED
|
||||
@ -290,18 +290,18 @@ PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
|
||||
|
||||
/* Write the "data" buffer to whatever output you are using */
|
||||
PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,
|
||||
png_size_t length));
|
||||
png_size_t length));
|
||||
|
||||
/* Read the chunk header (length + type name) */
|
||||
PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
|
||||
|
||||
/* Read data from whatever input you are using into the "data" buffer */
|
||||
PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
|
||||
png_size_t length));
|
||||
png_size_t length));
|
||||
|
||||
/* Read bytes into buf, and update png_ptr->crc */
|
||||
PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
|
||||
png_size_t length));
|
||||
png_size_t length));
|
||||
|
||||
/* Decompress data in a chunk that uses compression */
|
||||
#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \
|
||||
@ -309,8 +309,8 @@ PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
|
||||
PNG_EXTERN png_size_t png_measure_decompressed_chunk PNGARG((png_structp
|
||||
png_ptr, int comp_type, png_size_t chunklength, png_size_t prefix_length));
|
||||
PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,
|
||||
int comp_type, png_size_t chunklength, png_size_t prefix_length,
|
||||
png_size_t *data_length));
|
||||
int comp_type, png_size_t chunklength, png_size_t prefix_length,
|
||||
png_size_t *data_length));
|
||||
#endif
|
||||
|
||||
/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
|
||||
@ -324,7 +324,7 @@ PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
|
||||
* since this is the maximum buffer size we can specify.
|
||||
*/
|
||||
PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
|
||||
png_size_t length));
|
||||
png_size_t length));
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
|
||||
@ -336,15 +336,15 @@ PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
|
||||
* information.
|
||||
*/
|
||||
PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
|
||||
png_uint_32 height,
|
||||
int bit_depth, int color_type, int compression_method, int filter_method,
|
||||
int interlace_method));
|
||||
png_uint_32 height,
|
||||
int bit_depth, int color_type, int compression_method, int filter_method,
|
||||
int interlace_method));
|
||||
|
||||
PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,
|
||||
png_uint_32 num_pal));
|
||||
png_uint_32 num_pal));
|
||||
|
||||
PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
|
||||
png_size_t length));
|
||||
png_size_t length));
|
||||
|
||||
PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
|
||||
|
||||
@ -360,112 +360,112 @@ PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr,
|
||||
|
||||
#ifdef PNG_WRITE_sBIT_SUPPORTED
|
||||
PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
|
||||
int color_type));
|
||||
int color_type));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_cHRM_SUPPORTED
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_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));
|
||||
double white_x, double white_y,
|
||||
double red_x, double red_y, double green_x, double green_y,
|
||||
double blue_x, double blue_y));
|
||||
# endif
|
||||
PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_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,
|
||||
png_fixed_point int_blue_y));
|
||||
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,
|
||||
png_fixed_point int_blue_y));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_sRGB_SUPPORTED
|
||||
PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
|
||||
int intent));
|
||||
int intent));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_iCCP_SUPPORTED
|
||||
PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
|
||||
png_charp name, int compression_type,
|
||||
png_charp profile, int proflen));
|
||||
png_charp name, int compression_type,
|
||||
png_charp profile, int proflen));
|
||||
/* Note to maintainer: profile should be png_bytep */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_sPLT_SUPPORTED
|
||||
PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
|
||||
png_sPLT_tp palette));
|
||||
png_sPLT_tp palette));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_tRNS_SUPPORTED
|
||||
PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
|
||||
png_color_16p values, int number, int color_type));
|
||||
png_color_16p values, int number, int color_type));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_bKGD_SUPPORTED
|
||||
PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
|
||||
png_color_16p values, int color_type));
|
||||
png_color_16p values, int color_type));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_hIST_SUPPORTED
|
||||
PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
|
||||
int num_hist));
|
||||
int num_hist));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
|
||||
defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
|
||||
PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
|
||||
png_charp key, png_charpp new_key));
|
||||
png_charp key, png_charpp new_key));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_tEXt_SUPPORTED
|
||||
PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
|
||||
png_charp text, png_size_t text_len));
|
||||
png_charp text, png_size_t text_len));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_zTXt_SUPPORTED
|
||||
PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
|
||||
png_charp text, png_size_t text_len, int compression));
|
||||
png_charp text, png_size_t text_len, int compression));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_iTXt_SUPPORTED
|
||||
PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
|
||||
int compression, png_charp key, png_charp lang, png_charp lang_key,
|
||||
png_charp text));
|
||||
int compression, png_charp key, png_charp lang, png_charp lang_key,
|
||||
png_charp text));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */
|
||||
PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_textp text_ptr, int num_text));
|
||||
png_infop info_ptr, png_textp text_ptr, int num_text));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_oFFs_SUPPORTED
|
||||
PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
|
||||
png_int_32 x_offset, png_int_32 y_offset, int unit_type));
|
||||
png_int_32 x_offset, png_int_32 y_offset, int unit_type));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_pCAL_SUPPORTED
|
||||
PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
|
||||
png_int_32 X0, png_int_32 X1, int type, int nparams,
|
||||
png_charp units, png_charpp params));
|
||||
png_int_32 X0, png_int_32 X1, int type, int nparams,
|
||||
png_charp units, png_charpp params));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_pHYs_SUPPORTED
|
||||
PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
|
||||
png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
|
||||
int unit_type));
|
||||
png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
|
||||
int unit_type));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_tIME_SUPPORTED
|
||||
PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
|
||||
png_timep mod_time));
|
||||
png_timep mod_time));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_sCAL_SUPPORTED
|
||||
# if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
|
||||
PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
|
||||
int unit, double width, double height));
|
||||
int unit, double width, double height));
|
||||
# else
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
|
||||
int unit, png_charp width, png_charp height));
|
||||
int unit, png_charp width, png_charp height));
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
@ -478,18 +478,18 @@ PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
|
||||
|
||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||
PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
|
||||
png_byte bit_depth));
|
||||
png_byte bit_depth));
|
||||
#endif
|
||||
|
||||
/* Combine a row of data, dealing with alpha, etc. if requested */
|
||||
PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
|
||||
int mask));
|
||||
int mask));
|
||||
|
||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||
/* Expand an interlaced row */
|
||||
/* OLD pre-1.0.9 interface:
|
||||
PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
|
||||
png_bytep row, int pass, png_uint_32 transformations));
|
||||
png_bytep row, int pass, png_uint_32 transformations));
|
||||
*/
|
||||
PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
@ -499,20 +499,20 @@ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
|
||||
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
||||
/* Grab pixels out of a row for an interlaced pass */
|
||||
PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
|
||||
png_bytep row, int pass));
|
||||
png_bytep row, int pass));
|
||||
#endif
|
||||
|
||||
/* Unfilter a row */
|
||||
PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
|
||||
png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
|
||||
png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
|
||||
|
||||
/* Choose the best filter to use and filter the row data */
|
||||
PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
|
||||
png_row_infop row_info));
|
||||
png_row_infop row_info));
|
||||
|
||||
/* Write out the filtered row. */
|
||||
PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
|
||||
png_bytep filtered_row));
|
||||
png_bytep filtered_row));
|
||||
/* Finish a row while reading, dealing with interlacing passes, etc. */
|
||||
PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
|
||||
|
||||
@ -520,38 +520,38 @@ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
|
||||
PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
|
||||
/* Optional call to update the users info structure */
|
||||
PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
|
||||
/* These are the functions that do the transformations */
|
||||
#ifdef PNG_READ_FILLER_SUPPORTED
|
||||
PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
|
||||
png_bytep row, png_uint_32 filler, png_uint_32 flags));
|
||||
png_bytep row, png_uint_32 filler, png_uint_32 flags));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
|
||||
PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
|
||||
png_bytep row));
|
||||
png_bytep row));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
||||
PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
|
||||
png_bytep row));
|
||||
png_bytep row));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
|
||||
PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
|
||||
png_bytep row));
|
||||
png_bytep row));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||
PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
|
||||
png_bytep row));
|
||||
png_bytep row));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
|
||||
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
|
||||
PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
|
||||
png_bytep row, png_uint_32 flags));
|
||||
png_bytep row, png_uint_32 flags));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
|
||||
@ -565,12 +565,12 @@ PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
|
||||
|
||||
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||
PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
|
||||
row_info, png_bytep row));
|
||||
row_info, png_bytep row));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||
PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
|
||||
png_bytep row));
|
||||
png_bytep row));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_PACK_SUPPORTED
|
||||
@ -579,7 +579,7 @@ PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
|
||||
|
||||
#ifdef PNG_READ_SHIFT_SUPPORTED
|
||||
PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
|
||||
png_color_8p sig_bits));
|
||||
png_color_8p sig_bits));
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
|
||||
@ -592,11 +592,11 @@ PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
|
||||
|
||||
#ifdef PNG_READ_DITHER_SUPPORTED
|
||||
PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,
|
||||
png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
|
||||
png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
|
||||
|
||||
# ifdef PNG_CORRECT_PALETTE_SUPPORTED
|
||||
PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
|
||||
png_colorp palette, int num_palette));
|
||||
png_colorp palette, int num_palette));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -611,34 +611,34 @@ PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
|
||||
|
||||
#ifdef PNG_WRITE_SHIFT_SUPPORTED
|
||||
PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
|
||||
png_color_8p bit_depth));
|
||||
png_color_8p bit_depth));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_BACKGROUND_SUPPORTED
|
||||
# ifdef PNG_READ_GAMMA_SUPPORTED
|
||||
PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
|
||||
png_color_16p trans_color, png_color_16p background,
|
||||
png_color_16p background_1,
|
||||
png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
|
||||
png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
|
||||
png_uint_16pp gamma_16_to_1, int gamma_shift));
|
||||
png_color_16p trans_color, png_color_16p background,
|
||||
png_color_16p background_1,
|
||||
png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
|
||||
png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
|
||||
png_uint_16pp gamma_16_to_1, int gamma_shift));
|
||||
# else
|
||||
PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
|
||||
png_color_16p trans_color, png_color_16p background));
|
||||
png_color_16p trans_color, png_color_16p background));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||
PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
|
||||
png_bytep gamma_table, png_uint_16pp gamma_16_table,
|
||||
int gamma_shift));
|
||||
png_bytep gamma_table, png_uint_16pp gamma_16_table,
|
||||
int gamma_shift));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_EXPAND_SUPPORTED
|
||||
PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
|
||||
png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
|
||||
png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
|
||||
PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
|
||||
png_bytep row, png_color_16p trans_value));
|
||||
png_bytep row, png_color_16p trans_value));
|
||||
#endif
|
||||
|
||||
/* The following decodes the appropriate chunks, and does error correction,
|
||||
@ -647,102 +647,102 @@ PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
|
||||
|
||||
/* Decode the IHDR chunk */
|
||||
PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
|
||||
#ifdef PNG_READ_bKGD_SUPPORTED
|
||||
PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_cHRM_SUPPORTED
|
||||
PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_gAMA_SUPPORTED
|
||||
PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_hIST_SUPPORTED
|
||||
PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_iCCP_SUPPORTED
|
||||
extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif /* PNG_READ_iCCP_SUPPORTED */
|
||||
|
||||
#ifdef PNG_READ_iTXt_SUPPORTED
|
||||
PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_oFFs_SUPPORTED
|
||||
PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_pCAL_SUPPORTED
|
||||
PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_pHYs_SUPPORTED
|
||||
PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_sBIT_SUPPORTED
|
||||
PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_sCAL_SUPPORTED
|
||||
PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_sPLT_SUPPORTED
|
||||
extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif /* PNG_READ_sPLT_SUPPORTED */
|
||||
|
||||
#ifdef PNG_READ_sRGB_SUPPORTED
|
||||
PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_tEXt_SUPPORTED
|
||||
PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_tIME_SUPPORTED
|
||||
PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_tRNS_SUPPORTED
|
||||
PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_zTXt_SUPPORTED
|
||||
PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
#endif
|
||||
|
||||
PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
|
||||
PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
|
||||
png_bytep chunk_name));
|
||||
png_bytep chunk_name));
|
||||
|
||||
/* Handle the transformations for reading and writing */
|
||||
PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
|
||||
@ -752,19 +752,19 @@ PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
|
||||
|
||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
|
||||
PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
|
||||
png_uint_32 length));
|
||||
png_uint_32 length));
|
||||
PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
|
||||
PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
|
||||
PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
|
||||
png_bytep buffer, png_size_t buffer_length));
|
||||
png_bytep buffer, png_size_t buffer_length));
|
||||
PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
|
||||
PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
|
||||
png_bytep buffer, png_size_t buffer_length));
|
||||
png_bytep buffer, png_size_t buffer_length));
|
||||
PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
|
||||
PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
@ -774,71 +774,71 @@ PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
|
||||
PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
|
||||
# ifdef PNG_READ_tEXt_SUPPORTED
|
||||
PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
# endif
|
||||
# ifdef PNG_READ_zTXt_SUPPORTED
|
||||
PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
# endif
|
||||
# ifdef PNG_READ_iTXt_SUPPORTED
|
||||
PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
png_infop info_ptr, png_uint_32 length));
|
||||
PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
|
||||
png_infop info_ptr));
|
||||
png_infop info_ptr));
|
||||
# endif
|
||||
|
||||
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
|
||||
|
||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||
PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
|
||||
png_bytep row));
|
||||
png_bytep row));
|
||||
PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
|
||||
png_bytep row));
|
||||
png_bytep row));
|
||||
#endif
|
||||
|
||||
/* Added at libpng version 1.4.0 */
|
||||
#ifdef PNG_cHRM_SUPPORTED
|
||||
PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_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,
|
||||
png_fixed_point int_blue_y));
|
||||
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,
|
||||
png_fixed_point int_blue_y));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_cHRM_SUPPORTED
|
||||
# ifdef PNG_CHECK_cHRM_SUPPORTED
|
||||
/* Added at libpng version 1.2.34 and 1.4.0 */
|
||||
PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2,
|
||||
unsigned long *hi_product, unsigned long *lo_product));
|
||||
unsigned long *hi_product, unsigned long *lo_product));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Added at libpng version 1.4.0 */
|
||||
PNG_EXTERN void png_check_IHDR PNGARG((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_uint_32 width, png_uint_32 height, int bit_depth,
|
||||
int color_type, int interlace_type, int compression_type,
|
||||
int filter_type));
|
||||
|
||||
/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
|
||||
extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
|
||||
png_infop end_info_ptr));
|
||||
png_infop end_info_ptr));
|
||||
|
||||
/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
|
||||
extern void png_write_destroy PNGARG((png_structp png_ptr));
|
||||
|
||||
#ifdef USE_FAR_KEYWORD /* memory model conversion function */
|
||||
extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
|
||||
int check));
|
||||
int check));
|
||||
#endif /* USE_FAR_KEYWORD */
|
||||
|
||||
/* Define PNG_DEBUG at compile time for debugging information. Higher
|
||||
|
Loading…
x
Reference in New Issue
Block a user