fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("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 APPEND_STRING(string)   pos = png_safecat(out, 29, pos, (string))
 
#define APPEND_NUMBER(format, value)   APPEND_STRING(PNG_FORMAT_NUMBER(number_buf, format, (value)))
 
#define APPEND(ch)   if (pos < 28) out[pos++] = (ch)
 
#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_16 Your_png_h_is_not_version_1_6_16
 

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)
 
int png_convert_to_rfc1123_buffer (char out[29], png_const_timep ptime)
 
png_const_charp png_convert_to_rfc1123 (png_structrp png_ptr, png_const_timep ptime)
 
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)
 
void png_build_grayscale_palette (int bit_depth, png_colorp palette)
 
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)
 
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)
 
static int png_image_free_function (png_voidp argument)
 
void png_image_free (png_imagep image)
 
int png_image_error (png_imagep image, png_const_charp error_message)
 

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 []
 
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

◆ APPEND

#define APPEND (   ch)    if (pos < 28) out[pos++] = (ch)

◆ APPEND_NUMBER

#define APPEND_NUMBER (   format,
  value 
)    APPEND_STRING(PNG_FORMAT_NUMBER(number_buf, format, (value)))

◆ APPEND_STRING

#define APPEND_STRING (   string)    pos = png_safecat(out, 29, pos, (string))

◆ png_fp_add

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

Definition at line 2639 of file png.c.

◆ png_fp_set

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

Definition at line 2640 of file png.c.

◆ png_gt

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

Definition at line 2472 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 2180 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 2179 of file png.c.

Typedef Documentation

◆ Your_png_h_is_not_version_1_6_16

Function Documentation

◆ is_ICC_signature()

static int is_ICC_signature ( png_alloc_size_t  it)
static

Definition at line 1775 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 1768 of file png.c.

Referenced by is_ICC_signature().

◆ png_access_version_number()

png_uint_32 png_access_version_number ( void  )

Definition at line 944 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 3141 of file png.c.

References first, and 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 2826 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 3937 of file png.c.

References last, max(), png_calloc(), PNG_CONST, png_gamma_16bit_correct(), png_malloc(), and table.

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 4005 of file png.c.

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

Referenced by png_build_gamma_table().

◆ png_build_gamma_table()

◆ png_build_grayscale_palette()

void png_build_grayscale_palette ( int  bit_depth,
png_colorp  palette 
)

◆ 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 2770 of file png.c.

References png_check_fp_number(), and state.

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 1603 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 2398 of file png.c.

References b, 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 1175 of file png.c.

References NULL, and 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_convert_to_rfc1123()

png_const_charp png_convert_to_rfc1123 ( png_structrp  png_ptr,
png_const_timep  ptime 
)

Definition at line 744 of file png.c.

References NULL, png_convert_to_rfc1123_buffer(), png_warning(), and ptime.

◆ png_convert_to_rfc1123_buffer()

int png_convert_to_rfc1123_buffer ( char  out[29],
png_const_timep  ptime 
)

◆ png_create_info_struct()

png_infop png_create_info_struct ( png_const_structrp  png_ptr)

◆ 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 4024 of file png.c.

References NULL, and 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 3752 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 764 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 802 of file png.c.

References PNG_LIBPNG_VER_STRING, and PNG_UNUSED.

Referenced by png_get_libpng_ver().

◆ png_get_header_version()

png_const_charp png_get_header_version ( png_const_structrp  png_ptr)

Definition at line 810 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 641 of file png.c.

References NULL.

◆ png_get_libpng_ver()

png_const_charp png_get_libpng_ver ( png_const_structrp  png_ptr)

Definition at line 795 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 884 of file png.c.

References NULL, p, 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 1931 of file png.c.

References name, and png_icc_profile_error().

Referenced by png_colorspace_set_ICC(), and 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 2125 of file png.c.

References name, NULL, 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 1747 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 1757 of file png.c.

References name, and png_icc_tag_char().

Referenced by png_icc_profile_error().

◆ png_image_error()

◆ png_image_free()

◆ png_image_free_function()

◆ png_info_init_3()

void png_info_init_3 ( png_infopp  ptr_ptr,
png_size_t  png_info_struct_size 
)

Definition at line 398 of file png.c.

References free(), NULL, 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 658 of file png.c.

References png_struct_def::io_ptr, NULL, and png_debug.

Referenced by Fl_PNG_Image::load_png_(), and save_template_cb().

◆ 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 3363 of file png.c.

References png_muldiv(), and png_warning().

Referenced by png_fixed_inches_from_microns().

◆ png_pow10()

static double png_pow10 ( int  power)
static

Definition at line 2789 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 3411 of file png.c.

References b, and 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 3434 of file png.c.

References b, 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 932 of file png.c.

References inflateReset(), NULL, 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 677 of file png.c.

References buf.

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 4217 of file png.c.

References NULL, PNG_OPTION_INVALID, and PNG_OPTION_NEXT.

◆ png_set_sig_bytes()

void png_set_sig_bytes ( png_structrp  png_ptr,
int  num_bytes 
)

Definition at line 27 of file png.c.

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

◆ png_sig_cmp()

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

Definition at line 49 of file png.c.

References start().

Referenced by png_push_read_sig(), and png_read_sig().

◆ 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 1193 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 1236 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 1501 of file png.c.

References PNG_FP_1, png_muldiv(), and Y.

Referenced by png_colorspace_check_XYZ().

◆ png_zalloc()

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

Definition at line 73 of file png.c.

References NULL, 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 93 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 2173 of file png.c.

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

◆ crc

png_uint_32 crc

Definition at line 2173 of file png.c.

Referenced by crc32(), png_calculate_crc(), png_compare_ICC_profile_with_sRGB(), and png_crc_error().

◆ 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 1927 of file png.c.

Referenced by png_icc_check_header().

◆ have_md5

png_byte have_md5

Definition at line 2175 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 2176 of file png.c.

Referenced by png_compare_ICC_profile_with_sRGB().

◆ length

png_uint_32 length

Definition at line 2173 of file png.c.

Referenced by Fl_Text_Buffer::append(), Fl_Text_Buffer::appendfile(), emit_dac(), emit_dht(), expand_buffer(), Fl_Text_Display::find_line_end(), Fl_Text_Display::find_wrap_range(), fl_filename_isdir(), Fl_GIF_Image::Fl_GIF_Image(), fl_utf8from_mb(), fl_utf8to_mb(), get_dac(), get_dht(), get_dqt(), get_dri(), get_interesting_appn(), get_lse(), get_sof(), get_sos(), Fl_Text_Display::handle(), Fl_Text_Display::line_end(), Fl_Text_Buffer::loadfile(), Fl_Text_Display::next_word(), png_cache_unknown_chunk(), png_calculate_crc(), png_compare_ICC_profile_with_sRGB(), png_crc_read(), png_default_read_data(), png_default_write_data(), png_handle_bKGD(), png_handle_cHRM(), png_handle_gAMA(), png_handle_hIST(), png_handle_iCCP(), png_handle_IEND(), 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_push_fill_buffer(), png_read_chunk_header(), png_read_data(), png_read_end(), png_read_info(), png_set_iCCP(), png_set_pCAL(), png_set_sPLT(), png_write_chunk(), png_write_chunk_data(), png_write_chunk_header(), png_write_chunk_start(), png_write_complete_chunk(), png_write_data(), Fl_Text_Display::position_to_line(), Fl_Text_Display::position_to_xy(), read_fdesign_line(), read_word(), Fl_Text_Display::resize(), save_marker(), Fl_Text_Buffer::savefile(), Fl_Text_Display::skip_lines(), skip_variable(), storestring(), Fl_Text_Display::string_width(), CodeEditor::style_parse(), tr_static_init(), Fl_Text_Display::wrap_mode(), Fl_Text_Display::wrap_uses_character(), write_cdata(), and write_cstring().

◆ md5

png_uint_32 md5[4]

Definition at line 2174 of file png.c.

◆ png_sRGB_base

const png_uint_16 png_sRGB_base[512]

Definition at line 4298 of file png.c.

◆ png_sRGB_checks

const { ... } png_sRGB_checks[]

◆ png_sRGB_delta

const png_byte png_sRGB_delta[512]

Definition at line 4366 of file png.c.

◆ png_sRGB_table

const png_uint_16 png_sRGB_table[256]

◆ sRGB_xy

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

Definition at line 1621 of file png.c.

Referenced by png_colorspace_set_sRGB(), and png_colorspace_set_xy_and_XYZ().