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)  

png.c File Reference
#include "pngpriv.h"
Include dependency graph for png.c:

Go to the source code of this file.

Macros

#define GCC_STRICT_OVERFLOW   0
 
#define PNG_MD5(a, b, c, d)   { a, b, c, d }, (a!=0)||(b!=0)||(c!=0)||(d!=0)
 
#define PNG_ICC_CHECKSUM(adler, crc, md5, intent, broke, date, length, fname)   { adler, crc, length, md5, broke, intent },
 
#define png_gt(a, b)   ((a) > (b))
 
#define png_fp_add(state, flags)   ((state) |= (flags))
 
#define png_fp_set(state, value)   ((state) = (value) | ((state) & PNG_FP_STICKY))
 

Typedefs

typedef png_libpng_version_1_6_32 Your_png_h_is_not_version_1_6_32
 

Functions

void png_set_sig_bytes (png_structrp png_ptr, int num_bytes)
 
int png_sig_cmp (png_const_bytep sig, png_size_t start, png_size_t num_to_check)
 
voidpf png_zalloc (voidpf png_ptr, uInt items, uInt size)
 
void png_zfree (voidpf png_ptr, voidpf ptr)
 
void png_reset_crc (png_structrp png_ptr)
 
void png_calculate_crc (png_structrp png_ptr, png_const_bytep ptr, png_size_t length)
 
int png_user_version_check (png_structrp png_ptr, png_const_charp user_png_ver)
 
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)
 
png_infop png_create_info_struct (png_const_structrp png_ptr)
 
void png_destroy_info_struct (png_const_structrp png_ptr, png_infopp info_ptr_ptr)
 
void png_info_init_3 (png_infopp ptr_ptr, png_size_t png_info_struct_size)
 
void png_data_freer (png_const_structrp png_ptr, png_inforp info_ptr, int freer, png_uint_32 mask)
 
void png_free_data (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask, int num)
 
png_voidp png_get_io_ptr (png_const_structrp png_ptr)
 
void png_init_io (png_structrp png_ptr, png_FILE_p fp)
 
void png_save_int_32 (png_bytep buf, png_int_32 i)
 
png_const_charp png_get_copyright (png_const_structrp png_ptr)
 
png_const_charp png_get_libpng_ver (png_const_structrp png_ptr)
 
png_const_charp png_get_header_ver (png_const_structrp png_ptr)
 
png_const_charp png_get_header_version (png_const_structrp png_ptr)
 
int png_handle_as_unknown (png_const_structrp png_ptr, png_const_bytep chunk_name)
 
int png_chunk_unknown_handling (png_const_structrp png_ptr, png_uint_32 chunk_name)
 
int png_reset_zstream (png_structrp png_ptr)
 
png_uint_32 png_access_version_number (void)
 
void png_zstream_error (png_structrp png_ptr, int ret)
 
static int png_colorspace_check_gamma (png_const_structrp png_ptr, png_colorspacerp colorspace, png_fixed_point gAMA, int from)
 
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)
 
static int png_xy_from_XYZ (png_xy *xy, const png_XYZ *XYZ)
 
static int png_XYZ_from_xy (png_XYZ *XYZ, const png_xy *xy)
 
static int png_XYZ_normalize (png_XYZ *XYZ)
 
static int png_colorspace_endpoints_match (const png_xy *xy1, const png_xy *xy2, int delta)
 
static int png_colorspace_check_xy (png_XYZ *XYZ, const png_xy *xy)
 
static int png_colorspace_check_XYZ (png_xy *xy, png_XYZ *XYZ)
 
static int png_colorspace_set_xy_and_XYZ (png_const_structrp png_ptr, png_colorspacerp colorspace, const png_xy *xy, const png_XYZ *XYZ, int preferred)
 
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_in, int preferred)
 
static char png_icc_tag_char (png_uint_32 byte)
 
static void png_icc_tag_name (char *name, png_uint_32 tag)
 
static int is_ICC_signature_char (png_alloc_size_t it)
 
static int is_ICC_signature (png_alloc_size_t it)
 
static int png_icc_profile_error (png_const_structrp png_ptr, png_colorspacerp colorspace, png_const_charp name, png_alloc_size_t value, png_const_charp reason)
 
int png_colorspace_set_sRGB (png_const_structrp png_ptr, png_colorspacerp colorspace, int intent)
 
static int icc_check_length (png_const_structrp png_ptr, png_colorspacerp colorspace, png_const_charp name, png_uint_32 profile_length)
 
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)
 
static int png_compare_ICC_profile_with_sRGB (png_const_structrp png_ptr, png_const_bytep profile, uLong adler)
 
void png_icc_set_sRGB (png_const_structrp png_ptr, png_colorspacerp colorspace, png_const_bytep profile, uLong adler)
 
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)
 
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)
 
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)
 
static double png_pow10 (int power)
 
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)
 
png_fixed_point png_fixed (png_const_structrp png_ptr, double fp, png_const_charp text)
 
int png_muldiv (png_fixed_point_p res, png_fixed_point a, png_int_32 times, png_int_32 divisor)
 
png_fixed_point png_muldiv_warn (png_const_structrp png_ptr, png_fixed_point a, png_int_32 times, png_int_32 divisor)
 
png_fixed_point png_reciprocal (png_fixed_point a)
 
int png_gamma_significant (png_fixed_point gamma_val)
 
static png_fixed_point png_product2 (png_fixed_point a, png_fixed_point b)
 
png_fixed_point png_reciprocal2 (png_fixed_point a, png_fixed_point b)
 
png_byte png_gamma_8bit_correct (unsigned int value, png_fixed_point gamma_val)
 
png_uint_16 png_gamma_16bit_correct (unsigned int value, png_fixed_point gamma_val)
 
png_uint_16 png_gamma_correct (png_structrp png_ptr, unsigned int value, png_fixed_point gamma_val)
 
static void png_build_16bit_table (png_structrp png_ptr, png_uint_16pp *ptable, const unsigned int shift, const png_fixed_point gamma_val)
 
static void png_build_16to8_table (png_structrp png_ptr, png_uint_16pp *ptable, const unsigned int shift, const png_fixed_point gamma_val)
 
static void png_build_8bit_table (png_structrp png_ptr, png_bytepp ptable, const png_fixed_point gamma_val)
 
void png_destroy_gamma_table (png_structrp png_ptr)
 
void png_build_gamma_table (png_structrp png_ptr, int bit_depth)
 
int png_set_option (png_structrp png_ptr, int option, int onoff)
 

Variables

static const png_xy sRGB_xy
 
static const png_byte D50_nCIEXYZ [12]
 
struct {
   png_uint_32   adler
 
   png_uint_32   crc
 
   png_uint_32   length
 
   png_uint_32   md5 [4]
 
   png_byte   have_md5
 
   png_byte   is_broken
 
   png_uint_16   intent
 
png_sRGB_checks []
 

Macro Definition Documentation

◆ GCC_STRICT_OVERFLOW

#define GCC_STRICT_OVERFLOW   0

Definition at line 36 of file png.c.

◆ png_fp_add

#define png_fp_add (   state,
  flags 
)    ((state) |= (flags))

Definition at line 2714 of file png.c.

◆ png_fp_set

#define png_fp_set (   state,
  value 
)    ((state) = (value) | ((state) & PNG_FP_STICKY))

Definition at line 2715 of file png.c.

◆ png_gt

#define png_gt (   a,
 
)    ((a) > (b))

Definition at line 2549 of file png.c.

◆ PNG_ICC_CHECKSUM

#define PNG_ICC_CHECKSUM (   adler,
  crc,
  md5,
  intent,
  broke,
  date,
  length,
  fname 
)    { adler, crc, length, md5, broke, intent },

Definition at line 2260 of file png.c.

◆ PNG_MD5

#define PNG_MD5 (   a,
  b,
  c,
 
)    { a, b, c, d }, (a!=0)||(b!=0)||(c!=0)||(d!=0)

Definition at line 2259 of file png.c.

Typedef Documentation

◆ Your_png_h_is_not_version_1_6_32

Function Documentation

◆ icc_check_length()

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

Definition at line 1976 of file png.c.

References png_icc_profile_error().

Referenced by png_colorspace_set_ICC(), and png_icc_check_length().

◆ is_ICC_signature()

static int is_ICC_signature ( png_alloc_size_t  it)
static

Definition at line 1820 of file png.c.

References is_ICC_signature_char().

Referenced by png_icc_profile_error().

◆ is_ICC_signature_char()

static int is_ICC_signature_char ( png_alloc_size_t  it)
static

Definition at line 1813 of file png.c.

Referenced by is_ICC_signature().

◆ png_access_version_number()

png_uint_32 png_access_version_number ( void  )

Definition at line 992 of file png.c.

References PNG_LIBPNG_VER.

◆ 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_16bit_table()

static void png_build_16bit_table ( png_structrp  png_ptr,
png_uint_16pp ptable,
const unsigned int  shift,
const png_fixed_point  gamma_val 
)
static

◆ png_build_16to8_table()

static void png_build_16to8_table ( png_structrp  png_ptr,
png_uint_16pp ptable,
const unsigned int  shift,
const png_fixed_point  gamma_val 
)
static

Definition at line 4055 of file png.c.

References png_calloc(), PNG_CONST, png_gamma_16bit_correct(), and png_malloc().

Referenced by png_build_gamma_table().

◆ png_build_8bit_table()

static void png_build_8bit_table ( png_structrp  png_ptr,
png_bytepp  ptable,
const png_fixed_point  gamma_val 
)
static

Definition at line 4123 of file png.c.

References png_gamma_8bit_correct(), png_gamma_significant(), and png_malloc().

Referenced by png_build_gamma_table().

◆ png_build_gamma_table()

◆ png_calculate_crc()

◆ 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_chunk_unknown_handling()

int png_chunk_unknown_handling ( png_const_structrp  png_ptr,
png_uint_32  chunk_name 
)

◆ png_colorspace_check_gamma()

static int png_colorspace_check_gamma ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
png_fixed_point  gAMA,
int  from 
)
static

◆ png_colorspace_check_xy()

static int png_colorspace_check_xy ( png_XYZ *  XYZ,
const png_xy *  xy 
)
static

◆ png_colorspace_check_XYZ()

static int png_colorspace_check_XYZ ( png_xy *  xy,
png_XYZ *  XYZ 
)
static

Definition at line 1650 of file png.c.

References png_colorspace_check_xy(), png_xy_from_XYZ(), and png_XYZ_normalize().

Referenced by png_colorspace_set_endpoints().

◆ png_colorspace_endpoints_match()

static int png_colorspace_endpoints_match ( const png_xy *  xy1,
const png_xy *  xy2,
int  delta 
)
static

◆ 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_in,
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_set_xy_and_XYZ()

static int png_colorspace_set_xy_and_XYZ ( png_const_structrp  png_ptr,
png_colorspacerp  colorspace,
const png_xy *  xy,
const png_XYZ *  XYZ,
int  preferred 
)
static

◆ 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_compare_ICC_profile_with_sRGB()

static int png_compare_ICC_profile_with_sRGB ( png_const_structrp  png_ptr,
png_const_bytep  profile,
uLong  adler 
)
static

◆ png_create_info_struct()

png_infop png_create_info_struct ( png_const_structrp  png_ptr)

Definition at line 354 of file png.c.

References png_debug, png_malloc_base(), and png_voidcast.

Referenced by main(), measure_idats(), png_image_read_init(), and png_image_write_init().

◆ png_create_png_struct()

◆ png_data_freer()

void png_data_freer ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
int  freer,
png_uint_32  mask 
)

◆ 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_info_struct()

void png_destroy_info_struct ( png_const_structrp  png_ptr,
png_infopp  info_ptr_ptr 
)

◆ png_fixed()

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

◆ png_free_data()

◆ png_gamma_16bit_correct()

png_uint_16 png_gamma_16bit_correct ( unsigned int  value,
png_fixed_point  gamma_val 
)

◆ png_gamma_8bit_correct()

png_byte png_gamma_8bit_correct ( unsigned int  value,
png_fixed_point  gamma_val 
)

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_val 
)

◆ png_gamma_significant()

◆ png_get_copyright()

png_const_charp png_get_copyright ( png_const_structrp  png_ptr)

Definition at line 811 of file png.c.

References PNG_STRING_NEWLINE, and PNG_UNUSED.

◆ png_get_header_ver()

png_const_charp png_get_header_ver ( png_const_structrp  png_ptr)

Definition at line 850 of file png.c.

References PNG_LIBPNG_VER_STRING, and PNG_UNUSED.

Referenced by png_get_libpng_ver(), and print_version_info().

◆ png_get_header_version()

png_const_charp png_get_header_version ( png_const_structrp  png_ptr)

Definition at line 858 of file png.c.

References PNG_HEADER_VERSION_STRING, PNG_STRING_NEWLINE, and PNG_UNUSED.

◆ png_get_io_ptr()

png_voidp png_get_io_ptr ( png_const_structrp  png_ptr)

Definition at line 686 of file png.c.

Referenced by pngcrush_default_read_data(), and pngcrush_default_write_data().

◆ png_get_libpng_ver()

png_const_charp png_get_libpng_ver ( png_const_structrp  png_ptr)

Definition at line 843 of file png.c.

References png_get_header_ver().

◆ png_handle_as_unknown()

int png_handle_as_unknown ( png_const_structrp  png_ptr,
png_const_bytep  chunk_name 
)

Definition at line 932 of file png.c.

References png_const_bytep, and PNG_HANDLE_CHUNK_AS_DEFAULT.

Referenced by png_chunk_unknown_handling(), and write_unknown_chunks().

◆ 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_profile_error()

◆ png_icc_set_sRGB()

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

◆ png_icc_tag_char()

static char png_icc_tag_char ( png_uint_32  byte)
static

Definition at line 1792 of file png.c.

Referenced by png_icc_tag_name().

◆ png_icc_tag_name()

static void png_icc_tag_name ( char *  name,
png_uint_32  tag 
)
static

Definition at line 1802 of file png.c.

References png_icc_tag_char().

Referenced by png_icc_profile_error().

◆ png_info_init_3()

void png_info_init_3 ( png_infopp  ptr_ptr,
png_size_t  png_info_struct_size 
)

Definition at line 425 of file png.c.

References free(), png_debug, png_malloc_base(), and png_voidcast.

◆ png_init_io()

void png_init_io ( png_structrp  png_ptr,
png_FILE_p  fp 
)

Definition at line 703 of file png.c.

References png_struct_def::io_ptr, and png_debug.

Referenced by main(), and measure_idats().

◆ png_muldiv()

◆ png_muldiv_warn()

png_fixed_point png_muldiv_warn ( png_const_structrp  png_ptr,
png_fixed_point  a,
png_int_32  times,
png_int_32  divisor 
)

Definition at line 3478 of file png.c.

References png_muldiv(), and png_warning().

◆ png_pow10()

static double png_pow10 ( int  power)
static

Definition at line 2864 of file png.c.

Referenced by png_ascii_from_fp().

◆ png_product2()

static png_fixed_point png_product2 ( png_fixed_point  a,
png_fixed_point  b 
)
static

Definition at line 3526 of file png.c.

References png_muldiv().

Referenced by png_build_gamma_table(), and png_reciprocal2().

◆ 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_reset_zstream()

int png_reset_zstream ( png_structrp  png_ptr)

Definition at line 980 of file png.c.

References inflateReset(), Z_STREAM_ERROR, and png_struct_def::zstream.

◆ png_save_int_32()

void png_save_int_32 ( png_bytep  buf,
png_int_32  i 
)

Definition at line 726 of file png.c.

References png_save_uint_32().

Referenced by png_write_cHRM_fixed(), png_write_oFFs(), and png_write_pCAL().

◆ png_set_option()

int png_set_option ( png_structrp  png_ptr,
int  option,
int  onoff 
)

Definition at line 4338 of file png.c.

References PNG_OPTION_INVALID, and PNG_OPTION_NEXT.

Referenced by main().

◆ png_set_sig_bytes()

void png_set_sig_bytes ( png_structrp  png_ptr,
int  num_bytes 
)

Definition at line 47 of file png.c.

References png_debug, png_error(), and png_struct_def::sig_bytes.

Referenced by main(), measure_idats(), and pngcrush_measure_idat().

◆ png_sig_cmp()

int png_sig_cmp ( png_const_bytep  sig,
png_size_t  start,
png_size_t  num_to_check 
)

Definition at line 74 of file png.c.

Referenced by main(), png_push_read_sig(), png_read_sig(), and pngcrush_measure_idat().

◆ png_user_version_check()

int png_user_version_check ( png_structrp  png_ptr,
png_const_charp  user_png_ver 
)

◆ png_xy_from_XYZ()

static int png_xy_from_XYZ ( png_xy *  xy,
const png_XYZ *  XYZ 
)
static

Definition at line 1239 of file png.c.

References PNG_FP_1, and png_muldiv().

Referenced by png_colorspace_check_xy(), and png_colorspace_check_XYZ().

◆ png_XYZ_from_xy()

static int png_XYZ_from_xy ( png_XYZ *  XYZ,
const png_xy *  xy 
)
static

Definition at line 1282 of file png.c.

References PNG_FP_1, png_muldiv(), and png_reciprocal().

Referenced by png_colorspace_check_xy().

◆ png_XYZ_normalize()

static int png_XYZ_normalize ( png_XYZ *  XYZ)
static

Definition at line 1548 of file png.c.

References PNG_FP_1, and png_muldiv().

Referenced by png_colorspace_check_XYZ().

◆ 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_zstream_error()

Variable Documentation

◆ adler

png_uint_32 adler

Definition at line 2253 of file png.c.

Referenced by adler32(), adler32_z(), png_compare_ICC_profile_with_sRGB(), and png_icc_set_sRGB().

◆ crc

png_uint_32 crc

◆ D50_nCIEXYZ

const png_byte D50_nCIEXYZ[12]
static
Initial value:
=
{ 0x00, 0x00, 0xf6, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d }

Definition at line 1972 of file png.c.

Referenced by png_icc_check_header().

◆ have_md5

png_byte have_md5

Definition at line 2255 of file png.c.

Referenced by png_compare_ICC_profile_with_sRGB().

◆ intent

png_uint_16 intent

◆ is_broken

png_byte is_broken

Definition at line 2256 of file png.c.

Referenced by png_compare_ICC_profile_with_sRGB().

◆ length

◆ md5

png_uint_32 md5[4]

Definition at line 2254 of file png.c.

◆ png_sRGB_checks

const { ... } png_sRGB_checks[]

◆ sRGB_xy

const png_xy sRGB_xy
static
Initial value:
=
{
64000, 33000,
30000, 60000,
15000, 6000,
31270, 32900
}

Definition at line 1668 of file png.c.

Referenced by png_colorspace_set_sRGB(), and png_colorspace_set_xy_and_XYZ().