pngcrush  1.8.13
About: Pngcrush is an optimizer for PNG (Portable Network Graphics) files.
  Fossies Dox: pngcrush-1.8.13.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

pngpriv.h File Reference
#include <stdlib.h>
#include <string.h>
#include "pnglibconf.h"
#include "png.h"
#include <float.h>
#include <math.h>
#include "pngstruct.h"
#include "pnginfo.h"
#include "pngdebug.h"
Include dependency graph for pngpriv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  png_control
 

Macros

#define _POSIX_SOURCE   1 /* Just the POSIX 1003.1 and C89 APIs */
 
#define PNGLIB_BUILD   /*libpng is being built, not used*/
 
#define PNG_ARM_NEON_OPT   0
 
#define PNG_MIPS_MSA_OPT   0
 
#define PNG_POWERPC_VSX_OPT   0
 
#define PNG_IMPEXP
 
#define PNG_DEPRECATED
 
#define PNG_PRIVATE
 
#define PNG_INTERNAL_DATA(type, name, array)   PNG_LINKAGE_DATA type name array
 
#define PNG_INTERNAL_FUNCTION(type, name, args, attributes)   PNG_LINKAGE_FUNCTION PNG_FUNCTION(type, name, args, PNG_EMPTY attributes)
 
#define PNG_INTERNAL_CALLBACK(type, name, args, attributes)
 
#define PNG_DLL_EXPORT
 
#define PNG_RELEASE_BUILD   (PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC)
 
#define PNG_UNUSED(param)   (void)param;
 
#define PNG_WARNING_PARAMETERS(p)   png_warning_parameters p;
 
#define PNGFAPI   PNGAPI
 
#define png_voidcast(type, value)   (value)
 
#define png_constcast(type, value)   ((type)(png_ptruint)(const void*)(value))
 
#define png_aligncast(type, value)   ((void*)(value))
 
#define png_aligncastconst(type, value)   ((const void*)(value))
 
#define PNG_ABORT()   abort()
 
#define PNG_ALIGN_NONE   0 /* do not use data alignment */
 
#define PNG_ALIGN_ALWAYS   1 /* assume unaligned accesses are OK */
 
#define PNG_ALIGN_OFFSET   -1 /* prevent the use of this */
 
#define PNG_ALIGN_SIZE   3 /* use sizeof to determine alignment */
 
#define PNG_ALIGN_TYPE   PNG_ALIGN_SIZE
 
#define png_alignof(type)   (sizeof (type))
 
#define png_isaligned(ptr, type)
 
#define PNG_HAVE_IDAT   0x04U
 
#define PNG_HAVE_IEND   0x10U
 
#define PNG_HAVE_CHUNK_HEADER   0x100U
 
#define PNG_WROTE_tIME   0x200U
 
#define PNG_WROTE_INFO_BEFORE_PLTE   0x400U
 
#define PNG_BACKGROUND_IS_GRAY   0x800U
 
#define PNG_HAVE_PNG_SIGNATURE   0x1000U
 
#define PNG_HAVE_CHUNK_AFTER_IDAT   0x2000U /* Have another chunk after IDAT */
 
#define PNG_IS_READ_STRUCT   0x8000U /* Else is a write struct */
 
#define PNG_BGR   0x0001U
 
#define PNG_INTERLACE   0x0002U
 
#define PNG_PACK   0x0004U
 
#define PNG_SHIFT   0x0008U
 
#define PNG_SWAP_BYTES   0x0010U
 
#define PNG_INVERT_MONO   0x0020U
 
#define PNG_QUANTIZE   0x0040U
 
#define PNG_COMPOSE   0x0080U /* Was PNG_BACKGROUND */
 
#define PNG_BACKGROUND_EXPAND   0x0100U
 
#define PNG_EXPAND_16   0x0200U /* Added to libpng 1.5.2 */
 
#define PNG_16_TO_8   0x0400U /* Becomes 'chop' in 1.5.4 */
 
#define PNG_RGBA   0x0800U
 
#define PNG_EXPAND   0x1000U
 
#define PNG_GAMMA   0x2000U
 
#define PNG_GRAY_TO_RGB   0x4000U
 
#define PNG_FILLER   0x8000U
 
#define PNG_PACKSWAP   0x10000U
 
#define PNG_SWAP_ALPHA   0x20000U
 
#define PNG_STRIP_ALPHA   0x40000U
 
#define PNG_INVERT_ALPHA   0x80000U
 
#define PNG_USER_TRANSFORM   0x100000U
 
#define PNG_RGB_TO_GRAY_ERR   0x200000U
 
#define PNG_RGB_TO_GRAY_WARN   0x400000U
 
#define PNG_RGB_TO_GRAY   0x600000U /* two bits, RGB_TO_GRAY_ERR|WARN */
 
#define PNG_ENCODE_ALPHA   0x800000U /* Added to libpng-1.5.4 */
 
#define PNG_ADD_ALPHA   0x1000000U /* Added to libpng-1.2.7 */
 
#define PNG_EXPAND_tRNS   0x2000000U /* Added to libpng-1.2.9 */
 
#define PNG_SCALE_16_TO_8   0x4000000U /* Added to libpng-1.5.4 */
 
#define PNG_STRUCT_PNG   0x0001U
 
#define PNG_STRUCT_INFO   0x0002U
 
#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY   0x0001U
 
#define PNG_FLAG_ZSTREAM_INITIALIZED   0x0002U /* Added to libpng-1.6.0 */
 
#define PNG_FLAG_ZSTREAM_ENDED   0x0008U /* Added to libpng-1.6.0 */
 
#define PNG_FLAG_ROW_INIT   0x0040U
 
#define PNG_FLAG_FILLER_AFTER   0x0080U
 
#define PNG_FLAG_CRC_ANCILLARY_USE   0x0100U
 
#define PNG_FLAG_CRC_ANCILLARY_NOWARN   0x0200U
 
#define PNG_FLAG_CRC_CRITICAL_USE   0x0400U
 
#define PNG_FLAG_CRC_CRITICAL_IGNORE   0x0800U
 
#define PNG_FLAG_ASSUME_sRGB   0x1000U /* Added to libpng-1.5.4 */
 
#define PNG_FLAG_OPTIMIZE_ALPHA   0x2000U /* Added to libpng-1.5.4 */
 
#define PNG_FLAG_DETECT_UNINITIALIZED   0x4000U /* Added to libpng-1.5.4 */
 
#define PNG_FLAG_LIBRARY_MISMATCH   0x20000U
 
#define PNG_FLAG_STRIP_ERROR_NUMBERS   0x40000U
 
#define PNG_FLAG_STRIP_ERROR_TEXT   0x80000U
 
#define PNG_FLAG_BENIGN_ERRORS_WARN   0x100000U /* Added to libpng-1.4.0 */
 
#define PNG_FLAG_APP_WARNINGS_WARN   0x200000U /* Added to libpng-1.6.0 */
 
#define PNG_FLAG_APP_ERRORS_WARN   0x400000U /* Added to libpng-1.6.0 */
 
#define PNG_FLAG_CRC_ANCILLARY_MASK
 
#define PNG_FLAG_CRC_CRITICAL_MASK
 
#define PNG_FLAG_CRC_MASK
 
#define PNG_COLOR_DIST(c1, c2)
 
#define PNG_DIV65535(v24)   (((v24) + 32895) >> 16)
 
#define PNG_DIV257(v16)   PNG_DIV65535((png_uint_32)(v16) * 255)
 
#define PNG_ROWBYTES(pixel_bits, width)
 
#define PNG_TRAILBITS(pixel_bits, width)   (((pixel_bits) * ((width) % (png_uint_32)8)) % 8)
 
#define PNG_PADBITS(pixel_bits, width)   ((8 - PNG_TRAILBITS(pixel_bits, width)) % 8)
 
#define PNG_OUT_OF_RANGE(value, ideal, delta)   ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
 
#define png_float(png_ptr, fixed, s)   (.00001 * (fixed))
 
#define PNG_32b(b, s)   ((png_uint_32)(b) << (s))
 
#define PNG_U32(b1, b2, b3, b4)   (PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0))
 
#define png_IDAT   PNG_U32( 73, 68, 65, 84)
 
#define png_IEND   PNG_U32( 73, 69, 78, 68)
 
#define png_IHDR   PNG_U32( 73, 72, 68, 82)
 
#define png_PLTE   PNG_U32( 80, 76, 84, 69)
 
#define png_bKGD   PNG_U32( 98, 75, 71, 68)
 
#define png_cHRM   PNG_U32( 99, 72, 82, 77)
 
#define png_eXIf   PNG_U32(101, 88, 73, 102) /* registered July 2017 */
 
#define png_fRAc   PNG_U32(102, 82, 65, 99) /* registered, not defined */
 
#define png_gAMA   PNG_U32(103, 65, 77, 65)
 
#define png_gIFg   PNG_U32(103, 73, 70, 103)
 
#define png_gIFt   PNG_U32(103, 73, 70, 116) /* deprecated */
 
#define png_gIFx   PNG_U32(103, 73, 70, 120)
 
#define png_hIST   PNG_U32(104, 73, 83, 84)
 
#define png_iCCP   PNG_U32(105, 67, 67, 80)
 
#define png_iTXt   PNG_U32(105, 84, 88, 116)
 
#define png_oFFs   PNG_U32(111, 70, 70, 115)
 
#define png_pCAL   PNG_U32(112, 67, 65, 76)
 
#define png_pHYs   PNG_U32(112, 72, 89, 115)
 
#define png_sBIT   PNG_U32(115, 66, 73, 84)
 
#define png_sCAL   PNG_U32(115, 67, 65, 76)
 
#define png_sPLT   PNG_U32(115, 80, 76, 84)
 
#define png_sRGB   PNG_U32(115, 82, 71, 66)
 
#define png_sTER   PNG_U32(115, 84, 69, 82)
 
#define png_tEXt   PNG_U32(116, 69, 88, 116)
 
#define png_tIME   PNG_U32(116, 73, 77, 69)
 
#define png_tRNS   PNG_U32(116, 82, 78, 83)
 
#define png_zTXt   PNG_U32(122, 84, 88, 116)
 
#define PNG_CHUNK_FROM_STRING(s)   PNG_U32(0xff & (s)[0], 0xff & (s)[1], 0xff & (s)[2], 0xff & (s)[3])
 
#define PNG_STRING_FROM_CHUNK(s, c)
 
#define PNG_CSTRING_FROM_CHUNK(s, c)   (void)(PNG_STRING_FROM_CHUNK(s,c), ((char*)(s))[4] = 0)
 
#define PNG_CHUNK_ANCILLARY(c)   (1 & ((c) >> 29))
 
#define PNG_CHUNK_CRITICAL(c)   (!PNG_CHUNK_ANCILLARY(c))
 
#define PNG_CHUNK_PRIVATE(c)   (1 & ((c) >> 21))
 
#define PNG_CHUNK_RESERVED(c)   (1 & ((c) >> 13))
 
#define PNG_CHUNK_SAFE_TO_COPY(c)   (1 & ((c) >> 5))
 
#define PNG_GAMMA_MAC_OLD   151724 /* Assume '1.8' is really 2.2/1.45! */
 
#define PNG_GAMMA_MAC_INVERSE   65909
 
#define PNG_GAMMA_sRGB_INVERSE   45455
 
#define PNG_sRGB_FROM_LINEAR(linear)
 
#define PNG_UNEXPECTED_ZLIB_RETURN   (-7)
 
#define PNG_USE_COMPILE_TIME_MASKS   1
 
#define PNG_INFLATE(pp, flush)   png_zlib_inflate(pp, flush)
 
#define PNG_FORMAT_NUMBER(buffer, format, number)   png_format_number(buffer, buffer + (sizeof buffer), format, number)
 
#define PNG_NUMBER_BUFFER_SIZE   24
 
#define PNG_NUMBER_FORMAT_u   1 /* chose unsigned API! */
 
#define PNG_NUMBER_FORMAT_02u   2
 
#define PNG_NUMBER_FORMAT_d   1 /* chose signed API! */
 
#define PNG_NUMBER_FORMAT_02d   2
 
#define PNG_NUMBER_FORMAT_x   3
 
#define PNG_NUMBER_FORMAT_02x   4
 
#define PNG_NUMBER_FORMAT_fixed   5 /* choose the signed API */
 
#define PNG_WARNING_PARAMETER_SIZE   32
 
#define PNG_WARNING_PARAMETER_COUNT   8 /* Maximum 9; see pngerror.c */
 
#define PNG_CHUNK_WARNING   0 /* never an error */
 
#define PNG_CHUNK_WRITE_ERROR   1 /* an error only on write */
 
#define PNG_CHUNK_ERROR   2 /* always an error */
 
#define PNG_sCAL_MAX_DIGITS   (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/)
 
#define PNG_FP_INTEGER   0 /* before or in integer */
 
#define PNG_FP_FRACTION   1 /* before or in fraction */
 
#define PNG_FP_EXPONENT   2 /* before or in exponent */
 
#define PNG_FP_STATE   3 /* mask for the above */
 
#define PNG_FP_SAW_SIGN   4 /* Saw +/- in current state */
 
#define PNG_FP_SAW_DIGIT   8 /* Saw a digit in current state */
 
#define PNG_FP_SAW_DOT   16 /* Saw a dot in current state */
 
#define PNG_FP_SAW_E   32 /* Saw an E (or e) in current state */
 
#define PNG_FP_SAW_ANY   60 /* Saw any of the above 4 */
 
#define PNG_FP_WAS_VALID   64 /* Preceding substring is a valid fp number */
 
#define PNG_FP_NEGATIVE   128 /* A negative number, including "-0" */
 
#define PNG_FP_NONZERO   256 /* A non-zero value */
 
#define PNG_FP_STICKY   448 /* The above three flags */
 
#define PNG_FP_INVALID   512 /* Available for callers as a distinct value */
 
#define PNG_FP_MAYBE   0 /* The number may be valid in the future */
 
#define PNG_FP_OK   1 /* The number is valid */
 
#define PNG_FP_NZ_MASK   (PNG_FP_SAW_DIGIT | PNG_FP_NEGATIVE | PNG_FP_NONZERO)
 
#define PNG_FP_Z_MASK   (PNG_FP_SAW_DIGIT | PNG_FP_NONZERO)
 
#define PNG_FP_IS_ZERO(state)   (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT)
 
#define PNG_FP_IS_POSITIVE(state)   (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK)
 
#define PNG_FP_IS_NEGATIVE(state)   (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK)
 
#define png_control_jmp_buf(pc)   ((pc)->error_buf)
 

Typedefs

typedef unsigned long png_ptruint
 
typedef char png_warning_parameters[8][32]
 
typedef struct png_control png_control
 

Functions

void png_zstream_error (png_structrp png_ptr, int ret)
 
void png_free_buffer_list (png_structrp png_ptr, png_compression_bufferp *list)
 
png_fixed_point png_fixed (png_const_structrp png_ptr, double fp, png_const_charp text)
 
int png_user_version_check (png_structrp png_ptr, png_const_charp user_png_ver)
 
png_voidp png_malloc_base (png_const_structrp png_ptr, png_alloc_size_t size)
 
png_voidp png_malloc_array (png_const_structrp png_ptr, int nelements, size_t element_size)
 
png_voidp png_realloc_array (png_const_structrp png_ptr, png_const_voidp array, int old_elements, int add_elements, size_t element_size)
 
png_structp png_create_png_struct (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)
 
void png_destroy_png_struct (png_structrp png_ptr)
 
void png_free_jmpbuf (png_structrp png_ptr)
 
voidpf png_zalloc (voidpf png_ptr, uInt items, uInt size)
 
void png_zfree (voidpf png_ptr, voidpf ptr)
 
void png_default_read_data (png_structp png_ptr, png_bytep data, png_size_t length)
 
void png_push_fill_buffer (png_structp png_ptr, png_bytep buffer, png_size_t length)
 
void png_default_write_data (png_structp png_ptr, png_bytep data, png_size_t length)
 
void png_default_flush (png_structp png_ptr)
 
void png_reset_crc (png_structrp png_ptr)
 
void png_write_data (png_structrp png_ptr, png_const_bytep data, png_size_t length)
 
void png_read_sig (png_structrp png_ptr, png_inforp info_ptr)
 
png_uint_32 png_read_chunk_header (png_structrp png_ptr)
 
void png_read_data (png_structrp png_ptr, png_bytep data, png_size_t length)
 
void png_crc_read (png_structrp png_ptr, png_bytep buf, png_uint_32 length)
 
int png_crc_finish (png_structrp png_ptr, png_uint_32 skip)
 
int png_crc_error (png_structrp png_ptr)
 
void png_calculate_crc (png_structrp png_ptr, png_const_bytep ptr, png_size_t length)
 
void png_flush (png_structrp png_ptr)
 
void png_write_IHDR (png_structrp 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)
 
void png_write_PLTE (png_structrp png_ptr, png_const_colorp palette, png_uint_32 num_pal)
 
void png_compress_IDAT (png_structrp png_ptr, png_const_bytep row_data, png_alloc_size_t row_data_length, int flush)
 
void png_write_IEND (png_structrp png_ptr)
 
void png_write_gAMA_fixed (png_structrp png_ptr, png_fixed_point file_gamma)
 
void png_write_sBIT (png_structrp png_ptr, png_const_color_8p sbit, int color_type)
 
void png_write_cHRM_fixed (png_structrp png_ptr, const png_xy *xy)
 
void png_write_sRGB (png_structrp png_ptr, int intent)
 
void png_write_eXIf (png_structrp png_ptr, png_bytep exif, int num_exif)
 
void png_write_iCCP (png_structrp png_ptr, png_const_charp name, png_const_bytep profile)
 
void png_write_sPLT (png_structrp png_ptr, png_const_sPLT_tp palette)
 
void png_write_tRNS (png_structrp png_ptr, png_const_bytep trans, png_const_color_16p values, int number, int color_type)
 
void png_write_bKGD (png_structrp png_ptr, png_const_color_16p values, int color_type)
 
void png_write_hIST (png_structrp png_ptr, png_const_uint_16p hist, int num_hist)
 
void png_write_tEXt (png_structrp png_ptr, png_const_charp key, png_const_charp text, png_size_t text_len)
 
void png_write_zTXt (png_structrp png_ptr, png_const_charp key, png_const_charp text, int compression)
 
void png_write_iTXt (png_structrp png_ptr, int compression, png_const_charp key, png_const_charp lang, png_const_charp lang_key, png_const_charp text)
 
int png_set_text_2 (png_const_structrp png_ptr, png_inforp info_ptr, png_const_textp text_ptr, int num_text)
 
void png_write_oFFs (png_structrp png_ptr, png_int_32 x_offset, png_int_32 y_offset, int unit_type)
 
void png_write_pCAL (png_structrp png_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_const_charp units, png_charpp params)
 
void png_write_pHYs (png_structrp png_ptr, png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, int unit_type)
 
void png_write_tIME (png_structrp png_ptr, png_const_timep mod_time)
 
void png_write_sCAL_s (png_structrp png_ptr, int unit, png_const_charp width, png_const_charp height)
 
void png_write_finish_row (png_structrp png_ptr)
 
void png_write_start_row (png_structrp png_ptr)
 
void png_combine_row (png_const_structrp png_ptr, png_bytep row, int display)
 
void png_do_read_interlace (png_row_infop row_info, png_bytep row, int pass, png_uint_32 transformations)
 
void png_do_write_interlace (png_row_infop row_info, png_bytep row, int pass)
 
void png_read_filter_row (png_structrp pp, png_row_infop row_info, png_bytep row, png_const_bytep prev_row, int filter)
 
void png_write_find_filter (png_structrp png_ptr, png_row_infop row_info)
 
void png_read_IDAT_data (png_structrp png_ptr, png_bytep output, png_alloc_size_t avail_out)
 
void png_read_finish_IDAT (png_structrp png_ptr)
 
void png_read_finish_row (png_structrp png_ptr)
 
void png_read_start_row (png_structrp png_ptr)
 
int png_zlib_inflate (png_structrp png_ptr, int flush)
 
void png_read_transform_info (png_structrp png_ptr, png_inforp info_ptr)
 
void png_do_strip_channel (png_row_infop row_info, png_bytep row, int at_start)
 
void png_do_swap (png_row_infop row_info, png_bytep row)
 
void png_do_packswap (png_row_infop row_info, png_bytep row)
 
void png_do_invert (png_row_infop row_info, png_bytep row)
 
void png_do_bgr (png_row_infop row_info, png_bytep row)
 
void png_handle_IHDR (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_PLTE (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_IEND (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_bKGD (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_cHRM (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_eXIf (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_gAMA (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_hIST (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_iCCP (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_iTXt (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_oFFs (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_pCAL (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_pHYs (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_sBIT (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_sCAL (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_sPLT (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_sRGB (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_tEXt (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_tIME (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_tRNS (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_handle_zTXt (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_check_chunk_name (png_const_structrp png_ptr, const png_uint_32 chunk_name)
 
void png_check_chunk_length (png_const_structrp png_ptr, const png_uint_32 chunk_length)
 
void png_handle_unknown (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length, int keep)
 
int png_chunk_unknown_handling (png_const_structrp png_ptr, png_uint_32 chunk_name)
 
void png_do_read_transformations (png_structrp png_ptr, png_row_infop row_info)
 
void png_do_write_transformations (png_structrp png_ptr, png_row_infop row_info)
 
void png_init_read_transformations (png_structrp png_ptr)
 
void png_push_read_chunk (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_read_sig (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_check_crc (png_structrp png_ptr)
 
void png_push_save_buffer (png_structrp png_ptr)
 
void png_push_restore_buffer (png_structrp png_ptr, png_bytep buffer, png_size_t buffer_length)
 
void png_push_read_IDAT (png_structrp png_ptr)
 
void png_process_IDAT_data (png_structrp png_ptr, png_bytep buffer, png_size_t buffer_length)
 
void png_push_process_row (png_structrp png_ptr)
 
void png_push_handle_unknown (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_push_have_info (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_have_end (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_have_row (png_structrp png_ptr, png_bytep row)
 
void png_push_read_end (png_structrp png_ptr, png_inforp info_ptr)
 
void png_process_some_data (png_structrp png_ptr, png_inforp info_ptr)
 
void png_read_push_finish_row (png_structrp png_ptr)
 
void png_push_handle_tEXt (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_push_read_tEXt (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_handle_zTXt (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_push_read_zTXt (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_handle_iTXt (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
 
void png_push_read_iTXt (png_structrp png_ptr, png_inforp info_ptr)
 
void png_colorspace_set_gamma (png_const_structrp png_ptr, png_colorspacerp colorspace, png_fixed_point gAMA)
 
void png_colorspace_sync_info (png_const_structrp png_ptr, png_inforp info_ptr)
 
void png_colorspace_sync (png_const_structrp png_ptr, png_inforp info_ptr)
 
int png_colorspace_set_chromaticities (png_const_structrp png_ptr, png_colorspacerp colorspace, const png_xy *xy, int preferred)
 
int png_colorspace_set_endpoints (png_const_structrp png_ptr, png_colorspacerp colorspace, const png_XYZ *XYZ, int preferred)
 
int png_colorspace_set_sRGB (png_const_structrp png_ptr, png_colorspacerp colorspace, int intent)
 
int png_colorspace_set_ICC (png_const_structrp png_ptr, png_colorspacerp colorspace, png_const_charp name, png_uint_32 profile_length, png_const_bytep profile, int color_type)
 
int png_icc_check_length (png_const_structrp png_ptr, png_colorspacerp colorspace, png_const_charp name, png_uint_32 profile_length)
 
int png_icc_check_header (png_const_structrp png_ptr, png_colorspacerp colorspace, png_const_charp name, png_uint_32 profile_length, png_const_bytep profile, int color_type)
 
int png_icc_check_tag_table (png_const_structrp png_ptr, png_colorspacerp colorspace, png_const_charp name, png_uint_32 profile_length, png_const_bytep profile)
 
void png_icc_set_sRGB (png_const_structrp png_ptr, png_colorspacerp colorspace, png_const_bytep profile, uLong adler)
 
void png_colorspace_set_rgb_coefficients (png_structrp png_ptr)
 
void png_check_IHDR (png_const_structrp 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)
 
void png_do_check_palette_indexes (png_structrp png_ptr, png_row_infop row_info)
 
void png_fixed_error (png_const_structrp png_ptr, png_const_charp name)
 
size_t png_safecat (png_charp buffer, size_t bufsize, size_t pos, png_const_charp string)
 
png_charp png_format_number (png_const_charp start, png_charp end, int format, png_alloc_size_t number)
 
void png_warning_parameter (png_warning_parameters p, int number, png_const_charp string)
 
void png_warning_parameter_unsigned (png_warning_parameters p, int number, int format, png_alloc_size_t value)
 
void png_warning_parameter_signed (png_warning_parameters p, int number, int format, png_int_32 value)
 
void png_formatted_warning (png_const_structrp png_ptr, png_warning_parameters p, png_const_charp message)
 
void png_app_warning (png_const_structrp png_ptr, png_const_charp message)
 
void png_app_error (png_const_structrp png_ptr, png_const_charp message)
 
void png_chunk_report (png_const_structrp png_ptr, png_const_charp message, int error)
 
void png_ascii_from_fp (png_const_structrp png_ptr, png_charp ascii, png_size_t size, double fp, unsigned int precision)
 
void png_ascii_from_fixed (png_const_structrp png_ptr, png_charp ascii, png_size_t size, png_fixed_point fp)
 
int png_check_fp_number (png_const_charp string, png_size_t size, int *statep, png_size_tp whereami)
 
int png_check_fp_string (png_const_charp string, png_size_t size)
 
int png_muldiv (png_fixed_point_p res, png_fixed_point a, png_int_32 multiplied_by, png_int_32 divided_by)
 
png_fixed_point png_muldiv_warn (png_const_structrp png_ptr, png_fixed_point a, png_int_32 multiplied_by, png_int_32 divided_by)
 
png_fixed_point png_reciprocal (png_fixed_point a)
 
png_fixed_point png_reciprocal2 (png_fixed_point a, png_fixed_point b)
 
int png_gamma_significant (png_fixed_point gamma_value)
 
png_uint_16 png_gamma_correct (png_structrp png_ptr, unsigned int value, png_fixed_point gamma_value)
 
png_uint_16 png_gamma_16bit_correct (unsigned int value, png_fixed_point gamma_value)
 
png_byte png_gamma_8bit_correct (unsigned int value, png_fixed_point gamma_value)
 
void png_destroy_gamma_table (png_structrp png_ptr)
 
void png_build_gamma_table (png_structrp png_ptr, int bit_depth)
 
void() png_safe_error (png_structp png_ptr, png_const_charp error_message)
 
void() png_safe_warning (png_structp png_ptr, png_const_charp warning_message)
 
int png_safe_execute (png_imagep image, int(*function)(png_voidp), png_voidp arg)
 
int png_image_error (png_imagep image, png_const_charp error_message)
 
png_uint_32 png_check_keyword (png_structrp png_ptr, png_const_charp key, png_bytep new_key)
 

Variables

const typedef png_uint_16ppng_const_uint_16pp
 
const png_uint_16 png_sRGB_table [256]
 
const png_uint_16 png_sRGB_base [512]
 
const png_byte png_sRGB_delta [512]
 

Macro Definition Documentation

◆ _POSIX_SOURCE

#define _POSIX_SOURCE   1 /* Just the POSIX 1003.1 and C89 APIs */

Definition at line 39 of file pngpriv.h.

◆ PNG_16_TO_8

#define PNG_16_TO_8   0x0400U /* Becomes 'chop' in 1.5.4 */

Definition at line 643 of file pngpriv.h.

◆ PNG_32b

#define PNG_32b (   b,
 
)    ((png_uint_32)(b) << (s))

Definition at line 812 of file pngpriv.h.

◆ PNG_ABORT

#define PNG_ABORT ( )    abort()

Definition at line 553 of file pngpriv.h.

◆ PNG_ADD_ALPHA

#define PNG_ADD_ALPHA   0x1000000U /* Added to libpng-1.2.7 */

Definition at line 658 of file pngpriv.h.

◆ PNG_ALIGN_ALWAYS

#define PNG_ALIGN_ALWAYS   1 /* assume unaligned accesses are OK */

Definition at line 559 of file pngpriv.h.

◆ PNG_ALIGN_NONE

#define PNG_ALIGN_NONE   0 /* do not use data alignment */

Definition at line 558 of file pngpriv.h.

◆ PNG_ALIGN_OFFSET

#define PNG_ALIGN_OFFSET   -1 /* prevent the use of this */

Definition at line 563 of file pngpriv.h.

◆ PNG_ALIGN_SIZE

#define PNG_ALIGN_SIZE   3 /* use sizeof to determine alignment */

Definition at line 565 of file pngpriv.h.

◆ PNG_ALIGN_TYPE

#define PNG_ALIGN_TYPE   PNG_ALIGN_SIZE

Definition at line 572 of file pngpriv.h.

◆ png_aligncast

#define png_aligncast (   type,
  value 
)    ((void*)(value))

Definition at line 496 of file pngpriv.h.

◆ png_aligncastconst

#define png_aligncastconst (   type,
  value 
)    ((const void*)(value))

Definition at line 497 of file pngpriv.h.

◆ png_alignof

#define png_alignof (   type)    (sizeof (type))

Definition at line 582 of file pngpriv.h.

◆ PNG_ARM_NEON_OPT

#define PNG_ARM_NEON_OPT   0

Definition at line 134 of file pngpriv.h.

◆ PNG_BACKGROUND_EXPAND

#define PNG_BACKGROUND_EXPAND   0x0100U

Definition at line 641 of file pngpriv.h.

◆ PNG_BACKGROUND_IS_GRAY

#define PNG_BACKGROUND_IS_GRAY   0x800U

Definition at line 626 of file pngpriv.h.

◆ PNG_BGR

#define PNG_BGR   0x0001U

Definition at line 633 of file pngpriv.h.

◆ png_bKGD

#define png_bKGD   PNG_U32( 98, 75, 71, 68)

Definition at line 843 of file pngpriv.h.

◆ png_cHRM

#define png_cHRM   PNG_U32( 99, 72, 82, 77)

Definition at line 844 of file pngpriv.h.

◆ PNG_CHUNK_ANCILLARY

#define PNG_CHUNK_ANCILLARY (   c)    (1 & ((c) >> 29))

Definition at line 888 of file pngpriv.h.

◆ PNG_CHUNK_CRITICAL

#define PNG_CHUNK_CRITICAL (   c)    (!PNG_CHUNK_ANCILLARY(c))

Definition at line 889 of file pngpriv.h.

◆ PNG_CHUNK_ERROR

#define PNG_CHUNK_ERROR   2 /* always an error */

Definition at line 1835 of file pngpriv.h.

◆ PNG_CHUNK_FROM_STRING

#define PNG_CHUNK_FROM_STRING (   s)    PNG_U32(0xff & (s)[0], 0xff & (s)[1], 0xff & (s)[2], 0xff & (s)[3])

Definition at line 870 of file pngpriv.h.

◆ PNG_CHUNK_PRIVATE

#define PNG_CHUNK_PRIVATE (   c)    (1 & ((c) >> 21))

Definition at line 890 of file pngpriv.h.

◆ PNG_CHUNK_RESERVED

#define PNG_CHUNK_RESERVED (   c)    (1 & ((c) >> 13))

Definition at line 891 of file pngpriv.h.

◆ PNG_CHUNK_SAFE_TO_COPY

#define PNG_CHUNK_SAFE_TO_COPY (   c)    (1 & ((c) >> 5))

Definition at line 892 of file pngpriv.h.

◆ PNG_CHUNK_WARNING

#define PNG_CHUNK_WARNING   0 /* never an error */

Definition at line 1833 of file pngpriv.h.

◆ PNG_CHUNK_WRITE_ERROR

#define PNG_CHUNK_WRITE_ERROR   1 /* an error only on write */

Definition at line 1834 of file pngpriv.h.

◆ PNG_COLOR_DIST

#define PNG_COLOR_DIST (   c1,
  c2 
)
Value:
(abs((int)((c1).red) - (int)((c2).red)) + \
abs((int)((c1).green) - (int)((c2).green)) + \
abs((int)((c1).blue) - (int)((c2).blue)))

Definition at line 713 of file pngpriv.h.

◆ PNG_COMPOSE

#define PNG_COMPOSE   0x0080U /* Was PNG_BACKGROUND */

Definition at line 640 of file pngpriv.h.

◆ png_constcast

#define png_constcast (   type,
  value 
)    ((type)(png_ptruint)(const void*)(value))

Definition at line 495 of file pngpriv.h.

◆ png_control_jmp_buf

#define png_control_jmp_buf (   pc)    ((pc)->error_buf)

Definition at line 2045 of file pngpriv.h.

◆ PNG_CSTRING_FROM_CHUNK

#define PNG_CSTRING_FROM_CHUNK (   s,
 
)    (void)(PNG_STRING_FROM_CHUNK(s,c), ((char*)(s))[4] = 0)

Definition at line 884 of file pngpriv.h.

◆ PNG_DEPRECATED

#define PNG_DEPRECATED

Definition at line 323 of file pngpriv.h.

◆ PNG_DIV257

#define PNG_DIV257 (   v16)    PNG_DIV65535((png_uint_32)(v16) * 255)

Definition at line 726 of file pngpriv.h.

◆ PNG_DIV65535

#define PNG_DIV65535 (   v24)    (((v24) + 32895) >> 16)

Definition at line 725 of file pngpriv.h.

◆ PNG_DLL_EXPORT

#define PNG_DLL_EXPORT

Definition at line 381 of file pngpriv.h.

◆ PNG_ENCODE_ALPHA

#define PNG_ENCODE_ALPHA   0x800000U /* Added to libpng-1.5.4 */

Definition at line 657 of file pngpriv.h.

◆ png_eXIf

#define png_eXIf   PNG_U32(101, 88, 73, 102) /* registered July 2017 */

Definition at line 845 of file pngpriv.h.

◆ PNG_EXPAND

#define PNG_EXPAND   0x1000U

Definition at line 645 of file pngpriv.h.

◆ PNG_EXPAND_16

#define PNG_EXPAND_16   0x0200U /* Added to libpng 1.5.2 */

Definition at line 642 of file pngpriv.h.

◆ PNG_EXPAND_tRNS

#define PNG_EXPAND_tRNS   0x2000000U /* Added to libpng-1.2.9 */

Definition at line 659 of file pngpriv.h.

◆ PNG_FILLER

#define PNG_FILLER   0x8000U

Definition at line 648 of file pngpriv.h.

◆ PNG_FLAG_APP_ERRORS_WARN

#define PNG_FLAG_APP_ERRORS_WARN   0x400000U /* Added to libpng-1.6.0 */

Definition at line 692 of file pngpriv.h.

◆ PNG_FLAG_APP_WARNINGS_WARN

#define PNG_FLAG_APP_WARNINGS_WARN   0x200000U /* Added to libpng-1.6.0 */

Definition at line 691 of file pngpriv.h.

◆ PNG_FLAG_ASSUME_sRGB

#define PNG_FLAG_ASSUME_sRGB   0x1000U /* Added to libpng-1.5.4 */

Definition at line 682 of file pngpriv.h.

◆ PNG_FLAG_BENIGN_ERRORS_WARN

#define PNG_FLAG_BENIGN_ERRORS_WARN   0x100000U /* Added to libpng-1.4.0 */

Definition at line 690 of file pngpriv.h.

◆ PNG_FLAG_CRC_ANCILLARY_MASK

#define PNG_FLAG_CRC_ANCILLARY_MASK
Value:
PNG_FLAG_CRC_ANCILLARY_NOWARN)

Definition at line 702 of file pngpriv.h.

◆ PNG_FLAG_CRC_ANCILLARY_NOWARN

#define PNG_FLAG_CRC_ANCILLARY_NOWARN   0x0200U

Definition at line 679 of file pngpriv.h.

◆ PNG_FLAG_CRC_ANCILLARY_USE

#define PNG_FLAG_CRC_ANCILLARY_USE   0x0100U

Definition at line 678 of file pngpriv.h.

◆ PNG_FLAG_CRC_CRITICAL_IGNORE

#define PNG_FLAG_CRC_CRITICAL_IGNORE   0x0800U

Definition at line 681 of file pngpriv.h.

◆ PNG_FLAG_CRC_CRITICAL_MASK

#define PNG_FLAG_CRC_CRITICAL_MASK
Value:
PNG_FLAG_CRC_CRITICAL_IGNORE)

Definition at line 705 of file pngpriv.h.

◆ PNG_FLAG_CRC_CRITICAL_USE

#define PNG_FLAG_CRC_CRITICAL_USE   0x0400U

Definition at line 680 of file pngpriv.h.

◆ PNG_FLAG_CRC_MASK

#define PNG_FLAG_CRC_MASK
Value:
PNG_FLAG_CRC_CRITICAL_MASK)

Definition at line 708 of file pngpriv.h.

◆ PNG_FLAG_DETECT_UNINITIALIZED

#define PNG_FLAG_DETECT_UNINITIALIZED   0x4000U /* Added to libpng-1.5.4 */

Definition at line 684 of file pngpriv.h.

◆ PNG_FLAG_FILLER_AFTER

#define PNG_FLAG_FILLER_AFTER   0x0080U

Definition at line 677 of file pngpriv.h.

◆ PNG_FLAG_LIBRARY_MISMATCH

#define PNG_FLAG_LIBRARY_MISMATCH   0x20000U

Definition at line 687 of file pngpriv.h.

◆ PNG_FLAG_OPTIMIZE_ALPHA

#define PNG_FLAG_OPTIMIZE_ALPHA   0x2000U /* Added to libpng-1.5.4 */

Definition at line 683 of file pngpriv.h.

◆ PNG_FLAG_ROW_INIT

#define PNG_FLAG_ROW_INIT   0x0040U

Definition at line 676 of file pngpriv.h.

◆ PNG_FLAG_STRIP_ERROR_NUMBERS

#define PNG_FLAG_STRIP_ERROR_NUMBERS   0x40000U

Definition at line 688 of file pngpriv.h.

◆ PNG_FLAG_STRIP_ERROR_TEXT

#define PNG_FLAG_STRIP_ERROR_TEXT   0x80000U

Definition at line 689 of file pngpriv.h.

◆ PNG_FLAG_ZLIB_CUSTOM_STRATEGY

#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY   0x0001U

Definition at line 670 of file pngpriv.h.

◆ PNG_FLAG_ZSTREAM_ENDED

#define PNG_FLAG_ZSTREAM_ENDED   0x0008U /* Added to libpng-1.6.0 */

Definition at line 673 of file pngpriv.h.

◆ PNG_FLAG_ZSTREAM_INITIALIZED

#define PNG_FLAG_ZSTREAM_INITIALIZED   0x0002U /* Added to libpng-1.6.0 */

Definition at line 671 of file pngpriv.h.

◆ png_float

#define png_float (   png_ptr,
  fixed,
 
)    (.00001 * (fixed))

Definition at line 772 of file pngpriv.h.

◆ PNG_FORMAT_NUMBER

#define PNG_FORMAT_NUMBER (   buffer,
  format,
  number 
)    png_format_number(buffer, buffer + (sizeof buffer), format, number)

Definition at line 1739 of file pngpriv.h.

◆ PNG_FP_EXPONENT

#define PNG_FP_EXPONENT   2 /* before or in exponent */

Definition at line 1893 of file pngpriv.h.

◆ PNG_FP_FRACTION

#define PNG_FP_FRACTION   1 /* before or in fraction */

Definition at line 1892 of file pngpriv.h.

◆ PNG_FP_INTEGER

#define PNG_FP_INTEGER   0 /* before or in integer */

Definition at line 1891 of file pngpriv.h.

◆ PNG_FP_INVALID

#define PNG_FP_INVALID   512 /* Available for callers as a distinct value */

Definition at line 1911 of file pngpriv.h.

◆ PNG_FP_IS_NEGATIVE

#define PNG_FP_IS_NEGATIVE (   state)    (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK)

Definition at line 1931 of file pngpriv.h.

◆ PNG_FP_IS_POSITIVE

#define PNG_FP_IS_POSITIVE (   state)    (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK)

Definition at line 1930 of file pngpriv.h.

◆ PNG_FP_IS_ZERO

#define PNG_FP_IS_ZERO (   state)    (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT)

Definition at line 1929 of file pngpriv.h.

◆ PNG_FP_MAYBE

#define PNG_FP_MAYBE   0 /* The number may be valid in the future */

Definition at line 1916 of file pngpriv.h.

◆ PNG_FP_NEGATIVE

#define PNG_FP_NEGATIVE   128 /* A negative number, including "-0" */

Definition at line 1904 of file pngpriv.h.

◆ PNG_FP_NONZERO

#define PNG_FP_NONZERO   256 /* A non-zero value */

Definition at line 1905 of file pngpriv.h.

◆ PNG_FP_NZ_MASK

#define PNG_FP_NZ_MASK   (PNG_FP_SAW_DIGIT | PNG_FP_NEGATIVE | PNG_FP_NONZERO)

Definition at line 1924 of file pngpriv.h.

◆ PNG_FP_OK

#define PNG_FP_OK   1 /* The number is valid */

Definition at line 1917 of file pngpriv.h.

◆ PNG_FP_SAW_ANY

#define PNG_FP_SAW_ANY   60 /* Saw any of the above 4 */

Definition at line 1899 of file pngpriv.h.

◆ PNG_FP_SAW_DIGIT

#define PNG_FP_SAW_DIGIT   8 /* Saw a digit in current state */

Definition at line 1896 of file pngpriv.h.

◆ PNG_FP_SAW_DOT

#define PNG_FP_SAW_DOT   16 /* Saw a dot in current state */

Definition at line 1897 of file pngpriv.h.

◆ PNG_FP_SAW_E

#define PNG_FP_SAW_E   32 /* Saw an E (or e) in current state */

Definition at line 1898 of file pngpriv.h.

◆ PNG_FP_SAW_SIGN

#define PNG_FP_SAW_SIGN   4 /* Saw +/- in current state */

Definition at line 1895 of file pngpriv.h.

◆ PNG_FP_STATE

#define PNG_FP_STATE   3 /* mask for the above */

Definition at line 1894 of file pngpriv.h.

◆ PNG_FP_STICKY

#define PNG_FP_STICKY   448 /* The above three flags */

Definition at line 1906 of file pngpriv.h.

◆ PNG_FP_WAS_VALID

#define PNG_FP_WAS_VALID   64 /* Preceding substring is a valid fp number */

Definition at line 1903 of file pngpriv.h.

◆ PNG_FP_Z_MASK

#define PNG_FP_Z_MASK   (PNG_FP_SAW_DIGIT | PNG_FP_NONZERO)

Definition at line 1926 of file pngpriv.h.

◆ png_fRAc

#define png_fRAc   PNG_U32(102, 82, 65, 99) /* registered, not defined */

Definition at line 846 of file pngpriv.h.

◆ png_gAMA

#define png_gAMA   PNG_U32(103, 65, 77, 65)

Definition at line 847 of file pngpriv.h.

◆ PNG_GAMMA

#define PNG_GAMMA   0x2000U

Definition at line 646 of file pngpriv.h.

◆ PNG_GAMMA_MAC_INVERSE

#define PNG_GAMMA_MAC_INVERSE   65909

Definition at line 896 of file pngpriv.h.

◆ PNG_GAMMA_MAC_OLD

#define PNG_GAMMA_MAC_OLD   151724 /* Assume '1.8' is really 2.2/1.45! */

Definition at line 895 of file pngpriv.h.

◆ PNG_GAMMA_sRGB_INVERSE

#define PNG_GAMMA_sRGB_INVERSE   45455

Definition at line 897 of file pngpriv.h.

◆ png_gIFg

#define png_gIFg   PNG_U32(103, 73, 70, 103)

Definition at line 848 of file pngpriv.h.

◆ png_gIFt

#define png_gIFt   PNG_U32(103, 73, 70, 116) /* deprecated */

Definition at line 849 of file pngpriv.h.

◆ png_gIFx

#define png_gIFx   PNG_U32(103, 73, 70, 120)

Definition at line 850 of file pngpriv.h.

◆ PNG_GRAY_TO_RGB

#define PNG_GRAY_TO_RGB   0x4000U

Definition at line 647 of file pngpriv.h.

◆ PNG_HAVE_CHUNK_AFTER_IDAT

#define PNG_HAVE_CHUNK_AFTER_IDAT   0x2000U /* Have another chunk after IDAT */

Definition at line 628 of file pngpriv.h.

◆ PNG_HAVE_CHUNK_HEADER

#define PNG_HAVE_CHUNK_HEADER   0x100U

Definition at line 623 of file pngpriv.h.

◆ PNG_HAVE_IDAT

#define PNG_HAVE_IDAT   0x04U

Definition at line 617 of file pngpriv.h.

◆ PNG_HAVE_IEND

#define PNG_HAVE_IEND   0x10U

Definition at line 619 of file pngpriv.h.

◆ PNG_HAVE_PNG_SIGNATURE

#define PNG_HAVE_PNG_SIGNATURE   0x1000U

Definition at line 627 of file pngpriv.h.

◆ png_hIST

#define png_hIST   PNG_U32(104, 73, 83, 84)

Definition at line 851 of file pngpriv.h.

◆ png_iCCP

#define png_iCCP   PNG_U32(105, 67, 67, 80)

Definition at line 852 of file pngpriv.h.

◆ png_IDAT

#define png_IDAT   PNG_U32( 73, 68, 65, 84)

Definition at line 839 of file pngpriv.h.

◆ png_IEND

#define png_IEND   PNG_U32( 73, 69, 78, 68)

Definition at line 840 of file pngpriv.h.

◆ png_IHDR

#define png_IHDR   PNG_U32( 73, 72, 68, 82)

Definition at line 841 of file pngpriv.h.

◆ PNG_IMPEXP

#define PNG_IMPEXP

Definition at line 317 of file pngpriv.h.

◆ PNG_INFLATE

#define PNG_INFLATE (   pp,
  flush 
)    png_zlib_inflate(pp, flush)

Definition at line 1387 of file pngpriv.h.

◆ PNG_INTERLACE

#define PNG_INTERLACE   0x0002U

Definition at line 634 of file pngpriv.h.

◆ PNG_INTERNAL_CALLBACK

#define PNG_INTERNAL_CALLBACK (   type,
  name,
  args,
  attributes 
)
Value:
PNG_EMPTY attributes)

Definition at line 344 of file pngpriv.h.

◆ PNG_INTERNAL_DATA

#define PNG_INTERNAL_DATA (   type,
  name,
  array 
)    PNG_LINKAGE_DATA type name array

Definition at line 335 of file pngpriv.h.

◆ PNG_INTERNAL_FUNCTION

#define PNG_INTERNAL_FUNCTION (   type,
  name,
  args,
  attributes 
)    PNG_LINKAGE_FUNCTION PNG_FUNCTION(type, name, args, PNG_EMPTY attributes)

Definition at line 339 of file pngpriv.h.

◆ PNG_INVERT_ALPHA

#define PNG_INVERT_ALPHA   0x80000U

Definition at line 652 of file pngpriv.h.

◆ PNG_INVERT_MONO

#define PNG_INVERT_MONO   0x0020U

Definition at line 638 of file pngpriv.h.

◆ PNG_IS_READ_STRUCT

#define PNG_IS_READ_STRUCT   0x8000U /* Else is a write struct */

Definition at line 630 of file pngpriv.h.

◆ png_isaligned

#define png_isaligned (   ptr,
  type 
)
Value:
(((type)((const char*)ptr-(const char*)0) & \
(type)(png_alignof(type)-1)) == 0)

Definition at line 596 of file pngpriv.h.

◆ png_iTXt

#define png_iTXt   PNG_U32(105, 84, 88, 116)

Definition at line 853 of file pngpriv.h.

◆ PNG_MIPS_MSA_OPT

#define PNG_MIPS_MSA_OPT   0

Definition at line 191 of file pngpriv.h.

◆ PNG_NUMBER_BUFFER_SIZE

#define PNG_NUMBER_BUFFER_SIZE   24

Definition at line 1743 of file pngpriv.h.

◆ PNG_NUMBER_FORMAT_02d

#define PNG_NUMBER_FORMAT_02d   2

Definition at line 1751 of file pngpriv.h.

◆ PNG_NUMBER_FORMAT_02u

#define PNG_NUMBER_FORMAT_02u   2

Definition at line 1749 of file pngpriv.h.

◆ PNG_NUMBER_FORMAT_02x

#define PNG_NUMBER_FORMAT_02x   4

Definition at line 1753 of file pngpriv.h.

◆ PNG_NUMBER_FORMAT_d

#define PNG_NUMBER_FORMAT_d   1 /* chose signed API! */

Definition at line 1750 of file pngpriv.h.

◆ PNG_NUMBER_FORMAT_fixed

#define PNG_NUMBER_FORMAT_fixed   5 /* choose the signed API */

Definition at line 1754 of file pngpriv.h.

◆ PNG_NUMBER_FORMAT_u

#define PNG_NUMBER_FORMAT_u   1 /* chose unsigned API! */

Definition at line 1748 of file pngpriv.h.

◆ PNG_NUMBER_FORMAT_x

#define PNG_NUMBER_FORMAT_x   3

Definition at line 1752 of file pngpriv.h.

◆ png_oFFs

#define png_oFFs   PNG_U32(111, 70, 70, 115)

Definition at line 854 of file pngpriv.h.

◆ PNG_OUT_OF_RANGE

#define PNG_OUT_OF_RANGE (   value,
  ideal,
  delta 
)    ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )

Definition at line 757 of file pngpriv.h.

◆ PNG_PACK

#define PNG_PACK   0x0004U

Definition at line 635 of file pngpriv.h.

◆ PNG_PACKSWAP

#define PNG_PACKSWAP   0x10000U

Definition at line 649 of file pngpriv.h.

◆ PNG_PADBITS

#define PNG_PADBITS (   pixel_bits,
  width 
)    ((8 - PNG_TRAILBITS(pixel_bits, width)) % 8)

Definition at line 749 of file pngpriv.h.

◆ png_pCAL

#define png_pCAL   PNG_U32(112, 67, 65, 76)

Definition at line 855 of file pngpriv.h.

◆ png_pHYs

#define png_pHYs   PNG_U32(112, 72, 89, 115)

Definition at line 856 of file pngpriv.h.

◆ png_PLTE

#define png_PLTE   PNG_U32( 80, 76, 84, 69)

Definition at line 842 of file pngpriv.h.

◆ PNG_POWERPC_VSX_OPT

#define PNG_POWERPC_VSX_OPT   0

Definition at line 199 of file pngpriv.h.

◆ PNG_PRIVATE

#define PNG_PRIVATE

Definition at line 326 of file pngpriv.h.

◆ PNG_QUANTIZE

#define PNG_QUANTIZE   0x0040U

Definition at line 639 of file pngpriv.h.

◆ PNG_RELEASE_BUILD

#define PNG_RELEASE_BUILD   (PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC)

Definition at line 397 of file pngpriv.h.

◆ PNG_RGB_TO_GRAY

#define PNG_RGB_TO_GRAY   0x600000U /* two bits, RGB_TO_GRAY_ERR|WARN */

Definition at line 656 of file pngpriv.h.

◆ PNG_RGB_TO_GRAY_ERR

#define PNG_RGB_TO_GRAY_ERR   0x200000U

Definition at line 654 of file pngpriv.h.

◆ PNG_RGB_TO_GRAY_WARN

#define PNG_RGB_TO_GRAY_WARN   0x400000U

Definition at line 655 of file pngpriv.h.

◆ PNG_RGBA

#define PNG_RGBA   0x0800U

Definition at line 644 of file pngpriv.h.

◆ PNG_ROWBYTES

#define PNG_ROWBYTES (   pixel_bits,
  width 
)
Value:
((pixel_bits) >= 8 ? \
((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
(( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )

Definition at line 729 of file pngpriv.h.

◆ png_sBIT

#define png_sBIT   PNG_U32(115, 66, 73, 84)

Definition at line 857 of file pngpriv.h.

◆ png_sCAL

#define png_sCAL   PNG_U32(115, 67, 65, 76)

Definition at line 858 of file pngpriv.h.

◆ PNG_sCAL_MAX_DIGITS

#define PNG_sCAL_MAX_DIGITS   (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/)

Definition at line 1846 of file pngpriv.h.

◆ PNG_SCALE_16_TO_8

#define PNG_SCALE_16_TO_8   0x4000000U /* Added to libpng-1.5.4 */

Definition at line 660 of file pngpriv.h.

◆ PNG_SHIFT

#define PNG_SHIFT   0x0008U

Definition at line 636 of file pngpriv.h.

◆ png_sPLT

#define png_sPLT   PNG_U32(115, 80, 76, 84)

Definition at line 859 of file pngpriv.h.

◆ png_sRGB

#define png_sRGB   PNG_U32(115, 82, 71, 66)

Definition at line 860 of file pngpriv.h.

◆ PNG_sRGB_FROM_LINEAR

#define PNG_sRGB_FROM_LINEAR (   linear)
Value:
((png_byte)(0xff & ((png_sRGB_base[(linear)>>15] \
+ ((((linear) & 0x7fff)*png_sRGB_delta[(linear)>>15])>>12)) >> 8)))

Definition at line 943 of file pngpriv.h.

◆ png_sTER

#define png_sTER   PNG_U32(115, 84, 69, 82)

Definition at line 861 of file pngpriv.h.

◆ PNG_STRING_FROM_CHUNK

#define PNG_STRING_FROM_CHUNK (   s,
 
)
Value:
(void)(((char*)(s))[0]=(char)(((c)>>24) & 0xff), \
((char*)(s))[1]=(char)(((c)>>16) & 0xff),\
((char*)(s))[2]=(char)(((c)>>8) & 0xff), \
((char*)(s))[3]=(char)((c & 0xff)))

Definition at line 877 of file pngpriv.h.

◆ PNG_STRIP_ALPHA

#define PNG_STRIP_ALPHA   0x40000U

Definition at line 651 of file pngpriv.h.

◆ PNG_STRUCT_INFO

#define PNG_STRUCT_INFO   0x0002U

Definition at line 667 of file pngpriv.h.

◆ PNG_STRUCT_PNG

#define PNG_STRUCT_PNG   0x0001U

Definition at line 666 of file pngpriv.h.

◆ PNG_SWAP_ALPHA

#define PNG_SWAP_ALPHA   0x20000U

Definition at line 650 of file pngpriv.h.

◆ PNG_SWAP_BYTES

#define PNG_SWAP_BYTES   0x0010U

Definition at line 637 of file pngpriv.h.

◆ png_tEXt

#define png_tEXt   PNG_U32(116, 69, 88, 116)

Definition at line 862 of file pngpriv.h.

◆ png_tIME

#define png_tIME   PNG_U32(116, 73, 77, 69)

Definition at line 863 of file pngpriv.h.

◆ PNG_TRAILBITS

#define PNG_TRAILBITS (   pixel_bits,
  width 
)    (((pixel_bits) * ((width) % (png_uint_32)8)) % 8)

Definition at line 746 of file pngpriv.h.

◆ png_tRNS

#define png_tRNS   PNG_U32(116, 82, 78, 83)

Definition at line 864 of file pngpriv.h.

◆ PNG_U32

#define PNG_U32 (   b1,
  b2,
  b3,
  b4 
)    (PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0))

Definition at line 813 of file pngpriv.h.

◆ PNG_UNEXPECTED_ZLIB_RETURN

#define PNG_UNEXPECTED_ZLIB_RETURN   (-7)

Definition at line 964 of file pngpriv.h.

◆ PNG_UNUSED

#define PNG_UNUSED (   param)    (void)param;

Definition at line 429 of file pngpriv.h.

◆ PNG_USE_COMPILE_TIME_MASKS

#define PNG_USE_COMPILE_TIME_MASKS   1

Definition at line 1262 of file pngpriv.h.

◆ PNG_USER_TRANSFORM

#define PNG_USER_TRANSFORM   0x100000U

Definition at line 653 of file pngpriv.h.

◆ png_voidcast

#define png_voidcast (   type,
  value 
)    (value)

Definition at line 485 of file pngpriv.h.

◆ PNG_WARNING_PARAMETER_COUNT

#define PNG_WARNING_PARAMETER_COUNT   8 /* Maximum 9; see pngerror.c */

Definition at line 1760 of file pngpriv.h.

◆ PNG_WARNING_PARAMETER_SIZE

#define PNG_WARNING_PARAMETER_SIZE   32

Definition at line 1759 of file pngpriv.h.

◆ PNG_WARNING_PARAMETERS

#define PNG_WARNING_PARAMETERS (   p)    png_warning_parameters p;

Definition at line 445 of file pngpriv.h.

◆ PNG_WROTE_INFO_BEFORE_PLTE

#define PNG_WROTE_INFO_BEFORE_PLTE   0x400U

Definition at line 625 of file pngpriv.h.

◆ PNG_WROTE_tIME

#define PNG_WROTE_tIME   0x200U

Definition at line 624 of file pngpriv.h.

◆ png_zTXt

#define png_zTXt   PNG_U32(122, 84, 88, 116)

Definition at line 865 of file pngpriv.h.

◆ PNGFAPI

#define PNGFAPI   PNGAPI

Definition at line 462 of file pngpriv.h.

◆ PNGLIB_BUILD

#define PNGLIB_BUILD   /*libpng is being built, not used*/

Definition at line 48 of file pngpriv.h.

Typedef Documentation

◆ png_control

typedef struct png_control png_control

◆ png_ptruint

typedef unsigned long png_ptruint

Definition at line 493 of file pngpriv.h.

◆ png_warning_parameters

typedef char png_warning_parameters[8][ 32]

Definition at line 1766 of file pngpriv.h.

Function Documentation

◆ png_app_error()

◆ png_app_warning()

◆ png_ascii_from_fixed()

void png_ascii_from_fixed ( png_const_structrp  png_ptr,
png_charp  ascii,
png_size_t  size,
png_fixed_point  fp 
)

Definition at line 3239 of file png.c.

References png_error().

Referenced by png_set_sCAL_fixed().

◆ png_ascii_from_fp()

void png_ascii_from_fp ( png_const_structrp  png_ptr,
png_charp  ascii,
png_size_t  size,
double  fp,
unsigned int  precision 
)

Definition at line 2909 of file png.c.

References png_error(), and png_pow10().

Referenced by png_set_sCAL().

◆ png_build_gamma_table()

◆ png_calculate_crc()

◆ png_check_chunk_length()

void png_check_chunk_length ( png_const_structrp  png_ptr,
const png_uint_32  chunk_length 
)

◆ png_check_chunk_name()

void png_check_chunk_name ( png_const_structrp  png_ptr,
const png_uint_32  chunk_name 
)

Definition at line 3124 of file pngrutil.c.

References png_chunk_error(), and png_debug.

Referenced by png_push_read_chunk(), and png_read_chunk_header().

◆ png_check_fp_number()

◆ png_check_fp_string()

int png_check_fp_string ( png_const_charp  string,
png_size_t  size 
)

Definition at line 2845 of file png.c.

References png_check_fp_number().

Referenced by png_set_pCAL(), and png_set_sCAL_s().

◆ png_check_IHDR()

void png_check_IHDR ( png_const_structrp  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_check_keyword()

◆ png_chunk_report()

◆ png_chunk_unknown_handling()

int png_chunk_unknown_handling ( png_const_structrp  png_ptr,
png_uint_32  chunk_name 
)

◆ png_colorspace_set_chromaticities()

int png_colorspace_set_chromaticities ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
const png_xy *  xy,
int  preferred 
)

◆ png_colorspace_set_endpoints()

int png_colorspace_set_endpoints ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
const png_XYZ *  XYZ,
int  preferred 
)

◆ png_colorspace_set_gamma()

void png_colorspace_set_gamma ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
png_fixed_point  gAMA 
)

◆ png_colorspace_set_ICC()

int png_colorspace_set_ICC ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
png_const_charp  name,
png_uint_32  profile_length,
png_const_bytep  profile,
int  color_type 
)

◆ png_colorspace_set_rgb_coefficients()

void png_colorspace_set_rgb_coefficients ( png_structrp  png_ptr)

Definition at line 2475 of file png.c.

References png_struct_def::flags, png_error(), and png_muldiv().

Referenced by png_init_read_transformations().

◆ png_colorspace_set_sRGB()

◆ png_colorspace_sync()

void png_colorspace_sync ( png_const_structrp  png_ptr,
png_inforp  info_ptr 
)

Definition at line 1221 of file png.c.

References png_colorspace_sync_info().

Referenced by png_handle_cHRM(), png_handle_gAMA(), png_handle_iCCP(), and png_handle_sRGB().

◆ png_colorspace_sync_info()

◆ png_combine_row()

◆ png_compress_IDAT()

◆ png_crc_error()

◆ png_crc_finish()

◆ png_crc_read()

◆ png_create_png_struct()

◆ png_default_flush()

void png_default_flush ( png_structp  png_ptr)

Definition at line 79 of file pngwio.c.

References png_struct_def::io_ptr, and png_voidcast.

Referenced by png_set_write_fn().

◆ png_default_read_data()

void png_default_read_data ( png_structp  png_ptr,
png_bytep  data,
png_size_t  length 
)

Definition at line 50 of file pngrio.c.

References png_struct_def::io_ptr, length, png_error(), and png_voidcast.

Referenced by png_set_read_fn().

◆ png_default_write_data()

void png_default_write_data ( png_structp  png_ptr,
png_bytep  data,
png_size_t  length 
)

Definition at line 51 of file pngwio.c.

References png_struct_def::io_ptr, length, and png_error().

Referenced by png_set_write_fn().

◆ png_destroy_gamma_table()

void png_destroy_gamma_table ( png_structrp  png_ptr)

Definition at line 4142 of file png.c.

References png_free().

Referenced by png_build_gamma_table(), and png_read_destroy().

◆ png_destroy_png_struct()

void png_destroy_png_struct ( png_structrp  png_ptr)

Definition at line 25 of file pngmem.c.

References png_free(), and png_free_jmpbuf().

Referenced by png_destroy_read_struct(), and png_destroy_write_struct().

◆ png_do_bgr()

◆ png_do_check_palette_indexes()

◆ png_do_invert()

◆ png_do_packswap()

◆ png_do_read_interlace()

void png_do_read_interlace ( png_row_infop  row_info,
png_bytep  row,
int  pass,
png_uint_32  transformations 
)

◆ png_do_read_transformations()

void png_do_read_transformations ( png_structrp  png_ptr,
png_row_infop  row_info 
)

Definition at line 4715 of file pngrtran.c.

References png_struct_def::channels, png_struct_def::color_type, png_row_info_struct::color_type, png_struct_def::flags, png_struct_def::mode, png_struct_def::num_trans, png_struct_def::palette, png_struct_def::pixel_depth, PNG_16_TO_8, PNG_BACKGROUND_IS_GRAY, PNG_BGR, PNG_COLOR_MASK_ALPHA, PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB_ALPHA, PNG_COMPOSE, png_debug, png_do_bgr(), png_do_check_palette_indexes(), png_do_chop(), png_do_compose(), png_do_encode_alpha(), png_do_expand(), png_do_expand_16(), png_do_expand_palette(), png_do_gamma(), png_do_gray_to_rgb(), png_do_invert(), png_do_packswap(), png_do_quantize(), png_do_read_filler(), png_do_read_invert_alpha(), png_do_read_swap_alpha(), png_do_rgb_to_gray(), png_do_scale_16_to_8(), png_do_strip_channel(), png_do_swap(), png_do_unpack(), png_do_unshift(), PNG_ENCODE_ALPHA, png_error(), PNG_EXPAND, PNG_EXPAND_16, PNG_EXPAND_tRNS, PNG_FILLER, PNG_FLAG_DETECT_UNINITIALIZED, PNG_FLAG_ROW_INIT, PNG_GAMMA, PNG_GRAY_TO_RGB, PNG_INVERT_ALPHA, PNG_INVERT_MONO, PNG_PACK, PNG_PACKSWAP, PNG_QUANTIZE, PNG_READ_ALPHA_MODE_SUPPORTED, PNG_READ_BACKGROUND_SUPPORTED, PNG_READ_RGB_TO_GRAY_SUPPORTED, PNG_RGB_TO_GRAY, PNG_RGB_TO_GRAY_ERR, PNG_RGB_TO_GRAY_WARN, PNG_ROWBYTES, PNG_SCALE_16_TO_8, PNG_SHIFT, PNG_STRIP_ALPHA, PNG_SWAP_ALPHA, PNG_SWAP_BYTES, PNG_USER_TRANSFORM, png_warning(), png_struct_def::row_buf, png_row_info_struct::rowbytes, and png_struct_def::transformations.

Referenced by png_push_process_row(), and png_read_row().

◆ png_do_strip_channel()

◆ png_do_swap()

◆ png_do_write_interlace()

void png_do_write_interlace ( png_row_infop  row_info,
png_bytep  row,
int  pass 
)

◆ png_do_write_transformations()

◆ png_fixed()

png_fixed_point png_fixed ( png_const_structrp  png_ptr,
double  fp,
png_const_charp  text 
)

◆ png_fixed_error()

void png_fixed_error ( png_const_structrp  png_ptr,
png_const_charp  name 
)

Definition at line 572 of file pngerror.c.

References fixed_message, fixed_message_ln, msg, png_error(), and PNG_MAX_ERROR_TEXT.

Referenced by convert_gamma_value(), and png_fixed().

◆ png_flush()

void png_flush ( png_structrp  png_ptr)

Definition at line 71 of file pngwio.c.

Referenced by png_write_end(), and png_write_flush().

◆ png_format_number()

png_charp png_format_number ( png_const_charp  start,
png_charp  end,
int  format,
png_alloc_size_t  number 
)

◆ png_formatted_warning()

void png_formatted_warning ( png_const_structrp  png_ptr,
png_warning_parameters  p,
png_const_charp  message 
)

Definition at line 284 of file pngerror.c.

References msg, png_const_charp, png_warning(), and PNG_WARNING_PARAMETER_COUNT.

Referenced by png_check_keyword().

◆ png_free_buffer_list()

void png_free_buffer_list ( png_structrp  png_ptr,
png_compression_bufferp *  list 
)

Definition at line 440 of file pngwutil.c.

References png_free().

Referenced by png_compress_IDAT(), png_set_compression_buffer_size(), and png_write_destroy().

◆ png_free_jmpbuf()

void png_free_jmpbuf ( png_structrp  png_ptr)

Definition at line 666 of file pngerror.c.

References png_free().

Referenced by png_destroy_png_struct().

◆ png_gamma_16bit_correct()

png_uint_16 png_gamma_16bit_correct ( unsigned int  value,
png_fixed_point  gamma_value 
)

◆ png_gamma_8bit_correct()

png_byte png_gamma_8bit_correct ( unsigned int  value,
png_fixed_point  gamma_value 
)

Definition at line 3870 of file png.c.

References PNG_FP_1, and png_muldiv().

Referenced by png_build_8bit_table(), png_gamma_correct(), and png_init_read_transformations().

◆ png_gamma_correct()

png_uint_16 png_gamma_correct ( png_structrp  png_ptr,
unsigned int  value,
png_fixed_point  gamma_value 
)

◆ png_gamma_significant()

◆ png_handle_bKGD()

◆ png_handle_cHRM()

◆ png_handle_eXIf()

◆ png_handle_gAMA()

◆ png_handle_hIST()

◆ png_handle_iCCP()

◆ png_handle_IEND()

void png_handle_IEND ( png_structrp  png_ptr,
png_inforp  info_ptr,
png_uint_32  length 
)

◆ png_handle_IHDR()

◆ png_handle_iTXt()

◆ png_handle_oFFs()

◆ png_handle_pCAL()

◆ png_handle_pHYs()

◆ png_handle_PLTE()

◆ png_handle_sBIT()

◆ png_handle_sCAL()

◆ png_handle_sPLT()

◆ png_handle_sRGB()

◆ png_handle_tEXt()

◆ png_handle_tIME()

◆ png_handle_tRNS()

◆ png_handle_unknown()

◆ png_handle_zTXt()

◆ png_icc_check_header()

int png_icc_check_header ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
png_const_charp  name,
png_uint_32  profile_length,
png_const_bytep  profile,
int  color_type 
)

◆ png_icc_check_length()

int png_icc_check_length ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
png_const_charp  name,
png_uint_32  profile_length 
)

Definition at line 1988 of file png.c.

References icc_check_length(), png_icc_profile_error(), PNG_SIZE_MAX, and PNG_USER_CHUNK_MALLOC_MAX.

Referenced by png_handle_iCCP().

◆ png_icc_check_tag_table()

int png_icc_check_tag_table ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
png_const_charp  name,
png_uint_32  profile_length,
png_const_bytep  profile 
)

Definition at line 2204 of file png.c.

References png_const_bytep, png_get_uint_32, and png_icc_profile_error().

Referenced by png_colorspace_set_ICC(), and png_handle_iCCP().

◆ png_icc_set_sRGB()

void png_icc_set_sRGB ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
png_const_bytep  profile,
uLong  adler 
)

◆ png_image_error()

◆ png_init_read_transformations()

◆ png_malloc_array()

png_voidp png_malloc_array ( png_const_structrp  png_ptr,
int  nelements,
size_t  element_size 
)

Definition at line 123 of file pngmem.c.

References png_error(), and png_malloc_array_checked().

Referenced by png_set_sPLT().

◆ png_malloc_base()

◆ png_muldiv()

◆ png_muldiv_warn()

png_fixed_point png_muldiv_warn ( png_const_structrp  png_ptr,
png_fixed_point  a,
png_int_32  multiplied_by,
png_int_32  divided_by 
)

Definition at line 3478 of file png.c.

References png_muldiv(), and png_warning().

◆ png_process_IDAT_data()

◆ png_process_some_data()

void png_process_some_data ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_check_crc()

void png_push_check_crc ( png_structrp  png_ptr)

◆ png_push_fill_buffer()

void png_push_fill_buffer ( png_structp  png_ptr,
png_bytep  buffer,
png_size_t  length 
)

Definition at line 421 of file pngpread.c.

References buffer, and length.

Referenced by png_push_read_chunk(), png_push_read_IDAT(), png_push_read_sig(), and png_set_progressive_read_fn().

◆ png_push_handle_iTXt()

void png_push_handle_iTXt ( png_structrp  png_ptr,
png_inforp  info_ptr,
png_uint_32  length 
)

◆ png_push_handle_tEXt()

void png_push_handle_tEXt ( png_structrp  png_ptr,
png_inforp  info_ptr,
png_uint_32  length 
)

◆ png_push_handle_unknown()

void png_push_handle_unknown ( png_structrp  png_ptr,
png_inforp  info_ptr,
png_uint_32  length 
)

◆ png_push_handle_zTXt()

void png_push_handle_zTXt ( png_structrp  png_ptr,
png_inforp  info_ptr,
png_uint_32  length 
)

◆ png_push_have_end()

void png_push_have_end ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

Definition at line 1042 of file pngpread.c.

Referenced by png_push_read_chunk().

◆ png_push_have_info()

void png_push_have_info ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

Definition at line 1035 of file pngpread.c.

Referenced by png_push_read_chunk().

◆ png_push_have_row()

void png_push_have_row ( png_structrp  png_ptr,
png_bytep  row 
)

Definition at line 1049 of file pngpread.c.

References png_struct_def::pass, and png_struct_def::row_number.

Referenced by png_push_process_row().

◆ png_push_process_row()

◆ png_push_read_chunk()

void png_push_read_chunk ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_read_end()

void png_push_read_end ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_read_IDAT()

◆ png_push_read_iTXt()

void png_push_read_iTXt ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_read_sig()

void png_push_read_sig ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_read_tEXt()

void png_push_read_tEXt ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_read_zTXt()

void png_push_read_zTXt ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_restore_buffer()

void png_push_restore_buffer ( png_structrp  png_ptr,
png_bytep  buffer,
png_size_t  buffer_length 
)

Definition at line 524 of file pngpread.c.

References buffer.

Referenced by png_process_data().

◆ png_push_save_buffer()

void png_push_save_buffer ( png_structrp  png_ptr)

Definition at line 464 of file pngpread.c.

References png_error(), png_free(), png_malloc_warn(), and PNG_SIZE_MAX.

Referenced by png_process_data_pause().

◆ png_read_chunk_header()

◆ png_read_data()

void png_read_data ( png_structrp  png_ptr,
png_bytep  data,
png_size_t  length 
)

◆ png_read_filter_row()

void png_read_filter_row ( png_structrp  pp,
png_row_infop  row_info,
png_bytep  row,
png_const_bytep  prev_row,
int  filter 
)

◆ png_read_finish_IDAT()

◆ png_read_finish_row()

◆ png_read_IDAT_data()

◆ png_read_push_finish_row()

◆ png_read_sig()

void png_read_sig ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_read_start_row()

◆ png_read_transform_info()

◆ png_realloc_array()

png_voidp png_realloc_array ( png_const_structrp  png_ptr,
png_const_voidp  array,
int  old_elements,
int  add_elements,
size_t  element_size 
)

Definition at line 133 of file pngmem.c.

References png_error(), and png_malloc_array_checked().

Referenced by png_set_sPLT(), png_set_text_2(), and png_set_unknown_chunks().

◆ png_reciprocal()

◆ png_reciprocal2()

png_fixed_point png_reciprocal2 ( png_fixed_point  a,
png_fixed_point  b 
)

Definition at line 3549 of file png.c.

References png_product2(), and png_reciprocal().

Referenced by png_build_gamma_table(), and png_init_read_transformations().

◆ png_reset_crc()

void png_reset_crc ( png_structrp  png_ptr)

◆ png_safe_error()

void() png_safe_error ( png_structp  png_ptr,
png_const_charp  error_message 
)

◆ png_safe_execute()

◆ png_safe_warning()

void() png_safe_warning ( png_structp  png_ptr,
png_const_charp  warning_message 
)

◆ png_safecat()

size_t png_safecat ( png_charp  buffer,
size_t  bufsize,
size_t  pos,
png_const_charp  string 
)

◆ png_set_text_2()

◆ png_user_version_check()

int png_user_version_check ( png_structrp  png_ptr,
png_const_charp  user_png_ver 
)

◆ png_warning_parameter()

void png_warning_parameter ( png_warning_parameters  p,
int  number,
png_const_charp  string 
)

◆ png_warning_parameter_signed()

void png_warning_parameter_signed ( png_warning_parameters  p,
int  number,
int  format,
png_int_32  value 
)

Definition at line 263 of file pngerror.c.

References buffer, PNG_FORMAT_NUMBER, PNG_NUMBER_BUFFER_SIZE, and png_warning_parameter().

Referenced by png_check_keyword().

◆ png_warning_parameter_unsigned()

void png_warning_parameter_unsigned ( png_warning_parameters  p,
int  number,
int  format,
png_alloc_size_t  value 
)

Definition at line 255 of file pngerror.c.

References buffer, PNG_FORMAT_NUMBER, PNG_NUMBER_BUFFER_SIZE, and png_warning_parameter().

◆ png_write_bKGD()

◆ png_write_cHRM_fixed()

void png_write_cHRM_fixed ( png_structrp  png_ptr,
const png_xy *  xy 
)

Definition at line 1324 of file pngwutil.c.

References png_cHRM, png_debug, png_save_int_32(), and png_write_complete_chunk().

Referenced by png_write_info_before_PLTE().

◆ png_write_data()

void png_write_data ( png_structrp  png_ptr,
png_const_bytep  data,
png_size_t  length 
)

◆ png_write_eXIf()

void png_write_eXIf ( png_structrp  png_ptr,
png_bytep  exif,
int  num_exif 
)

◆ png_write_find_filter()

◆ png_write_finish_row()

◆ png_write_gAMA_fixed()

void png_write_gAMA_fixed ( png_structrp  png_ptr,
png_fixed_point  file_gamma 
)

Definition at line 1085 of file pngwutil.c.

References png_debug, png_gAMA, png_save_uint_32(), and png_write_complete_chunk().

Referenced by png_write_info_before_PLTE().

◆ png_write_hIST()

void png_write_hIST ( png_structrp  png_ptr,
png_const_uint_16p  hist,
int  num_hist 
)

◆ png_write_iCCP()

◆ png_write_IEND()

void png_write_IEND ( png_structrp  png_ptr)

Definition at line 1074 of file pngwutil.c.

References png_struct_def::mode, png_debug, PNG_HAVE_IEND, png_IEND, and png_write_complete_chunk().

Referenced by png_write_end().

◆ png_write_IHDR()

◆ png_write_iTXt()

◆ png_write_oFFs()

void png_write_oFFs ( png_structrp  png_ptr,
png_int_32  x_offset,
png_int_32  y_offset,
int  unit_type 
)

◆ png_write_pCAL()

void png_write_pCAL ( png_structrp  png_ptr,
png_charp  purpose,
png_int_32  X0,
png_int_32  X1,
int  type,
int  nparams,
png_const_charp  units,
png_charpp  params 
)

◆ png_write_pHYs()

void png_write_pHYs ( png_structrp  png_ptr,
png_uint_32  x_pixels_per_unit,
png_uint_32  y_pixels_per_unit,
int  unit_type 
)

◆ png_write_PLTE()

◆ png_write_sBIT()

◆ png_write_sCAL_s()

void png_write_sCAL_s ( png_structrp  png_ptr,
int  unit,
png_const_charp  width,
png_const_charp  height 
)

Definition at line 1811 of file pngwutil.c.

References height, png_debug, png_debug1, png_sCAL, png_warning(), png_write_complete_chunk(), and width.

Referenced by png_write_info().

◆ png_write_sPLT()

◆ png_write_sRGB()

void png_write_sRGB ( png_structrp  png_ptr,
int  intent 
)

◆ png_write_start_row()

◆ png_write_tEXt()

◆ png_write_tIME()

void png_write_tIME ( png_structrp  png_ptr,
png_const_timep  mod_time 
)

◆ png_write_tRNS()

◆ png_write_zTXt()

◆ png_zalloc()

voidpf png_zalloc ( voidpf  png_ptr,
uInt  items,
uInt  size 
)

Definition at line 98 of file png.c.

References png_malloc_warn(), png_voidcast, and png_warning().

Referenced by png_create_png_struct().

◆ png_zfree()

void png_zfree ( voidpf  png_ptr,
voidpf  ptr 
)

Definition at line 118 of file png.c.

References png_const_structrp, png_free(), and png_voidcast.

Referenced by png_create_png_struct(), and png_read_destroy().

◆ png_zlib_inflate()

int png_zlib_inflate ( png_structrp  png_ptr,
int  flush 
)

◆ png_zstream_error()

Variable Documentation

◆ png_const_uint_16pp

const typedef png_uint_16p* png_const_uint_16pp

Definition at line 928 of file pngpriv.h.

Referenced by png_do_compose(), and png_do_gamma().

◆ png_sRGB_base

const png_uint_16 png_sRGB_base[512]

◆ png_sRGB_delta

const png_byte png_sRGB_delta[512]

◆ png_sRGB_table

PNG_LINKAGE_CALLBACK
#define PNG_LINKAGE_CALLBACK
PNGCBAPI
#define PNGCBAPI
Definition: pngconf.h:264
png_alignof
#define png_alignof(type)
Definition: pngpriv.h:582
width
static png_uint_32 width
Definition: pngcrush.c:2136
PNG_FLAG_CRC_ANCILLARY_USE
#define PNG_FLAG_CRC_ANCILLARY_USE
Definition: pngpriv.h:678
PNG_FLAG_CRC_CRITICAL_USE
#define PNG_FLAG_CRC_CRITICAL_USE
Definition: pngpriv.h:680
PNG_EMPTY
#define PNG_EMPTY
Definition: pngconf.h:314
png_size_t
size_t png_size_t
Definition: pngconf.h:527
png_sRGB_delta
const png_byte png_sRGB_delta[512]
PNG_FLAG_CRC_ANCILLARY_MASK
#define PNG_FLAG_CRC_ANCILLARY_MASK
Definition: pngpriv.h:702
PNG_FUNCTION
#define PNG_FUNCTION(type, name, args, attributes)
Definition: pngconf.h:293
png_sRGB_base
const png_uint_16 png_sRGB_base[512]