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)  

pngcrush.c File Reference
#include <time.h>
#include <png.h>
#include <zlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <utime.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include "cexcept.h"
Include dependency graph for pngcrush.c:

Go to the source code of this file.

Data Structures

struct  options_help
 
struct  exception_context
 
struct  memory_information
 

Macros

#define PNGCRUSH_VERSION   "1.8.13"
 
#define PNGCRUSH_LARGE
 
#define PNGCRUSH_ROWBYTES(pixel_bits, width)
 
#define PNGCRUSH_TIMERS   4
 
#define _POSIX_C_SOURCE   199309L /* for clock_gettime */
 
#define CLOCKS_PER_SEC   1000
 
#define TIME_T   float
 
#define PNGCRUSH_USING_CLOCK   "clock()"
 
#define PNGCRUSH_TIMER_UINT_API   extern unsigned int PNGAPI
 
#define PNGCRUSH_TIMER_VOID_API   extern void PNGAPI
 
#define PNGCRUSH_TIMER_DECODE   1
 
#define PNGCRUSH_TIMER_ENCODE   2
 
#define PNGCRUSH_TIMER_MISC   3
 
#define PNGCRUSH_TIMER_TOTAL   0
 
#define PNGCRUSH_LIBPNG_VER   PNG_LIBPNG_VER
 
#define PNGCRUSH_UNUSED(param)   (void)param;
 
#define pngcrush_get_uint_31   png_get_uint_31
 
#define pngcrush_get_uint_32   png_get_uint_32
 
#define pngcrush_save_uint_32   png_save_uint_32
 
#define PNG_ABORT()   abort()
 
#define png_memcmp   memcmp /* SJT: added */
 
#define png_memcpy   memcpy
 
#define png_memset   memset
 
#define PNG_IDAT   const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'}
 
#define PNG_IHDR   const png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'}
 
#define PNG_acTL   const png_byte png_acTL[5] = { 97, 99, 84, 76, '\0'}
 
#define PNG_dSIG   const png_byte png_dSIG[5] = {100, 83, 73, 71, '\0'}
 
#define PNG_fcTL   const png_byte png_fcTL[5] = {102, 99, 84, 76, '\0'}
 
#define PNG_fdAT   const png_byte png_fdAT[5] = {102, 100, 65, 84, '\0'}
 
#define PNG_iCCP   const png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'}
 
#define PNG_IEND   const png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'}
 
#define PNG_UINT_32_NAME(a, b, c, d)
 
#define PNG_UINT_IHDR   PNG_UINT_32_NAME(73, 72, 68, 82)
 
#define PNG_UINT_IDAT   PNG_UINT_32_NAME(73, 68, 65, 84)
 
#define PNG_UINT_IEND   PNG_UINT_32_NAME(73, 69, 78, 68)
 
#define PNG_UINT_PLTE   PNG_UINT_32_NAME(80, 76, 84, 69)
 
#define PNG_UINT_bKGD   PNG_UINT_32_NAME(98, 75, 71, 68)
 
#define PNG_UINT_CgBI   PNG_UINT_32_NAME(67,103, 66, 73)
 
#define PNG_UINT_acTL   PNG_UINT_32_NAME(97, 99, 84, 76)
 
#define PNG_UINT_fcTL   PNG_UINT_32_NAME(102, 99, 84, 76)
 
#define PNG_UINT_fdAT   PNG_UINT_32_NAME(102,100, 65, 84)
 
#define PNG_UINT_cHRM   PNG_UINT_32_NAME(99, 72, 82, 77)
 
#define PNG_UINT_dSIG   PNG_UINT_32_NAME(100, 83, 73, 71)
 
#define PNG_UINT_gAMA   PNG_UINT_32_NAME(103, 65, 77, 65)
 
#define PNG_UINT_hIST   PNG_UINT_32_NAME(104, 73, 83, 84)
 
#define PNG_UINT_iCCP   PNG_UINT_32_NAME(105, 67, 67, 80)
 
#define PNG_UINT_iTXt   PNG_UINT_32_NAME(105, 84, 88, 116)
 
#define PNG_UINT_oFFs   PNG_UINT_32_NAME(111, 70, 70, 115)
 
#define PNG_UINT_pCAL   PNG_UINT_32_NAME(112, 67, 65, 76)
 
#define PNG_UINT_pHYs   PNG_UINT_32_NAME(112, 72, 89, 115)
 
#define PNG_UINT_sBIT   PNG_UINT_32_NAME(115, 66, 73, 84)
 
#define PNG_UINT_sCAL   PNG_UINT_32_NAME(115, 67, 65, 76)
 
#define PNG_UINT_sPLT   PNG_UINT_32_NAME(115, 80, 76, 84)
 
#define PNG_UINT_sRGB   PNG_UINT_32_NAME(115, 82, 71, 66)
 
#define PNG_UINT_sTER   PNG_UINT_32_NAME(115, 84, 69, 82)
 
#define PNG_UINT_tEXt   PNG_UINT_32_NAME(116, 69, 88, 116)
 
#define PNG_UINT_tIME   PNG_UINT_32_NAME(116, 73, 77, 69)
 
#define PNG_UINT_tRNS   PNG_UINT_32_NAME(116, 82, 78, 83)
 
#define PNG_UINT_zTXt   PNG_UINT_32_NAME(122, 84, 88, 116)
 
#define PNG_FLAG_CRC_ANCILLARY_USE   0x0100
 
#define PNG_FLAG_CRC_ANCILLARY_NOWARN   0x0200
 
#define PNG_FLAG_CRC_CRITICAL_USE   0x0400
 
#define PNG_FLAG_CRC_CRITICAL_IGNORE   0x0800
 
#define PNG_FLAG_CRC_ANCILLARY_MASK
 
#define PNG_PACK   0x0004
 
#define PNG_DITHER   0x0040
 
#define PNG_BACKGROUND   0x0080
 
#define PNG_16_TO_8   0x0400
 
#define PNG_RGBA   0x0800
 
#define PNG_EXPAND   0x1000
 
#define PNG_GAMMA   0x2000
 
#define PNG_GRAY_TO_RGB   0x4000
 
#define PNG_FILLER   0x8000L
 
#define PNG_USER_TRANSFORM   0x100000L
 
#define PNG_RGB_TO_GRAY   0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */
 
#define STDERR   stderr
 
#define PNGCRUSH_LOCO
 
#define SLASH   "/"
 
#define DOT   "."
 
#define BACK_SLASH   "\\"
 
#define FWD_SLASH   "/"
 
#define GAS_VERSION   "2.9.5(?)" /* used only in help/usage screen */
 
#define DEFAULT_MODE   0
 
#define DIRECTORY_MODE   1
 
#define EXTENSION_MODE   2
 
#define DIREX_MODE   3
 
#define OVERWRITE_MODE   4
 
#define FOPEN(file, how)   fopen(file, how)
 
#define FCLOSE(file)   {fclose(file); file=NULL;--number_of_open_files;};
 
#define P0   if(last_trial && verbose > 0)printf
 
#define P1   if(verbose > 1)printf
 
#define P2   if(verbose > 2)printf
 
#define STRNGIFY_STAGE1(x)   #x
 
#define STRNGIFY(x)   STRNGIFY_STAGE1(x)
 
#define STR_BUF_SIZE   2048
 
#define MAX_IDAT_SIZE   524288L
 
#define MAX_METHODS   177
 
#define MAX_METHODSP1   (MAX_METHODS+1)
 
#define DEFAULT_METHODS   10
 
#define FAKE_PAUSE_STRING   "P"
 
#define NUM_STRATEGIES   4
 
#define setfiletype(x)
 
#define pngcrush_get_long   strtol(argv[i],&endptr,10)
 
#define pngcrush_check_long
 
#define BUMP_I
 
#define PNGCRUSH_a   97
 
#define PNGCRUSH_z   122
 
#define PNGCRUSH_A   65
 
#define PNGCRUSH_Z   90
 
#define BUNDLED_LIB   "system"
 

Typedefs

typedef struct memory_information memory_information
 
typedef memory_informationmemory_infop
 

Functions

unsigned int pngcrush_timer_get_seconds (unsigned int n)
 
unsigned int pngcrush_timer_get_hits (unsigned int n)
 
unsigned int pngcrush_timer_get_nanoseconds (unsigned int n)
 
void pngcrush_timer_reset (unsigned int n)
 
void pngcrush_timer_start (unsigned int n)
 
void pngcrush_timer_stop (unsigned int n)
 
png_uint_32 measure_idats (FILE *fp)
 
png_uint_32 pngcrush_measure_idat (png_structp png_ptr)
 
static void pngcrush_cexcept_error (png_structp png_ptr, png_const_charp message)
 
static void pngcrush_warning (png_structp png_ptr, png_const_charp message)
 
void pngcrush_default_read_data (png_structp png_ptr, png_bytep data, png_size_t length)
 
void pngcrush_default_write_data (png_structp png_ptr, png_bytep data, png_size_t length)
 
void pngcrush_write_png (png_structp write_pointer, png_bytep data, png_size_t length)
 
png_voidp pngcrush_debug_malloc (png_structp png_ptr, png_uint_32 size)
 
void pngcrush_debug_free (png_structp png_ptr, png_voidp ptr)
 
void pngcrush_pause (void)
 
int keep_unknown_chunk (png_const_charp name, char *argv[])
 
int keep_chunk (png_const_charp name, char *argv[])
 
void show_result (void)
 
void print_version_info (void)
 
void print_usage (int retval)
 
png_uint_32 pngcrush_get_uint_32 (png_bytep buf)
 
png_uint_32 pngcrush_get_uint_31 (png_structp png_ptr, png_bytep buf)
 
void pngcrush_save_uint_32 (png_bytep buf, png_uint_32 i)
 
void pngcrush_reset_crc (png_structp png_ptr)
 
void pngcrush_calculate_crc (png_structp png_ptr, png_bytep ptr, png_size_t length)
 
void pngcrush_crc_read (png_structp png_ptr, png_bytep buf, png_size_t length)
 
int pngcrush_crc_error (png_structp png_ptr)
 
int pngcrush_crc_finish (png_structp png_ptr, png_uint_32 skip)
 
void png_skip_chunk (png_structp png_ptr)
 
static void pngcrush_flush (png_structp png_ptr)
 
void pngcrush_examine_pixels_fn (png_structp png_ptr, png_row_infop row_info, png_bytep data)
 
void pngcrush_transform_pixels_fn (png_structp png_ptr, png_row_infop row_info, png_bytep data)
 
int main (int argc, char *argv[])
 

Variables

static int verbose = 0
 
static int show_warnings = 0
 
static int copy_idat = 0
 
static unsigned int pngcrush_timer_hits [4]
 
static unsigned int pngcrush_timer_secs [4]
 
static unsigned int pngcrush_timer_nsec [4]
 
static unsigned int pngcrush_clock_secs [4]
 
static unsigned int pngcrush_clock_nsec [4]
 
static unsigned long pngcrush_timer_min_secs [4]
 
static unsigned long pngcrush_timer_min_nsec [4]
 
png_uint_32 pngcrush_crc
 
static const char * progname
 
static const char * inname = "pngtest" "." "png"
 
static const char * outname = "pngout" "." "png"
 
static const char * mngname = "mngout" "." "mng"
 
static const char * directory_name = "pngcrush" "." "bak"
 
static const char * extension = "_C" "." "png"
 
static png_uint_32 width
 
static png_uint_32 height
 
static png_uint_32 measured_idat_length
 
static int found_bKGD = 0
 
static int found_color_bKGD = 0
 
static int found_cHRM = 0
 
static int found_gAMA = 0
 
static int found_hIST = 0
 
static int found_iCCP = 0
 
static int found_IDAT = 0
 
static int found_sBIT = 0
 
static int found_sBIT_max = 0
 
static int found_sBIT_different_RGB_bits = 0
 
static int found_sRGB = 0
 
static int found_tRNS = 0
 
static int premultiply = 0
 
static int printed_version_info = 0
 
static int interlace_method = 0
 
png_alloc_size_t max_bytes
 
static int found_CgBI = 0
 
static int found_any_chunk = 0
 
static int save_apng_chunks = 0
 
static int found_acTL_chunk = 0
 
static int image_is_immutable = 0
 
static int pngcrush_must_exit = 0
 
static int all_chunks_are_safe = 0
 
static int number_of_open_files
 
static int do_pplt = 0
 
char pplt_string [2048]
 
char * ip
 
char * op
 
char * dot
 
char in_string [2048]
 
char prog_string [2048]
 
char out_string [2048]
 
char in_extension [2048]
 
static int text_inputs = 0
 
int text_where [10]
 
int text_compression [10]
 
char text_text [11 *2048+1]
 
char text_keyword [11 *80+1]
 
char text_lang [881]
 
char text_lang_key [881]
 
int iccp_length = 0
 
char * iccp_text
 
char * iccp_file
 
char iccp_name [80]
 
int best
 
char buffer [256]
 
struct exception_context the_exception_context [1]
 
png_const_charp msg
 
static png_uint_32 input_length
 
static png_uint_32 total_input_length = 0
 
static png_uint_32 total_output_length = 0
 
static int pngcrush_mode = 0
 
static int resolution = 0
 
static int remove_chunks = 0
 
static int output_color_type
 
static int output_bit_depth
 
static int force_output_color_type = 8
 
static int force_output_bit_depth = 0
 
static int input_color_type
 
static int input_bit_depth
 
static int trial
 
static int last_trial = 0
 
static png_uint_32 pngcrush_write_byte_count
 
static png_uint_32 pngcrush_best_byte_count =0xffffffff
 
static int salvage = 0
 
static int bail = 0
 
static int check_crc = 0
 
static int force = 1
 
static unsigned int benchmark_iterations = 0
 
static int blacken = 0
 
static int noreduce = 1
 
static int make_gray = 1
 
static int make_opaque = 1
 
static int make_8_bit = 1
 
static int reduce_palette = 1
 
static int compression_window
 
static int default_compression_window = 15
 
static int force_compression_window = 0
 
static int compression_mem_level = 9
 
static int final_method = 0
 
static int brute_force = 0
 
static int brute_force_level = 0
 
static int brute_force_filter = 0
 
static int brute_force_strategy = 0
 
static int brute_force_levels [10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
 
static int brute_force_filters [6] = { 1, 1, 1, 1, 1, 1 }
 
static int brute_force_strategies [4] = { 1, 1, 1, 1 }
 
static int speed = 0
 
static int method = 10
 
static int pauses = 0
 
static int nosave = 0
 
static int overwrite = 0
 
static int nofilecheck = 0
 
static int no_limits = 0
 
static int new_mng = 0
 
static png_bytep row_buf
 
static int z_strategy
 
static int best_of_three
 
static int methods_specified = 0
 
static int specified_intent = -1
 
static int intent = -1
 
static int ster_mode = -1
 
static int new_time_stamp = 1
 
static int plte_len = -1
 
static int specified_gamma = 0
 
static int image_specified_gamma = 0
 
static int force_specified_gamma = 0
 
static int double_gamma = 0
 
static int names
 
static int first_name
 
static int have_trns = 0
 
static png_uint_16 trns_index = 0
 
static png_uint_16 trns_red = 0
 
static png_uint_16 trns_green = 0
 
static png_uint_16 trns_blue = 0
 
static png_uint_16 trns_gray = 0
 
static png_byte trns_array [256]
 
static png_byte trans_in [256]
 
static png_uint_16 num_trans_in
 
png_bytep trans
 
int num_trans
 
png_color_16p trans_values
 
static int have_bkgd = 0
 
static png_uint_16 bkgd_red = 0
 
static png_uint_16 bkgd_green = 0
 
static png_uint_16 bkgd_blue = 0
 
static png_byte bkgd_index = 0
 
static png_colorp palette
 
static int num_palette
 
static png_structp read_ptr
 
static png_structp write_ptr
 
static png_structp mng_ptr
 
static png_infop read_info_ptr
 
static png_infop write_info_ptr
 
static png_infop end_info_ptr
 
static png_infop write_end_info_ptr
 
static FILE * fpin
 
static FILE * fpout
 
static FILE * mng_out
 
static int do_loco = 0
 
static int input_format = 0
 
static int output_format = 0
 
static int do_color_count
 
static png_uint_32 idat_length [(177+1)]
 
static int filter_type
 
static int zlib_level
 
static png_bytep png_row_filters = NULL
 
unsigned int pc_timer
 
static float t_filter [4] = {0}
 
static png_uint_32 filter_count [4] = {0}
 
png_uint_32 t_sec
 
png_uint_32 t_nsec
 
static png_uint_32 max_idat_size = 524288L
 
int ia
 
static png_byte chunks_to_ignore []
 
static memory_infop pinformation = NULL
 
static int current_allocation = 0
 
static int maximum_allocation = 0
 
static const char * pngcrush_legal []
 
static const char * pngcrush_usage []
 
struct options_help pngcrush_options []
 

Macro Definition Documentation

◆ _POSIX_C_SOURCE

#define _POSIX_C_SOURCE   199309L /* for clock_gettime */

Definition at line 1457 of file pngcrush.c.

◆ BACK_SLASH

#define BACK_SLASH   "\\"

Definition at line 2051 of file pngcrush.c.

◆ BUMP_I

#define BUMP_I
Value:
{ i++; \
if(i >= argc) {fprintf(STDERR,"pngcrush: insufficient parameters\n");\
exit(1);} }

◆ BUNDLED_LIB

#define BUNDLED_LIB   "system"

◆ CLOCKS_PER_SEC

#define CLOCKS_PER_SEC   1000

Definition at line 1468 of file pngcrush.c.

◆ DEFAULT_METHODS

#define DEFAULT_METHODS   10

Definition at line 2102 of file pngcrush.c.

◆ DEFAULT_MODE

#define DEFAULT_MODE   0

Definition at line 2083 of file pngcrush.c.

◆ DIRECTORY_MODE

#define DIRECTORY_MODE   1

Definition at line 2084 of file pngcrush.c.

◆ DIREX_MODE

#define DIREX_MODE   3

Definition at line 2086 of file pngcrush.c.

◆ DOT

#define DOT   "."

Definition at line 2047 of file pngcrush.c.

◆ EXTENSION_MODE

#define EXTENSION_MODE   2

Definition at line 2085 of file pngcrush.c.

◆ FAKE_PAUSE_STRING

#define FAKE_PAUSE_STRING   "P"

Definition at line 2103 of file pngcrush.c.

◆ FCLOSE

#define FCLOSE (   file)    {fclose(file); file=NULL;--number_of_open_files;};

Definition at line 2089 of file pngcrush.c.

◆ FOPEN

#define FOPEN (   file,
  how 
)    fopen(file, how)

Definition at line 2088 of file pngcrush.c.

◆ FWD_SLASH

#define FWD_SLASH   "/"

Definition at line 2052 of file pngcrush.c.

◆ GAS_VERSION

#define GAS_VERSION   "2.9.5(?)" /* used only in help/usage screen */

Definition at line 2055 of file pngcrush.c.

◆ MAX_IDAT_SIZE

#define MAX_IDAT_SIZE   524288L

Definition at line 2099 of file pngcrush.c.

◆ MAX_METHODS

#define MAX_METHODS   177

Definition at line 2100 of file pngcrush.c.

◆ MAX_METHODSP1

#define MAX_METHODSP1   (MAX_METHODS+1)

Definition at line 2101 of file pngcrush.c.

◆ NUM_STRATEGIES

#define NUM_STRATEGIES   4

Definition at line 2106 of file pngcrush.c.

◆ OVERWRITE_MODE

#define OVERWRITE_MODE   4

Definition at line 2087 of file pngcrush.c.

◆ P0

#define P0   if(last_trial && verbose > 0)printf

Definition at line 2091 of file pngcrush.c.

◆ P1

#define P1   if(verbose > 1)printf

Definition at line 2092 of file pngcrush.c.

◆ P2

#define P2   if(verbose > 2)printf

Definition at line 2093 of file pngcrush.c.

◆ PNG_16_TO_8

#define PNG_16_TO_8   0x0400

Definition at line 1986 of file pngcrush.c.

◆ PNG_ABORT

#define PNG_ABORT ( )    abort()

Definition at line 1775 of file pngcrush.c.

◆ PNG_acTL

#define PNG_acTL   const png_byte png_acTL[5] = { 97, 99, 84, 76, '\0'}

Definition at line 1858 of file pngcrush.c.

◆ PNG_BACKGROUND

#define PNG_BACKGROUND   0x0080

Definition at line 1985 of file pngcrush.c.

◆ PNG_DITHER

#define PNG_DITHER   0x0040

Definition at line 1984 of file pngcrush.c.

◆ PNG_dSIG

#define PNG_dSIG   const png_byte png_dSIG[5] = {100, 83, 73, 71, '\0'}

Definition at line 1859 of file pngcrush.c.

◆ PNG_EXPAND

#define PNG_EXPAND   0x1000

Definition at line 1988 of file pngcrush.c.

◆ PNG_fcTL

#define PNG_fcTL   const png_byte png_fcTL[5] = {102, 99, 84, 76, '\0'}

Definition at line 1860 of file pngcrush.c.

◆ PNG_fdAT

#define PNG_fdAT   const png_byte png_fdAT[5] = {102, 100, 65, 84, '\0'}

Definition at line 1861 of file pngcrush.c.

◆ PNG_FILLER

#define PNG_FILLER   0x8000L

Definition at line 1991 of file pngcrush.c.

◆ PNG_FLAG_CRC_ANCILLARY_MASK

#define PNG_FLAG_CRC_ANCILLARY_MASK
Value:
PNG_FLAG_CRC_ANCILLARY_NOWARN)

Definition at line 1981 of file pngcrush.c.

◆ PNG_FLAG_CRC_ANCILLARY_NOWARN

#define PNG_FLAG_CRC_ANCILLARY_NOWARN   0x0200

Definition at line 1978 of file pngcrush.c.

◆ PNG_FLAG_CRC_ANCILLARY_USE

#define PNG_FLAG_CRC_ANCILLARY_USE   0x0100

Definition at line 1977 of file pngcrush.c.

◆ PNG_FLAG_CRC_CRITICAL_IGNORE

#define PNG_FLAG_CRC_CRITICAL_IGNORE   0x0800

Definition at line 1980 of file pngcrush.c.

◆ PNG_FLAG_CRC_CRITICAL_USE

#define PNG_FLAG_CRC_CRITICAL_USE   0x0400

Definition at line 1979 of file pngcrush.c.

◆ PNG_GAMMA

#define PNG_GAMMA   0x2000

Definition at line 1989 of file pngcrush.c.

◆ PNG_GRAY_TO_RGB

#define PNG_GRAY_TO_RGB   0x4000

Definition at line 1990 of file pngcrush.c.

◆ PNG_iCCP

#define PNG_iCCP   const png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'}

Definition at line 1862 of file pngcrush.c.

◆ PNG_IDAT

#define PNG_IDAT   const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'}

Definition at line 1856 of file pngcrush.c.

◆ PNG_IEND

#define PNG_IEND   const png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'}

Definition at line 1863 of file pngcrush.c.

◆ PNG_IHDR

#define PNG_IHDR   const png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'}

Definition at line 1857 of file pngcrush.c.

◆ png_memcmp

#define png_memcmp   memcmp /* SJT: added */

Definition at line 1837 of file pngcrush.c.

◆ png_memcpy

#define png_memcpy   memcpy

Definition at line 1838 of file pngcrush.c.

◆ png_memset

#define png_memset   memset

Definition at line 1839 of file pngcrush.c.

◆ PNG_PACK

#define PNG_PACK   0x0004

Definition at line 1983 of file pngcrush.c.

◆ PNG_RGB_TO_GRAY

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

Definition at line 1993 of file pngcrush.c.

◆ PNG_RGBA

#define PNG_RGBA   0x0800

Definition at line 1987 of file pngcrush.c.

◆ PNG_UINT_32_NAME

#define PNG_UINT_32_NAME (   a,
  b,
  c,
 
)
Value:
((png_uint_32) ((a) & 0xff) << 24 | \
((png_uint_32) (b) << 16) | \
((png_uint_32) (c) << 8) | \
((png_uint_32) (d) ))

Definition at line 1868 of file pngcrush.c.

◆ PNG_UINT_acTL

#define PNG_UINT_acTL   PNG_UINT_32_NAME(97, 99, 84, 76)

Definition at line 1899 of file pngcrush.c.

◆ PNG_UINT_bKGD

#define PNG_UINT_bKGD   PNG_UINT_32_NAME(98, 75, 71, 68)

Definition at line 1890 of file pngcrush.c.

◆ PNG_UINT_CgBI

#define PNG_UINT_CgBI   PNG_UINT_32_NAME(67,103, 66, 73)

Definition at line 1895 of file pngcrush.c.

◆ PNG_UINT_cHRM

#define PNG_UINT_cHRM   PNG_UINT_32_NAME(99, 72, 82, 77)

Definition at line 1904 of file pngcrush.c.

◆ PNG_UINT_dSIG

#define PNG_UINT_dSIG   PNG_UINT_32_NAME(100, 83, 73, 71)

Definition at line 1908 of file pngcrush.c.

◆ PNG_UINT_fcTL

#define PNG_UINT_fcTL   PNG_UINT_32_NAME(102, 99, 84, 76)

Definition at line 1900 of file pngcrush.c.

◆ PNG_UINT_fdAT

#define PNG_UINT_fdAT   PNG_UINT_32_NAME(102,100, 65, 84)

Definition at line 1901 of file pngcrush.c.

◆ PNG_UINT_gAMA

#define PNG_UINT_gAMA   PNG_UINT_32_NAME(103, 65, 77, 65)

Definition at line 1912 of file pngcrush.c.

◆ PNG_UINT_hIST

#define PNG_UINT_hIST   PNG_UINT_32_NAME(104, 73, 83, 84)

Definition at line 1916 of file pngcrush.c.

◆ PNG_UINT_iCCP

#define PNG_UINT_iCCP   PNG_UINT_32_NAME(105, 67, 67, 80)

Definition at line 1920 of file pngcrush.c.

◆ PNG_UINT_IDAT

#define PNG_UINT_IDAT   PNG_UINT_32_NAME(73, 68, 65, 84)

Definition at line 1878 of file pngcrush.c.

◆ PNG_UINT_IEND

#define PNG_UINT_IEND   PNG_UINT_32_NAME(73, 69, 78, 68)

Definition at line 1882 of file pngcrush.c.

◆ PNG_UINT_IHDR

#define PNG_UINT_IHDR   PNG_UINT_32_NAME(73, 72, 68, 82)

Definition at line 1874 of file pngcrush.c.

◆ PNG_UINT_iTXt

#define PNG_UINT_iTXt   PNG_UINT_32_NAME(105, 84, 88, 116)

Definition at line 1924 of file pngcrush.c.

◆ PNG_UINT_oFFs

#define PNG_UINT_oFFs   PNG_UINT_32_NAME(111, 70, 70, 115)

Definition at line 1928 of file pngcrush.c.

◆ PNG_UINT_pCAL

#define PNG_UINT_pCAL   PNG_UINT_32_NAME(112, 67, 65, 76)

Definition at line 1932 of file pngcrush.c.

◆ PNG_UINT_pHYs

#define PNG_UINT_pHYs   PNG_UINT_32_NAME(112, 72, 89, 115)

Definition at line 1936 of file pngcrush.c.

◆ PNG_UINT_PLTE

#define PNG_UINT_PLTE   PNG_UINT_32_NAME(80, 76, 84, 69)

Definition at line 1886 of file pngcrush.c.

◆ PNG_UINT_sBIT

#define PNG_UINT_sBIT   PNG_UINT_32_NAME(115, 66, 73, 84)

Definition at line 1940 of file pngcrush.c.

◆ PNG_UINT_sCAL

#define PNG_UINT_sCAL   PNG_UINT_32_NAME(115, 67, 65, 76)

Definition at line 1944 of file pngcrush.c.

◆ PNG_UINT_sPLT

#define PNG_UINT_sPLT   PNG_UINT_32_NAME(115, 80, 76, 84)

Definition at line 1948 of file pngcrush.c.

◆ PNG_UINT_sRGB

#define PNG_UINT_sRGB   PNG_UINT_32_NAME(115, 82, 71, 66)

Definition at line 1952 of file pngcrush.c.

◆ PNG_UINT_sTER

#define PNG_UINT_sTER   PNG_UINT_32_NAME(115, 84, 69, 82)

Definition at line 1957 of file pngcrush.c.

◆ PNG_UINT_tEXt

#define PNG_UINT_tEXt   PNG_UINT_32_NAME(116, 69, 88, 116)

Definition at line 1961 of file pngcrush.c.

◆ PNG_UINT_tIME

#define PNG_UINT_tIME   PNG_UINT_32_NAME(116, 73, 77, 69)

Definition at line 1965 of file pngcrush.c.

◆ PNG_UINT_tRNS

#define PNG_UINT_tRNS   PNG_UINT_32_NAME(116, 82, 78, 83)

Definition at line 1969 of file pngcrush.c.

◆ PNG_UINT_zTXt

#define PNG_UINT_zTXt   PNG_UINT_32_NAME(122, 84, 88, 116)

Definition at line 1973 of file pngcrush.c.

◆ PNG_USER_TRANSFORM

#define PNG_USER_TRANSFORM   0x100000L

Definition at line 1992 of file pngcrush.c.

◆ PNGCRUSH_a

#define PNGCRUSH_a   97

Definition at line 8149 of file pngcrush.c.

◆ PNGCRUSH_A

#define PNGCRUSH_A   65

Definition at line 8151 of file pngcrush.c.

◆ pngcrush_check_long

#define pngcrush_check_long
Value:
{if (errno || endptr == argv[i] || *endptr != '\0') \
{ fprintf(STDERR, "pngcrush: malformed or missing argument\n"); \
exit(1); \
} \
}

◆ pngcrush_get_long

#define pngcrush_get_long   strtol(argv[i],&endptr,10)

◆ pngcrush_get_uint_31

#define pngcrush_get_uint_31   png_get_uint_31

Definition at line 1761 of file pngcrush.c.

◆ pngcrush_get_uint_32

#define pngcrush_get_uint_32   png_get_uint_32

Definition at line 1762 of file pngcrush.c.

◆ PNGCRUSH_LARGE

#define PNGCRUSH_LARGE

Definition at line 1421 of file pngcrush.c.

◆ PNGCRUSH_LIBPNG_VER

#define PNGCRUSH_LIBPNG_VER   PNG_LIBPNG_VER

Definition at line 1751 of file pngcrush.c.

◆ PNGCRUSH_LOCO

#define PNGCRUSH_LOCO

Definition at line 2012 of file pngcrush.c.

◆ PNGCRUSH_ROWBYTES

#define PNGCRUSH_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 1423 of file pngcrush.c.

◆ pngcrush_save_uint_32

#define pngcrush_save_uint_32   png_save_uint_32

Definition at line 1763 of file pngcrush.c.

◆ PNGCRUSH_TIMER_DECODE

#define PNGCRUSH_TIMER_DECODE   1

Definition at line 1524 of file pngcrush.c.

◆ PNGCRUSH_TIMER_ENCODE

#define PNGCRUSH_TIMER_ENCODE   2

Definition at line 1525 of file pngcrush.c.

◆ PNGCRUSH_TIMER_MISC

#define PNGCRUSH_TIMER_MISC   3

Definition at line 1526 of file pngcrush.c.

◆ PNGCRUSH_TIMER_TOTAL

#define PNGCRUSH_TIMER_TOTAL   0

Definition at line 1527 of file pngcrush.c.

◆ PNGCRUSH_TIMER_UINT_API

#define PNGCRUSH_TIMER_UINT_API   extern unsigned int PNGAPI

Definition at line 1517 of file pngcrush.c.

◆ PNGCRUSH_TIMER_VOID_API

#define PNGCRUSH_TIMER_VOID_API   extern void PNGAPI

Definition at line 1518 of file pngcrush.c.

◆ PNGCRUSH_TIMERS

#define PNGCRUSH_TIMERS   4

Definition at line 1434 of file pngcrush.c.

◆ PNGCRUSH_UNUSED

#define PNGCRUSH_UNUSED (   param)    (void)param;

Definition at line 1760 of file pngcrush.c.

◆ PNGCRUSH_USING_CLOCK

#define PNGCRUSH_USING_CLOCK   "clock()"

Definition at line 1487 of file pngcrush.c.

◆ PNGCRUSH_VERSION

#define PNGCRUSH_VERSION   "1.8.13"

Definition at line 8 of file pngcrush.c.

◆ PNGCRUSH_z

#define PNGCRUSH_z   122

Definition at line 8150 of file pngcrush.c.

◆ PNGCRUSH_Z

#define PNGCRUSH_Z   90

Definition at line 8152 of file pngcrush.c.

◆ setfiletype

#define setfiletype (   x)

Definition at line 2876 of file pngcrush.c.

◆ SLASH

#define SLASH   "/"

Definition at line 2046 of file pngcrush.c.

◆ STDERR

#define STDERR   stderr

Definition at line 2008 of file pngcrush.c.

◆ STR_BUF_SIZE

#define STR_BUF_SIZE   2048

Definition at line 2098 of file pngcrush.c.

◆ STRNGIFY

#define STRNGIFY (   x)    STRNGIFY_STAGE1(x)

Definition at line 2096 of file pngcrush.c.

◆ STRNGIFY_STAGE1

#define STRNGIFY_STAGE1 (   x)    #x

Definition at line 2095 of file pngcrush.c.

◆ TIME_T

#define TIME_T   float

Definition at line 1477 of file pngcrush.c.

Typedef Documentation

◆ memory_infop

Definition at line 2749 of file pngcrush.c.

◆ memory_information

Function Documentation

◆ keep_chunk()

int keep_chunk ( png_const_charp  name,
char *  argv[] 
)

Definition at line 3007 of file pngcrush.c.

References last_trial, remove_chunks, STDERR, and verbose.

Referenced by main().

◆ keep_unknown_chunk()

int keep_unknown_chunk ( png_const_charp  name,
char *  argv[] 
)

Definition at line 2959 of file pngcrush.c.

References remove_chunks.

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 3567 of file pngcrush.c.

References all_chunks_are_safe, png_color_8_struct::alpha, BACK_SLASH, bail, benchmark_iterations, best, best_of_three, bkgd_blue, bkgd_green, bkgd_index, bkgd_red, blacken, png_color_struct::blue, png_color_16_struct::blue, png_color_8_struct::blue, brute_force, brute_force_filter, brute_force_filters, brute_force_level, brute_force_levels, brute_force_strategies, brute_force_strategy, buffer, BUMP_I, Catch, check_crc, chunks_to_ignore, png_text_struct::compression, compression_mem_level, compression_window, copy_idat, png_unknown_chunk_t::data, default_compression_window, DEFAULT_METHODS, DEFAULT_MODE, DIRECTORY_MODE, directory_name, DIREX_MODE, do_color_count, do_loco, do_pplt, dot, double_gamma, end_info_ptr, extension, EXTENSION_MODE, FCLOSE, filter_count, filter_type, final_method, first_name, FOPEN, force, force_compression_window, force_output_bit_depth, force_output_color_type, force_specified_gamma, found_acTL_chunk, found_any_chunk, found_bKGD, found_CgBI, found_cHRM, found_color_bKGD, found_gAMA, found_hIST, found_iCCP, found_IDAT, found_sBIT_different_RGB_bits, found_sBIT_max, found_sRGB, found_tRNS, fpin, fpout, free(), FWD_SLASH, png_color_16_struct::gray, png_color_8_struct::gray, png_color_struct::green, png_color_16_struct::green, png_color_8_struct::green, have_bkgd, have_trns, height, ia, iccp_file, iccp_length, iccp_name, iccp_text, idat_length, image_is_immutable, image_specified_gamma, in_extension, in_string, png_color_16_struct::index, inname, input_bit_depth, input_color_type, input_format, input_length, intent, interlace_method, ip, keep_chunk(), keep_unknown_chunk(), png_text_struct::key, png_text_struct::lang, png_text_struct::lang_key, last_trial, length, make_8_bit, make_gray, make_opaque, malloc(), max_bytes, MAX_IDAT_SIZE, max_idat_size, MAX_METHODS, MAX_METHODSP1, measure_idats(), method, methods_specified, mng_out, mng_ptr, mngname, msg, names, new_mng, new_time_stamp, no_limits, nofilecheck, noreduce, nosave, num_palette, NUM_STRATEGIES, num_trans, num_trans_in, number_of_open_files, op, out_string, outname, output_bit_depth, output_color_type, output_format, overwrite, OVERWRITE_MODE, P0, P1, P2, palette, pauses, pc_timer, plte_len, PNG_ALL_FILTERS, png_const_bytep, png_const_charp, PNG_CRC_QUIET_USE, png_create_info_struct(), png_create_read_struct(), png_create_read_struct_2(), png_create_write_struct(), png_create_write_struct_2(), png_destroy_info_struct(), png_destroy_read_struct(), png_destroy_write_struct(), png_error(), PNG_FILLER_AFTER, PNG_FILTER_AVG, PNG_FILTER_NONE, PNG_FILTER_PAETH, PNG_FILTER_SUB, PNG_FILTER_UP, PNG_FIXED_POINT_SUPPORTED, PNG_FLAG_MNG_FILTER_64, png_free(), png_free_data(), PNG_FREE_UNKN, png_get_bKGD(), png_get_cHRM(), png_get_cHRM_fixed(), png_get_compression_buffer_size(), png_get_gAMA(), png_get_gAMA_fixed(), png_get_hIST(), png_get_iCCP(), png_get_IHDR(), png_get_oFFs(), png_get_pCAL(), png_get_pHYs(), png_get_PLTE(), png_get_rgb_to_gray_status(), png_get_rowbytes(), png_get_sBIT(), png_get_sCAL(), png_get_sCAL_s(), png_get_sPLT(), png_get_sRGB(), png_get_text(), png_get_tIME(), png_get_tRNS(), png_get_unknown_chunks(), PNG_HANDLE_CHUNK_ALWAYS, PNG_HANDLE_CHUNK_IF_SAFE, PNG_HANDLE_CHUNK_NEVER, PNG_HAVE_IHDR, PNG_IGNORE_ADLER32, png_init_io(), PNG_ITXT_COMPRESSION_NONE, PNG_ITXT_COMPRESSION_zTXt, png_libpng_ver, PNG_LIBPNG_VER_STRING, png_malloc(), PNG_MAXIMUM_INFLATE_WINDOW, png_memcmp, png_memcpy, PNG_OPTION_ON, PNG_PASS_COLS, PNG_PASS_ROWS, png_permit_mng_features(), png_read_end(), png_read_info(), png_read_row(), png_read_rows(), png_read_transform_info(), png_row_filters, png_set_benign_errors(), png_set_bKGD(), png_set_check_for_invalid_index(), png_set_cHRM(), png_set_cHRM_fixed(), png_set_chunk_cache_max(), png_set_chunk_malloc_max(), png_set_compression_buffer_size(), png_set_compression_level(), png_set_compression_mem_level(), png_set_compression_strategy(), png_set_compression_window_bits(), png_set_crc_action(), png_set_expand(), png_set_filler(), png_set_filter(), png_set_gAMA(), png_set_gAMA_fixed(), png_set_gray_to_rgb(), png_set_hIST(), png_set_iCCP(), png_set_IHDR(), png_set_interlace_handling(), png_set_keep_unknown_chunks(), png_set_oFFs(), png_set_option(), png_set_packing(), png_set_pCAL(), png_set_pHYs(), png_set_PLTE(), png_set_read_fn(), png_set_read_user_transform_fn(), png_set_rgb_to_gray(), png_set_rgb_to_gray_fixed(), png_set_sBIT(), png_set_sCAL(), png_set_sCAL_s(), png_set_scale_16(), png_set_shift(), png_set_sig_bytes(), png_set_sPLT(), png_set_sRGB(), png_set_strip_16(), png_set_strip_alpha(), png_set_text(), png_set_tIME(), png_set_tRNS(), png_set_unknown_chunk_location(), png_set_unknown_chunks(), png_set_user_limits(), png_set_write_fn(), png_sig_cmp(), png_skip_chunk(), PNG_TEXT_COMPRESSION_NONE, PNG_TEXT_COMPRESSION_zTXt, PNG_UINT_31_MAX, PNG_UINT_cHRM, PNG_UINT_hIST, PNG_UINT_iCCP, PNG_UINT_iTXt, PNG_UINT_pCAL, PNG_UINT_sCAL, PNG_UINT_sPLT, PNG_UINT_sTER, PNG_UINT_tIME, png_write_chunk(), png_write_end(), png_write_flush(), png_write_info(), png_write_row(), png_write_rows(), PNG_ZBUF_SIZE, pngcrush_best_byte_count, pngcrush_cexcept_error(), pngcrush_check_long, pngcrush_debug_free(), pngcrush_debug_malloc(), pngcrush_default_read_data(), pngcrush_examine_pixels_fn(), pngcrush_flush(), pngcrush_get_long, PNGCRUSH_LIBPNG_VER, pngcrush_mode, pngcrush_must_exit, pngcrush_pause(), PNGCRUSH_ROWBYTES, pngcrush_save_uint_32, PNGCRUSH_TIMER_DECODE, PNGCRUSH_TIMER_ENCODE, pngcrush_timer_get_hits(), pngcrush_timer_get_nanoseconds(), pngcrush_timer_get_seconds(), pngcrush_timer_min_nsec, pngcrush_timer_min_secs, PNGCRUSH_TIMER_MISC, pngcrush_timer_reset(), pngcrush_timer_start(), pngcrush_timer_stop(), PNGCRUSH_TIMER_TOTAL, PNGCRUSH_TIMERS, pngcrush_transform_pixels_fn(), PNGCRUSH_UNUSED, PNGCRUSH_VERSION, pngcrush_warning(), pngcrush_write_byte_count, pngcrush_write_png(), pplt_string, premultiply, print_usage(), print_version_info(), printed_version_info, prog_string, progname, read_info_ptr, read_ptr, png_color_struct::red, png_color_16_struct::red, png_color_8_struct::red, reduce_palette, remove_chunks, resolution, row_buf, salvage, save_apng_chunks, setfiletype, show_result(), show_warnings, png_unknown_chunk_t::size, SLASH, specified_gamma, specified_intent, speed, STDERR, ster_mode, STR_BUF_SIZE, t_filter, t_nsec, t_sec, png_text_struct::text, text_compression, text_inputs, text_keyword, text_lang, text_lang_key, text_text, text_where, Throw, total_input_length, trans, trans_in, trans_values, trial, trns_array, trns_blue, trns_gray, trns_green, trns_index, trns_red, Try, verbose, width, write_end_info_ptr, write_info_ptr, write_ptr, Z_DEFAULT_STRATEGY, Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, z_strategy, zlib_level, and ZLIB_VERSION.

◆ measure_idats()

◆ png_skip_chunk()

void png_skip_chunk ( png_structp  png_ptr)

Definition at line 2853 of file pngcrush.c.

References length, pngcrush_default_read_data(), pngcrush_get_uint_31, and verbose.

Referenced by main().

◆ pngcrush_calculate_crc()

void pngcrush_calculate_crc ( png_structp  png_ptr,
png_bytep  ptr,
png_size_t  length 
)

Definition at line 2535 of file pngcrush.c.

References crc32(), length, and pngcrush_crc.

Referenced by pngcrush_crc_read().

◆ pngcrush_cexcept_error()

static void pngcrush_cexcept_error ( png_structp  png_ptr,
png_const_charp  message 
)
static

Definition at line 2692 of file pngcrush.c.

References inname, pngcrush_warning(), and Throw.

Referenced by main(), and measure_idats().

◆ pngcrush_crc_error()

int pngcrush_crc_error ( png_structp  png_ptr)

Definition at line 2552 of file pngcrush.c.

References crc, pngcrush_crc, pngcrush_default_read_data(), and pngcrush_get_uint_32.

Referenced by pngcrush_crc_finish().

◆ pngcrush_crc_finish()

int pngcrush_crc_finish ( png_structp  png_ptr,
png_uint_32  skip 
)

Definition at line 2570 of file pngcrush.c.

References png_chunk_error(), pngcrush_crc_error(), and pngcrush_crc_read().

Referenced by pngcrush_measure_idat().

◆ pngcrush_crc_read()

void pngcrush_crc_read ( png_structp  png_ptr,
png_bytep  buf,
png_size_t  length 
)

◆ pngcrush_debug_free()

void pngcrush_debug_free ( png_structp  png_ptr,
png_voidp  ptr 
)

◆ pngcrush_debug_malloc()

png_voidp pngcrush_debug_malloc ( png_structp  png_ptr,
png_uint_32  size 
)

◆ pngcrush_default_read_data()

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

◆ pngcrush_default_write_data()

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

Definition at line 2657 of file pngcrush.c.

References length, png_error(), and png_get_io_ptr().

Referenced by pngcrush_write_png().

◆ pngcrush_examine_pixels_fn()

void pngcrush_examine_pixels_fn ( png_structp  png_ptr,
png_row_infop  row_info,
png_bytep  data 
)

◆ pngcrush_flush()

static void pngcrush_flush ( png_structp  png_ptr)
static

Definition at line 3234 of file pngcrush.c.

References PNGCRUSH_UNUSED.

Referenced by main().

◆ pngcrush_get_uint_31()

png_uint_32 pngcrush_get_uint_31 ( png_structp  png_ptr,
png_bytep  buf 
)

Definition at line 2496 of file pngcrush.c.

References png_error(), PNG_UINT_31_MAX, and pngcrush_get_uint_32.

◆ pngcrush_get_uint_32()

png_uint_32 pngcrush_get_uint_32 ( png_bytep  buf)

Definition at line 2482 of file pngcrush.c.

◆ pngcrush_measure_idat()

◆ pngcrush_pause()

void pngcrush_pause ( void  )

Definition at line 2842 of file pngcrush.c.

References pauses, and STDERR.

Referenced by main(), and print_usage().

◆ pngcrush_reset_crc()

void pngcrush_reset_crc ( png_structp  png_ptr)

Definition at line 2524 of file pngcrush.c.

References crc32(), pngcrush_crc, and Z_NULL.

Referenced by pngcrush_measure_idat().

◆ pngcrush_save_uint_32()

void pngcrush_save_uint_32 ( png_bytep  buf,
png_uint_32  i 
)

Definition at line 2510 of file pngcrush.c.

◆ pngcrush_timer_get_hits()

unsigned int pngcrush_timer_get_hits ( unsigned int  n)

Definition at line 1550 of file pngcrush.c.

References pngcrush_timer_hits, and PNGCRUSH_TIMERS.

Referenced by main(), and show_result().

◆ pngcrush_timer_get_nanoseconds()

unsigned int pngcrush_timer_get_nanoseconds ( unsigned int  n)

Definition at line 1568 of file pngcrush.c.

References pngcrush_timer_nsec, and PNGCRUSH_TIMERS.

Referenced by main(), and show_result().

◆ pngcrush_timer_get_seconds()

unsigned int pngcrush_timer_get_seconds ( unsigned int  n)

Definition at line 1559 of file pngcrush.c.

References pngcrush_timer_secs, and PNGCRUSH_TIMERS.

Referenced by main(), and show_result().

◆ pngcrush_timer_reset()

void pngcrush_timer_reset ( unsigned int  n)

Definition at line 1577 of file pngcrush.c.

References pngcrush_timer_hits, pngcrush_timer_nsec, pngcrush_timer_secs, and PNGCRUSH_TIMERS.

Referenced by main().

◆ pngcrush_timer_start()

void pngcrush_timer_start ( unsigned int  n)

◆ pngcrush_timer_stop()

void pngcrush_timer_stop ( unsigned int  n)

◆ pngcrush_transform_pixels_fn()

void pngcrush_transform_pixels_fn ( png_structp  png_ptr,
png_row_infop  row_info,
png_bytep  data 
)

◆ pngcrush_warning()

static void pngcrush_warning ( png_structp  png_ptr,
png_const_charp  message 
)
static

Definition at line 2671 of file pngcrush.c.

References bail, inname, show_warnings, and verbose.

Referenced by main(), and pngcrush_cexcept_error().

◆ pngcrush_write_png()

void pngcrush_write_png ( png_structp  write_pointer,
png_bytep  data,
png_size_t  length 
)

◆ print_usage()

void print_usage ( int  retval)

◆ print_version_info()

void print_version_info ( void  )

◆ show_result()

Variable Documentation

◆ all_chunks_are_safe

int all_chunks_are_safe = 0
static

Definition at line 2181 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ bail

int bail = 0
static

Definition at line 2241 of file pngcrush.c.

Referenced by main(), and pngcrush_warning().

◆ benchmark_iterations

unsigned int benchmark_iterations = 0
static

Definition at line 2245 of file pngcrush.c.

Referenced by main(), and show_result().

◆ best

int best

Definition at line 2212 of file pngcrush.c.

Referenced by main().

◆ best_of_three

int best_of_three
static

Definition at line 2304 of file pngcrush.c.

Referenced by main().

◆ bkgd_blue

png_uint_16 bkgd_blue = 0
static

Definition at line 2345 of file pngcrush.c.

Referenced by main().

◆ bkgd_green

png_uint_16 bkgd_green = 0
static

Definition at line 2344 of file pngcrush.c.

Referenced by main().

◆ bkgd_index

png_byte bkgd_index = 0
static

Definition at line 2346 of file pngcrush.c.

Referenced by main().

◆ bkgd_red

png_uint_16 bkgd_red = 0
static

Definition at line 2343 of file pngcrush.c.

Referenced by main().

◆ blacken

int blacken = 0
static

Definition at line 2248 of file pngcrush.c.

Referenced by main(), pngcrush_examine_pixels_fn(), and pngcrush_transform_pixels_fn().

◆ brute_force

int brute_force = 0
static

Definition at line 2279 of file pngcrush.c.

Referenced by main().

◆ brute_force_filter

int brute_force_filter = 0
static

Definition at line 2281 of file pngcrush.c.

Referenced by main().

◆ brute_force_filters

int brute_force_filters[6] = { 1, 1, 1, 1, 1, 1 }
static

Definition at line 2284 of file pngcrush.c.

Referenced by main().

◆ brute_force_level

int brute_force_level = 0
static

Definition at line 2280 of file pngcrush.c.

Referenced by main().

◆ brute_force_levels

int brute_force_levels[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
static

Definition at line 2283 of file pngcrush.c.

Referenced by main().

◆ brute_force_strategies

int brute_force_strategies[4] = { 1, 1, 1, 1 }
static

Definition at line 2286 of file pngcrush.c.

Referenced by main().

◆ brute_force_strategy

int brute_force_strategy = 0
static

Definition at line 2282 of file pngcrush.c.

Referenced by main().

◆ buffer

◆ check_crc

int check_crc = 0
static

Definition at line 2242 of file pngcrush.c.

Referenced by main().

◆ chunks_to_ignore

png_byte chunks_to_ignore[]
static
Initial value:
= {
98, 75, 71 , 68, '\0',
99, 72, 82, 77, '\0',
103, 65, 77, 65, '\0',
104, 73, 83, 84, '\0',
105, 67, 67, 80, '\0',
105, 84, 88, 116, '\0',
111, 70, 70, 115, '\0',
112, 67, 65, 76, '\0',
112, 72, 89, 115, '\0',
115, 66, 73, 84, '\0',
115, 67, 65, 76, '\0',
115, 80, 76, 84, '\0',
115, 82, 71, 66, '\0',
115, 84, 69, 82, '\0',
116, 69, 88, 116, '\0',
116, 73, 77, 69, '\0',
116, 82, 78, 83, '\0',
122, 84, 88, 116, '\0'
}

Definition at line 2392 of file pngcrush.c.

Referenced by main(), and png_set_keep_unknown_chunks().

◆ compression_mem_level

int compression_mem_level = 9
static

Definition at line 2277 of file pngcrush.c.

Referenced by main().

◆ compression_window

int compression_window
static

Definition at line 2274 of file pngcrush.c.

Referenced by main().

◆ copy_idat

int copy_idat = 0
static

Definition at line 1414 of file pngcrush.c.

Referenced by main().

◆ current_allocation

int current_allocation = 0
static

Definition at line 2752 of file pngcrush.c.

Referenced by pngcrush_debug_free(), pngcrush_debug_malloc(), and show_result().

◆ default_compression_window

int default_compression_window = 15
static

Definition at line 2275 of file pngcrush.c.

Referenced by main().

◆ directory_name

const char* directory_name = "pngcrush" "." "bak"
static

Definition at line 2133 of file pngcrush.c.

Referenced by main().

◆ do_color_count

int do_color_count
static

Definition at line 2367 of file pngcrush.c.

Referenced by main().

◆ do_loco

int do_loco = 0
static

Definition at line 2363 of file pngcrush.c.

Referenced by main().

◆ do_pplt

int do_pplt = 0
static

Definition at line 2183 of file pngcrush.c.

Referenced by main().

◆ dot

char * dot

Definition at line 2189 of file pngcrush.c.

Referenced by main().

◆ double_gamma

int double_gamma = 0
static

Definition at line 2320 of file pngcrush.c.

Referenced by main().

◆ end_info_ptr

png_infop end_info_ptr
static

Definition at line 2357 of file pngcrush.c.

Referenced by main(), and measure_idats().

◆ extension

const char* extension = "_C" "." "png"
static

Definition at line 2134 of file pngcrush.c.

Referenced by main().

◆ filter_count

png_uint_32 filter_count[4] = {0}
static

Definition at line 2377 of file pngcrush.c.

Referenced by main(), and show_result().

◆ filter_type

int filter_type
static

◆ final_method

int final_method = 0
static

Definition at line 2278 of file pngcrush.c.

Referenced by main().

◆ first_name

int first_name
static

Definition at line 2323 of file pngcrush.c.

Referenced by main().

◆ force

int force = 1
static

Definition at line 2244 of file pngcrush.c.

Referenced by main().

◆ force_compression_window

int force_compression_window = 0
static

Definition at line 2276 of file pngcrush.c.

Referenced by main().

◆ force_output_bit_depth

int force_output_bit_depth = 0
static

Definition at line 2232 of file pngcrush.c.

Referenced by main().

◆ force_output_color_type

int force_output_color_type = 8
static

Definition at line 2231 of file pngcrush.c.

Referenced by main().

◆ force_specified_gamma

int force_specified_gamma = 0
static

Definition at line 2314 of file pngcrush.c.

Referenced by main().

◆ found_acTL_chunk

int found_acTL_chunk = 0
static

Definition at line 2178 of file pngcrush.c.

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

◆ found_any_chunk

int found_any_chunk = 0
static

Definition at line 2176 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_bKGD

int found_bKGD = 0
static

Definition at line 2138 of file pngcrush.c.

Referenced by main().

◆ found_CgBI

int found_CgBI = 0
static

Definition at line 2175 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_cHRM

int found_cHRM = 0
static

Definition at line 2141 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_color_bKGD

int found_color_bKGD = 0
static

Definition at line 2139 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_gAMA

int found_gAMA = 0
static

Definition at line 2143 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_hIST

int found_hIST = 0
static

Definition at line 2144 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_iCCP

int found_iCCP = 0
static

Definition at line 2145 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_IDAT

int found_IDAT = 0
static

Definition at line 2146 of file pngcrush.c.

Referenced by main().

◆ found_sBIT

int found_sBIT = 0
static

Definition at line 2147 of file pngcrush.c.

Referenced by pngcrush_measure_idat().

◆ found_sBIT_different_RGB_bits

int found_sBIT_different_RGB_bits = 0
static

Definition at line 2149 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_sBIT_max

int found_sBIT_max = 0
static

Definition at line 2148 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_sRGB

int found_sRGB = 0
static

Definition at line 2150 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ found_tRNS

int found_tRNS = 0
static

Definition at line 2151 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ fpin

FILE* fpin
static

Definition at line 2359 of file pngcrush.c.

Referenced by main().

◆ fpout

FILE * fpout
static

Definition at line 2359 of file pngcrush.c.

Referenced by main().

◆ have_bkgd

int have_bkgd = 0
static

Definition at line 2342 of file pngcrush.c.

Referenced by main().

◆ have_trns

int have_trns = 0
static

Definition at line 2325 of file pngcrush.c.

Referenced by main().

◆ height

◆ ia

int ia

Definition at line 2389 of file pngcrush.c.

Referenced by main().

◆ iccp_file

char* iccp_file

Definition at line 2209 of file pngcrush.c.

Referenced by main().

◆ iccp_length

int iccp_length = 0

Definition at line 2207 of file pngcrush.c.

Referenced by main().

◆ iccp_name

char iccp_name[80]

Definition at line 2210 of file pngcrush.c.

Referenced by main().

◆ iccp_text

char* iccp_text

Definition at line 2208 of file pngcrush.c.

Referenced by main().

◆ idat_length

png_uint_32 idat_length[(177+1)]
static

Definition at line 2370 of file pngcrush.c.

Referenced by main().

◆ image_is_immutable

int image_is_immutable = 0
static

Definition at line 2179 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ image_specified_gamma

int image_specified_gamma = 0
static

Definition at line 2313 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ in_extension

char in_extension[2048]

Definition at line 2193 of file pngcrush.c.

Referenced by main().

◆ in_string

char in_string[2048]

Definition at line 2190 of file pngcrush.c.

Referenced by main().

◆ inname

const char* inname = "pngtest" "." "png"
static

Definition at line 2128 of file pngcrush.c.

Referenced by main(), measure_idats(), pngcrush_cexcept_error(), and pngcrush_warning().

◆ input_bit_depth

int input_bit_depth
static

Definition at line 2234 of file pngcrush.c.

Referenced by main().

◆ input_color_type

int input_color_type
static

Definition at line 2233 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ input_format

int input_format = 0
static

Definition at line 2364 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ input_length

png_uint_32 input_length
static

Definition at line 2223 of file pngcrush.c.

Referenced by main().

◆ intent

int intent = -1
static

Definition at line 2307 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ interlace_method

int interlace_method = 0
static

Definition at line 2155 of file pngcrush.c.

Referenced by main().

◆ ip

char* ip

Definition at line 2189 of file pngcrush.c.

Referenced by main(), and png_create_colormap_entry().

◆ last_trial

int last_trial = 0
static

Definition at line 2236 of file pngcrush.c.

Referenced by keep_chunk(), main(), and pngcrush_write_png().

◆ make_8_bit

int make_8_bit = 1
static

Definition at line 2269 of file pngcrush.c.

Referenced by main(), and pngcrush_examine_pixels_fn().

◆ make_gray

int make_gray = 1
static

Definition at line 2265 of file pngcrush.c.

Referenced by main(), and pngcrush_examine_pixels_fn().

◆ make_opaque

int make_opaque = 1
static

Definition at line 2267 of file pngcrush.c.

Referenced by main(), and pngcrush_examine_pixels_fn().

◆ max_bytes

png_alloc_size_t max_bytes

Definition at line 2159 of file pngcrush.c.

Referenced by main().

◆ max_idat_size

png_uint_32 max_idat_size = 524288L
static

Definition at line 2382 of file pngcrush.c.

Referenced by main().

◆ maximum_allocation

int maximum_allocation = 0
static

Definition at line 2753 of file pngcrush.c.

Referenced by pngcrush_debug_malloc().

◆ measured_idat_length

png_uint_32 measured_idat_length
static

Definition at line 2137 of file pngcrush.c.

Referenced by measure_idats().

◆ method

◆ methods_specified

int methods_specified = 0
static

Definition at line 2305 of file pngcrush.c.

Referenced by main().

◆ mng_out

FILE* mng_out
static

Definition at line 2362 of file pngcrush.c.

Referenced by main().

◆ mng_ptr

png_structp mng_ptr
static

Definition at line 2355 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ mngname

const char* mngname = "mngout" "." "mng"
static

Definition at line 2131 of file pngcrush.c.

Referenced by main().

◆ msg

◆ names

int names
static

Definition at line 2322 of file pngcrush.c.

Referenced by main().

◆ new_mng

int new_mng = 0
static

Definition at line 2298 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ new_time_stamp

int new_time_stamp = 1
static

Definition at line 2309 of file pngcrush.c.

Referenced by main().

◆ no_limits

int no_limits = 0
static

Definition at line 2297 of file pngcrush.c.

Referenced by main().

◆ nofilecheck

int nofilecheck = 0
static

Definition at line 2296 of file pngcrush.c.

Referenced by main().

◆ noreduce

int noreduce = 1
static

Definition at line 2264 of file pngcrush.c.

Referenced by main().

◆ nosave

int nosave = 0
static

Definition at line 2293 of file pngcrush.c.

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

◆ num_palette

int num_palette
static

◆ num_trans

◆ num_trans_in

png_uint_16 num_trans_in
static

Definition at line 2334 of file pngcrush.c.

Referenced by main().

◆ number_of_open_files

int number_of_open_files
static

Definition at line 2182 of file pngcrush.c.

Referenced by main().

◆ op

char * op

Definition at line 2189 of file pngcrush.c.

Referenced by inflate_fast(), and main().

◆ out_string

char out_string[2048]

Definition at line 2192 of file pngcrush.c.

Referenced by main().

◆ outname

const char* outname = "pngout" "." "png"
static

Definition at line 2129 of file pngcrush.c.

Referenced by main().

◆ output_bit_depth

int output_bit_depth
static

Definition at line 2230 of file pngcrush.c.

Referenced by main().

◆ output_color_type

int output_color_type
static

Definition at line 2229 of file pngcrush.c.

Referenced by main().

◆ output_format

int output_format = 0
static

Definition at line 2365 of file pngcrush.c.

Referenced by main(), and png_image_read_colormap().

◆ overwrite

int overwrite = 0
static

Definition at line 2294 of file pngcrush.c.

Referenced by main().

◆ palette

◆ pauses

int pauses = 0
static

Definition at line 2292 of file pngcrush.c.

Referenced by main(), and pngcrush_pause().

◆ pc_timer

unsigned int pc_timer

Definition at line 2375 of file pngcrush.c.

Referenced by main(), and show_result().

◆ pinformation

memory_infop pinformation = NULL
static

Definition at line 2751 of file pngcrush.c.

Referenced by pngcrush_debug_free(), pngcrush_debug_malloc(), and show_result().

◆ plte_len

int plte_len = -1
static

Definition at line 2310 of file pngcrush.c.

Referenced by main(), and pngcrush_examine_pixels_fn().

◆ png_row_filters

png_bytep png_row_filters = NULL
static

Definition at line 2372 of file pngcrush.c.

Referenced by main().

◆ pngcrush_best_byte_count

png_uint_32 pngcrush_best_byte_count =0xffffffff
static

Definition at line 2238 of file pngcrush.c.

Referenced by main().

◆ pngcrush_clock_nsec

unsigned int pngcrush_clock_nsec[4]
static

Definition at line 1533 of file pngcrush.c.

Referenced by pngcrush_timer_start(), and pngcrush_timer_stop().

◆ pngcrush_clock_secs

unsigned int pngcrush_clock_secs[4]
static

Definition at line 1532 of file pngcrush.c.

Referenced by pngcrush_timer_start(), and pngcrush_timer_stop().

◆ pngcrush_crc

png_uint_32 pngcrush_crc

Definition at line 2018 of file pngcrush.c.

Referenced by pngcrush_calculate_crc(), pngcrush_crc_error(), and pngcrush_reset_crc().

◆ pngcrush_legal

const char* pngcrush_legal[]
static

Definition at line 8797 of file pngcrush.c.

Referenced by print_usage().

◆ pngcrush_mode

int pngcrush_mode = 0
static

Definition at line 2226 of file pngcrush.c.

Referenced by main().

◆ pngcrush_must_exit

int pngcrush_must_exit = 0
static

Definition at line 2180 of file pngcrush.c.

Referenced by main().

◆ pngcrush_options

struct options_help pngcrush_options[]

Definition at line 8840 of file pngcrush.c.

Referenced by print_usage().

◆ pngcrush_timer_hits

unsigned int pngcrush_timer_hits[4]
static

Definition at line 1529 of file pngcrush.c.

Referenced by pngcrush_timer_get_hits(), pngcrush_timer_reset(), and pngcrush_timer_stop().

◆ pngcrush_timer_min_nsec

unsigned long pngcrush_timer_min_nsec[4]
static

Definition at line 1651 of file pngcrush.c.

Referenced by main().

◆ pngcrush_timer_min_secs

unsigned long pngcrush_timer_min_secs[4]
static

Definition at line 1650 of file pngcrush.c.

Referenced by main().

◆ pngcrush_timer_nsec

unsigned int pngcrush_timer_nsec[4]
static

◆ pngcrush_timer_secs

unsigned int pngcrush_timer_secs[4]
static

◆ pngcrush_usage

const char* pngcrush_usage[]
static
Initial value:
= {
"\nusage: %s [options except for -e -d] infile.png outfile.png\n",
" %s -e ext [other options] file.png ...\n",
" %s -d dir/ [other options] file.png ...\n",
" %s -ow [other options] file.png [tempfile.png]\n",
" %s -n -v file.png ...\n"
}

Definition at line 8832 of file pngcrush.c.

Referenced by print_usage().

◆ pngcrush_write_byte_count

png_uint_32 pngcrush_write_byte_count
static

Definition at line 2237 of file pngcrush.c.

Referenced by main(), and pngcrush_write_png().

◆ pplt_string

char pplt_string[2048]

Definition at line 2188 of file pngcrush.c.

Referenced by main().

◆ premultiply

int premultiply = 0
static

Definition at line 2153 of file pngcrush.c.

Referenced by main().

◆ printed_version_info

int printed_version_info = 0
static

Definition at line 2154 of file pngcrush.c.

Referenced by main().

◆ prog_string

char prog_string[2048]

Definition at line 2191 of file pngcrush.c.

Referenced by main().

◆ progname

const char* progname
static

Definition at line 2127 of file pngcrush.c.

Referenced by main(), print_usage(), and print_version_info().

◆ read_info_ptr

png_infop read_info_ptr
static

Definition at line 2356 of file pngcrush.c.

Referenced by main(), and measure_idats().

◆ read_ptr

png_structp read_ptr
static

Definition at line 2355 of file pngcrush.c.

Referenced by main(), and measure_idats().

◆ reduce_palette

int reduce_palette = 1
static

Definition at line 2271 of file pngcrush.c.

Referenced by main(), and pngcrush_examine_pixels_fn().

◆ remove_chunks

int remove_chunks = 0
static

Definition at line 2228 of file pngcrush.c.

Referenced by keep_chunk(), keep_unknown_chunk(), and main().

◆ resolution

int resolution = 0
static

Definition at line 2227 of file pngcrush.c.

Referenced by main().

◆ row_buf

png_bytep row_buf
static

Definition at line 2299 of file pngcrush.c.

Referenced by main(), and png_write_find_filter().

◆ salvage

int salvage = 0
static

Definition at line 2240 of file pngcrush.c.

Referenced by main(), and pngcrush_measure_idat().

◆ save_apng_chunks

int save_apng_chunks = 0
static

Definition at line 2177 of file pngcrush.c.

Referenced by main().

◆ show_warnings

int show_warnings = 0
static

Definition at line 1413 of file pngcrush.c.

Referenced by main(), and pngcrush_warning().

◆ specified_gamma

int specified_gamma = 0
static

Definition at line 2312 of file pngcrush.c.

Referenced by main().

◆ specified_intent

int specified_intent = -1
static

Definition at line 2306 of file pngcrush.c.

Referenced by main().

◆ speed

int speed = 0
static

Definition at line 2290 of file pngcrush.c.

Referenced by main().

◆ ster_mode

int ster_mode = -1
static

Definition at line 2308 of file pngcrush.c.

Referenced by main().

◆ t_filter

float t_filter[4] = {0}
static

Definition at line 2376 of file pngcrush.c.

Referenced by main(), and show_result().

◆ t_nsec

png_uint_32 t_nsec

Definition at line 2379 of file pngcrush.c.

Referenced by main(), and show_result().

◆ t_sec

png_uint_32 t_sec

Definition at line 2378 of file pngcrush.c.

Referenced by main(), and show_result().

◆ text_compression

int text_compression[10]

Definition at line 2196 of file pngcrush.c.

Referenced by main().

◆ text_inputs

int text_inputs = 0
static

Definition at line 2194 of file pngcrush.c.

Referenced by main().

◆ text_keyword

char text_keyword[11 *80+1]

Definition at line 2200 of file pngcrush.c.

Referenced by main().

◆ text_lang

char text_lang[881]

Definition at line 2203 of file pngcrush.c.

Referenced by main().

◆ text_lang_key

char text_lang_key[881]

Definition at line 2204 of file pngcrush.c.

Referenced by main().

◆ text_text

char text_text[11 *2048+1]

Definition at line 2198 of file pngcrush.c.

Referenced by main().

◆ text_where

int text_where[10]

Definition at line 2195 of file pngcrush.c.

Referenced by main().

◆ the_exception_context

struct exception_context the_exception_context

Definition at line 2220 of file pngcrush.c.

◆ total_input_length

png_uint_32 total_input_length = 0
static

Definition at line 2224 of file pngcrush.c.

Referenced by main(), and show_result().

◆ total_output_length

png_uint_32 total_output_length = 0
static

Definition at line 2225 of file pngcrush.c.

Referenced by show_result().

◆ trans

png_bytep trans

Definition at line 2337 of file pngcrush.c.

Referenced by main(), and png_image_read_colormap().

◆ trans_in

png_byte trans_in[256]
static

Definition at line 2333 of file pngcrush.c.

Referenced by main().

◆ trans_values

png_color_16p trans_values

Definition at line 2339 of file pngcrush.c.

Referenced by main().

◆ trial

int trial
static

Definition at line 2235 of file pngcrush.c.

Referenced by main().

◆ trns_array

png_byte trns_array[256]
static

Definition at line 2332 of file pngcrush.c.

Referenced by main().

◆ trns_blue

png_uint_16 trns_blue = 0
static

Definition at line 2329 of file pngcrush.c.

Referenced by main().

◆ trns_gray

png_uint_16 trns_gray = 0
static

Definition at line 2330 of file pngcrush.c.

Referenced by main().

◆ trns_green

png_uint_16 trns_green = 0
static

Definition at line 2328 of file pngcrush.c.

Referenced by main().

◆ trns_index

png_uint_16 trns_index = 0
static

Definition at line 2326 of file pngcrush.c.

Referenced by main().

◆ trns_red

png_uint_16 trns_red = 0
static

Definition at line 2327 of file pngcrush.c.

Referenced by main().

◆ verbose

◆ width

◆ write_end_info_ptr

png_infop write_end_info_ptr
static

Definition at line 2358 of file pngcrush.c.

Referenced by main().

◆ write_info_ptr

png_infop write_info_ptr
static

Definition at line 2356 of file pngcrush.c.

Referenced by main().

◆ write_ptr

png_structp write_ptr
static

Definition at line 2355 of file pngcrush.c.

Referenced by main().

◆ z_strategy

int z_strategy
static

Definition at line 2303 of file pngcrush.c.

Referenced by main().

◆ zlib_level

int zlib_level
static

Definition at line 2371 of file pngcrush.c.

Referenced by main().

PNG_FLAG_CRC_ANCILLARY_USE
#define PNG_FLAG_CRC_ANCILLARY_USE
Definition: pngcrush.c:1977
width
static png_uint_32 width
Definition: pngcrush.c:2136
png_size_t
size_t png_size_t
Definition: pngconf.h:527
STDERR
#define STDERR
Definition: pngcrush.c:2008