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)  

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

Go to the source code of this file.

Macros

#define PNG_READ_SIG_MODE   0
 
#define PNG_READ_CHUNK_MODE   1
 
#define PNG_READ_IDAT_MODE   2
 
#define PNG_READ_tEXt_MODE   4
 
#define PNG_READ_zTXt_MODE   5
 
#define PNG_READ_DONE_MODE   6
 
#define PNG_READ_iTXt_MODE   7
 
#define PNG_ERROR_MODE   8
 
#define PNG_PUSH_SAVE_BUFFER_IF_FULL
 
#define PNG_PUSH_SAVE_BUFFER_IF_LT(N)
 

Functions

void png_process_data (png_structrp png_ptr, png_inforp info_ptr, png_bytep buffer, png_size_t buffer_size)
 
png_size_t png_process_data_pause (png_structrp png_ptr, int save)
 
png_uint_32 png_process_data_skip (png_structrp png_ptr)
 
void png_process_some_data (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_read_sig (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_read_chunk (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_fill_buffer (png_structp png_ptr, png_bytep buffer, png_size_t length)
 
void png_push_save_buffer (png_structrp png_ptr)
 
void png_push_restore_buffer (png_structrp png_ptr, png_bytep buffer, png_size_t buffer_length)
 
void png_push_read_IDAT (png_structrp png_ptr)
 
void png_process_IDAT_data (png_structrp png_ptr, png_bytep buffer, png_size_t buffer_length)
 
void png_push_process_row (png_structrp png_ptr)
 
void png_read_push_finish_row (png_structrp png_ptr)
 
void png_push_have_info (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_have_end (png_structrp png_ptr, png_inforp info_ptr)
 
void png_push_have_row (png_structrp png_ptr, png_bytep row)
 
void png_progressive_combine_row (png_const_structrp png_ptr, png_bytep old_row, png_const_bytep new_row)
 
void png_set_progressive_read_fn (png_structrp png_ptr, png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)
 
png_voidp png_get_progressive_ptr (png_const_structrp png_ptr)
 

Macro Definition Documentation

◆ PNG_ERROR_MODE

#define PNG_ERROR_MODE   8

Definition at line 26 of file pngpread.c.

◆ PNG_PUSH_SAVE_BUFFER_IF_FULL

#define PNG_PUSH_SAVE_BUFFER_IF_FULL
Value:
if (png_ptr->push_length + 4 > png_ptr->buffer_size) \
{ png_push_save_buffer(png_ptr); return; }

Definition at line 28 of file pngpread.c.

◆ PNG_PUSH_SAVE_BUFFER_IF_LT

#define PNG_PUSH_SAVE_BUFFER_IF_LT (   N)
Value:
if (png_ptr->buffer_size < N) \
{ png_push_save_buffer(png_ptr); return; }

Definition at line 31 of file pngpread.c.

◆ PNG_READ_CHUNK_MODE

#define PNG_READ_CHUNK_MODE   1

Definition at line 20 of file pngpread.c.

◆ PNG_READ_DONE_MODE

#define PNG_READ_DONE_MODE   6

Definition at line 24 of file pngpread.c.

◆ PNG_READ_IDAT_MODE

#define PNG_READ_IDAT_MODE   2

Definition at line 21 of file pngpread.c.

◆ PNG_READ_iTXt_MODE

#define PNG_READ_iTXt_MODE   7

Definition at line 25 of file pngpread.c.

◆ PNG_READ_SIG_MODE

#define PNG_READ_SIG_MODE   0

Definition at line 19 of file pngpread.c.

◆ PNG_READ_tEXt_MODE

#define PNG_READ_tEXt_MODE   4

Definition at line 22 of file pngpread.c.

◆ PNG_READ_zTXt_MODE

#define PNG_READ_zTXt_MODE   5

Definition at line 23 of file pngpread.c.

Function Documentation

◆ png_get_progressive_ptr()

png_voidp png_get_progressive_ptr ( png_const_structrp  png_ptr)

Definition at line 1089 of file pngpread.c.

◆ png_process_data()

void png_process_data ( png_structrp  png_ptr,
png_inforp  info_ptr,
png_bytep  buffer,
png_size_t  buffer_size 
)

Definition at line 36 of file pngpread.c.

References buffer, png_process_some_data(), and png_push_restore_buffer().

◆ png_process_data_pause()

png_size_t png_process_data_pause ( png_structrp  png_ptr,
int  save 
)

Definition at line 51 of file pngpread.c.

References png_push_save_buffer().

◆ png_process_data_skip()

png_uint_32 png_process_data_skip ( png_structrp  png_ptr)

Definition at line 78 of file pngpread.c.

References png_app_warning().

◆ png_process_IDAT_data()

◆ png_process_some_data()

void png_process_some_data ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_progressive_combine_row()

void png_progressive_combine_row ( png_const_structrp  png_ptr,
png_bytep  old_row,
png_const_bytep  new_row 
)

Definition at line 1058 of file pngpread.c.

References png_combine_row().

◆ png_push_fill_buffer()

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

Definition at line 421 of file pngpread.c.

References buffer, and length.

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

◆ png_push_have_end()

void png_push_have_end ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

Definition at line 1042 of file pngpread.c.

Referenced by png_push_read_chunk().

◆ png_push_have_info()

void png_push_have_info ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

Definition at line 1035 of file pngpread.c.

Referenced by png_push_read_chunk().

◆ png_push_have_row()

void png_push_have_row ( png_structrp  png_ptr,
png_bytep  row 
)

Definition at line 1049 of file pngpread.c.

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

Referenced by png_push_process_row().

◆ png_push_process_row()

◆ png_push_read_chunk()

void png_push_read_chunk ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_read_IDAT()

◆ png_push_read_sig()

void png_push_read_sig ( png_structrp  png_ptr,
png_inforp  info_ptr 
)

◆ png_push_restore_buffer()

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

Definition at line 524 of file pngpread.c.

References buffer.

Referenced by png_process_data().

◆ png_push_save_buffer()

void png_push_save_buffer ( png_structrp  png_ptr)

Definition at line 464 of file pngpread.c.

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

Referenced by png_process_data_pause().

◆ png_read_push_finish_row()

◆ png_set_progressive_read_fn()

void png_set_progressive_read_fn ( png_structrp  png_ptr,
png_voidp  progressive_ptr,
png_progressive_info_ptr  info_fn,
png_progressive_row_ptr  row_fn,
png_progressive_end_ptr  end_fn 
)

Definition at line 1074 of file pngpread.c.

References png_push_fill_buffer(), and png_set_read_fn().

png_push_save_buffer
void png_push_save_buffer(png_structrp png_ptr)
Definition: pngpread.c:464