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)  

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

Go to the source code of this file.

Functions

void png_set_bKGD (png_const_structrp png_ptr, png_inforp info_ptr, png_const_color_16p background)
 
void png_set_cHRM_fixed (png_const_structrp png_ptr, png_inforp info_ptr, png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, png_fixed_point blue_y)
 
void png_set_cHRM_XYZ_fixed (png_const_structrp png_ptr, png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y, png_fixed_point int_red_Z, png_fixed_point int_green_X, png_fixed_point int_green_Y, png_fixed_point int_green_Z, png_fixed_point int_blue_X, png_fixed_point int_blue_Y, png_fixed_point int_blue_Z)
 
void png_set_cHRM (png_const_structrp png_ptr, png_inforp info_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)
 
void png_set_cHRM_XYZ (png_const_structrp png_ptr, png_inforp info_ptr, double red_X, double red_Y, double red_Z, double green_X, double green_Y, double green_Z, double blue_X, double blue_Y, double blue_Z)
 
void png_set_eXIf (png_const_structrp png_ptr, png_inforp info_ptr, const png_bytep eXIf_buf)
 
void png_set_eXIf_1 (png_const_structrp png_ptr, png_inforp info_ptr, const png_uint_32 num_exif, const png_bytep eXIf_buf)
 
void png_set_gAMA_fixed (png_const_structrp png_ptr, png_inforp info_ptr, png_fixed_point file_gamma)
 
void png_set_gAMA (png_const_structrp png_ptr, png_inforp info_ptr, double file_gamma)
 
void png_set_hIST (png_const_structrp png_ptr, png_inforp info_ptr, png_const_uint_16p hist)
 
void png_set_IHDR (png_const_structrp png_ptr, png_inforp info_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_set_oFFs (png_const_structrp png_ptr, png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)
 
void png_set_pCAL (png_const_structrp png_ptr, png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_const_charp units, png_charpp params)
 
void png_set_sCAL_s (png_const_structrp png_ptr, png_inforp info_ptr, int unit, png_const_charp swidth, png_const_charp sheight)
 
void png_set_sCAL (png_const_structrp png_ptr, png_inforp info_ptr, int unit, double width, double height)
 
void png_set_sCAL_fixed (png_const_structrp png_ptr, png_inforp info_ptr, int unit, png_fixed_point width, png_fixed_point height)
 
void png_set_pHYs (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)
 
void png_set_PLTE (png_structrp png_ptr, png_inforp info_ptr, png_const_colorp palette, int num_palette)
 
void png_set_sBIT (png_const_structrp png_ptr, png_inforp info_ptr, png_const_color_8p sig_bit)
 
void png_set_sRGB (png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent)
 
void png_set_sRGB_gAMA_and_cHRM (png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent)
 
void png_set_iCCP (png_const_structrp png_ptr, png_inforp info_ptr, png_const_charp name, int compression_type, png_const_bytep profile, png_uint_32 proflen)
 
void png_set_text (png_const_structrp png_ptr, png_inforp info_ptr, png_const_textp text_ptr, int num_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_set_tIME (png_const_structrp png_ptr, png_inforp info_ptr, png_const_timep mod_time)
 
void png_set_tRNS (png_structrp png_ptr, png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, png_const_color_16p trans_color)
 
void png_set_sPLT (png_const_structrp png_ptr, png_inforp info_ptr, png_const_sPLT_tp entries, int nentries)
 
static png_byte check_location (png_const_structrp png_ptr, int location)
 
void png_set_unknown_chunks (png_const_structrp png_ptr, png_inforp info_ptr, png_const_unknown_chunkp unknowns, int num_unknowns)
 
void png_set_unknown_chunk_location (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location)
 
png_uint_32 png_permit_mng_features (png_structrp png_ptr, png_uint_32 mng_features)
 
static unsigned int add_one_chunk (png_bytep list, unsigned int count, png_const_bytep add, int keep)
 
void png_set_keep_unknown_chunks (png_structrp png_ptr, int keep, png_const_bytep chunk_list, int num_chunks_in)
 
void png_set_read_user_chunk_fn (png_structrp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)
 
void png_set_rows (png_const_structrp png_ptr, png_inforp info_ptr, png_bytepp row_pointers)
 
void png_set_compression_buffer_size (png_structrp png_ptr, png_size_t size)
 
void png_set_invalid (png_const_structrp png_ptr, png_inforp info_ptr, int mask)
 
void png_set_user_limits (png_structrp png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)
 
void png_set_chunk_cache_max (png_structrp png_ptr, png_uint_32 user_chunk_cache_max)
 
void png_set_chunk_malloc_max (png_structrp png_ptr, png_alloc_size_t user_chunk_malloc_max)
 
void png_set_benign_errors (png_structrp png_ptr, int allowed)
 
void png_set_check_for_invalid_index (png_structrp png_ptr, int allowed)
 
png_uint_32 png_check_keyword (png_structrp png_ptr, png_const_charp key, png_bytep new_key)
 

Function Documentation

◆ add_one_chunk()

static unsigned int add_one_chunk ( png_bytep  list,
unsigned int  count,
png_const_bytep  add,
int  keep 
)
static

Definition at line 1344 of file pngset.c.

References PNG_HANDLE_CHUNK_AS_DEFAULT.

Referenced by png_set_keep_unknown_chunks().

◆ check_location()

static png_byte check_location ( png_const_structrp  png_ptr,
int  location 
)
static

◆ png_check_keyword()

◆ png_permit_mng_features()

png_uint_32 png_permit_mng_features ( png_structrp  png_ptr,
png_uint_32  mng_features 
)

Definition at line 1329 of file pngset.c.

References PNG_ALL_MNG_FEATURES, and png_debug.

Referenced by main().

◆ png_set_benign_errors()

void png_set_benign_errors ( png_structrp  png_ptr,
int  allowed 
)

◆ png_set_bKGD()

void png_set_bKGD ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_const_color_16p  background 
)

Definition at line 25 of file pngset.c.

References png_debug1, PNG_INFO_bKGD, and png_info_def::valid.

Referenced by main(), and png_handle_bKGD().

◆ png_set_check_for_invalid_index()

void png_set_check_for_invalid_index ( png_structrp  png_ptr,
int  allowed 
)

Definition at line 1701 of file pngset.c.

References png_debug.

Referenced by main().

◆ png_set_cHRM()

void png_set_cHRM ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
double  white_x,
double  white_y,
double  red_x,
double  red_y,
double  green_x,
double  green_y,
double  blue_x,
double  blue_y 
)

Definition at line 102 of file pngset.c.

References png_fixed(), and png_set_cHRM_fixed().

Referenced by main().

◆ png_set_cHRM_fixed()

void png_set_cHRM_fixed ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_fixed_point  white_x,
png_fixed_point  white_y,
png_fixed_point  red_x,
png_fixed_point  red_y,
png_fixed_point  green_x,
png_fixed_point  green_y,
png_fixed_point  blue_x,
png_fixed_point  blue_y 
)

◆ png_set_cHRM_XYZ()

void png_set_cHRM_XYZ ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
double  red_X,
double  red_Y,
double  red_Z,
double  green_X,
double  green_Y,
double  green_Z,
double  blue_X,
double  blue_Y,
double  blue_Z 
)

Definition at line 118 of file pngset.c.

References png_fixed(), and png_set_cHRM_XYZ_fixed().

◆ png_set_cHRM_XYZ_fixed()

void png_set_cHRM_XYZ_fixed ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_fixed_point  int_red_X,
png_fixed_point  int_red_Y,
png_fixed_point  int_red_Z,
png_fixed_point  int_green_X,
png_fixed_point  int_green_Y,
png_fixed_point  int_green_Z,
png_fixed_point  int_blue_X,
png_fixed_point  int_blue_Y,
png_fixed_point  int_blue_Z 
)

Definition at line 69 of file pngset.c.

References png_colorspace_set_endpoints(), png_colorspace_sync_info(), and png_debug1.

Referenced by png_set_cHRM_XYZ().

◆ png_set_chunk_cache_max()

void png_set_chunk_cache_max ( png_structrp  png_ptr,
png_uint_32  user_chunk_cache_max 
)

Definition at line 1652 of file pngset.c.

Referenced by main().

◆ png_set_chunk_malloc_max()

void png_set_chunk_malloc_max ( png_structrp  png_ptr,
png_alloc_size_t  user_chunk_malloc_max 
)

Definition at line 1660 of file pngset.c.

Referenced by main().

◆ png_set_compression_buffer_size()

void png_set_compression_buffer_size ( png_structrp  png_ptr,
png_size_t  size 
)

◆ png_set_eXIf()

void png_set_eXIf ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
const png_bytep  eXIf_buf 
)

Definition at line 139 of file pngset.c.

References PNG_UNUSED, and png_warning().

◆ png_set_eXIf_1()

void png_set_eXIf_1 ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
const png_uint_32  num_exif,
const png_bytep  eXIf_buf 
)

◆ png_set_gAMA()

void png_set_gAMA ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
double  file_gamma 
)

Definition at line 200 of file pngset.c.

References png_fixed(), and png_set_gAMA_fixed().

Referenced by main().

◆ png_set_gAMA_fixed()

void png_set_gAMA_fixed ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_fixed_point  file_gamma 
)

◆ png_set_hIST()

◆ png_set_iCCP()

◆ png_set_IHDR()

void png_set_IHDR ( png_const_structrp  png_ptr,
png_inforp  info_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_set_invalid()

void png_set_invalid ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
int  mask 
)

Definition at line 1626 of file pngset.c.

References png_info_def::valid.

◆ png_set_keep_unknown_chunks()

void png_set_keep_unknown_chunks ( png_structrp  png_ptr,
int  keep,
png_const_bytep  chunk_list,
int  num_chunks_in 
)

◆ png_set_oFFs()

void png_set_oFFs ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_int_32  offset_x,
png_int_32  offset_y,
int  unit_type 
)

Definition at line 295 of file pngset.c.

References png_debug1, PNG_INFO_oFFs, and png_info_def::valid.

Referenced by main(), and png_handle_oFFs().

◆ png_set_pCAL()

void png_set_pCAL ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_const_charp  purpose,
png_int_32  X0,
png_int_32  X1,
int  type,
int  nparams,
png_const_charp  units,
png_charpp  params 
)

◆ png_set_pHYs()

void png_set_pHYs ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_uint_32  res_x,
png_uint_32  res_y,
int  unit_type 
)

Definition at line 556 of file pngset.c.

References png_debug1, PNG_INFO_pHYs, and png_info_def::valid.

Referenced by main(), and png_handle_pHYs().

◆ png_set_PLTE()

◆ png_set_read_user_chunk_fn()

void png_set_read_user_chunk_fn ( png_structrp  png_ptr,
png_voidp  user_chunk_ptr,
png_user_chunk_ptr  read_user_chunk_fn 
)

Definition at line 1531 of file pngset.c.

References png_debug.

◆ png_set_rows()

void png_set_rows ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_bytepp  row_pointers 
)

Definition at line 1546 of file pngset.c.

References png_debug1, png_free_data(), PNG_FREE_ROWS, PNG_INFO_IDAT, and png_info_def::valid.

◆ png_set_sBIT()

void png_set_sBIT ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_const_color_8p  sig_bit 
)

Definition at line 638 of file pngset.c.

References png_debug1, PNG_INFO_sBIT, and png_info_def::valid.

Referenced by main(), and png_handle_sBIT().

◆ png_set_sCAL()

void png_set_sCAL ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
int  unit,
double  width,
double  height 
)

◆ png_set_sCAL_fixed()

void png_set_sCAL_fixed ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
int  unit,
png_fixed_point  width,
png_fixed_point  height 
)

◆ png_set_sCAL_s()

◆ png_set_sPLT()

◆ png_set_sRGB()

void png_set_sRGB ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
int  srgb_intent 
)

Definition at line 653 of file pngset.c.

References png_colorspace_set_sRGB(), png_colorspace_sync_info(), and png_debug1.

Referenced by main(), and png_image_write_main().

◆ png_set_sRGB_gAMA_and_cHRM()

void png_set_sRGB_gAMA_and_cHRM ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
int  srgb_intent 
)

Definition at line 665 of file pngset.c.

References png_colorspace_set_sRGB(), png_colorspace_sync_info(), and png_debug1.

◆ png_set_text()

void png_set_text ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_const_textp  text_ptr,
int  num_text 
)

Definition at line 762 of file pngset.c.

References png_error(), and png_set_text_2().

Referenced by main().

◆ png_set_text_2()

◆ png_set_tIME()

void png_set_tIME ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
png_const_timep  mod_time 
)

Definition at line 968 of file pngset.c.

References png_debug1, PNG_INFO_tIME, png_warning(), PNG_WROTE_tIME, and png_info_def::valid.

Referenced by main(), and png_handle_tIME().

◆ png_set_tRNS()

◆ png_set_unknown_chunk_location()

void png_set_unknown_chunk_location ( png_const_structrp  png_ptr,
png_inforp  info_ptr,
int  chunk,
int  location 
)

Definition at line 1299 of file pngset.c.

References check_location(), PNG_AFTER_IDAT, png_app_error(), PNG_HAVE_IDAT, PNG_HAVE_IHDR, and PNG_HAVE_PLTE.

Referenced by main().

◆ png_set_unknown_chunks()

◆ png_set_user_limits()

void png_set_user_limits ( png_structrp  png_ptr,
png_uint_32  user_width_max,
png_uint_32  user_height_max 
)

Definition at line 1636 of file pngset.c.

Referenced by main().