194 png_uint_32 chunk_name;
195 #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED 207 png_byte chunk_length[4];
208 png_byte chunk_tag[4];
220 chunk_name = png_ptr->chunk_name;
232 png_error(png_ptr,
"Missing IHDR before IDAT");
236 png_error(png_ptr,
"Missing PLTE before IDAT");
242 if (png_ptr->push_length == 0)
251 if (png_ptr->push_length != 13)
252 png_error(png_ptr,
"Invalid IHDR length");
267 #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED 284 else if (chunk_name == png_IDAT)
286 png_ptr->idat_size = png_ptr->push_length;
289 png_ptr->zstream.avail_out =
291 png_ptr->iwidth) + 1;
292 png_ptr->zstream.next_out = png_ptr->row_buf;
296 #ifdef PNG_READ_gAMA_SUPPORTED 297 else if (png_ptr->chunk_name ==
png_gAMA)
304 #ifdef PNG_READ_sBIT_SUPPORTED 305 else if (png_ptr->chunk_name ==
png_sBIT)
312 #ifdef PNG_READ_cHRM_SUPPORTED 313 else if (png_ptr->chunk_name ==
png_cHRM)
320 #ifdef PNG_READ_sRGB_SUPPORTED 328 #ifdef PNG_READ_iCCP_SUPPORTED 329 else if (png_ptr->chunk_name ==
png_iCCP)
336 #ifdef PNG_READ_sPLT_SUPPORTED 344 #ifdef PNG_READ_tRNS_SUPPORTED 352 #ifdef PNG_READ_bKGD_SUPPORTED 360 #ifdef PNG_READ_hIST_SUPPORTED 368 #ifdef PNG_READ_pHYs_SUPPORTED 376 #ifdef PNG_READ_oFFs_SUPPORTED 384 #ifdef PNG_READ_pCAL_SUPPORTED 392 #ifdef PNG_READ_sCAL_SUPPORTED 400 #ifdef PNG_READ_tIME_SUPPORTED 408 #ifdef PNG_READ_tEXt_SUPPORTED 416 #ifdef PNG_READ_zTXt_SUPPORTED 424 #ifdef PNG_READ_iTXt_SUPPORTED 439 png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER;
void png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
Definition: pngpread.c:506
void png_handle_cHRM(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1179
void png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length, int keep)
Definition: pngrutil.c:2765
#define png_PLTE
Definition: pngpriv.h:755
#define PNG_READ_DONE_MODE
Definition: pngpread.c:25
#define png_sCAL
Definition: pngpriv.h:770
#define png_iTXt
Definition: pngpriv.h:765
#define png_bKGD
Definition: pngpriv.h:756
void png_handle_zTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:2447
#define png_tRNS
Definition: pngpriv.h:776
#define png_sRGB
Definition: pngpriv.h:772
#define PNG_HAVE_CHUNK_HEADER
Definition: pngpriv.h:550
void png_handle_pCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:2098
void png_handle_hIST(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1954
#define png_iCCP
Definition: pngpriv.h:764
#define PNG_COLOR_TYPE_PALETTE
Definition: png.h:810
void png_handle_pHYs(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:2005
#define png_IEND
Definition: pngpriv.h:753
void png_handle_gAMA(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1061
void png_handle_bKGD(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1854
#define png_sPLT
Definition: pngpriv.h:771
#define PNG_HAVE_PLTE
Definition: png.h:786
void png_handle_sRGB(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1251
void png_reset_crc(png_structrp png_ptr)
Definition: png.c:102
void png_handle_tIME(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:2320
void png_check_chunk_name(png_structrp png_ptr, png_uint_32 chunk_name)
Definition: pngrutil.c:2977
#define PNG_PUSH_SAVE_BUFFER_IF_FULL
Definition: pngpread.c:29
void png_handle_tEXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:2366
#define PNG_HANDLE_CHUNK_AS_DEFAULT
Definition: png.h:2497
void png_handle_oFFs(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:2051
#define PNG_READ_IDAT_MODE
Definition: pngpread.c:21
#define PNG_HAVE_IDAT
Definition: pngpriv.h:544
#define PNG_HAVE_IHDR
Definition: png.h:785
#define png_IHDR
Definition: pngpriv.h:754
#define png_tEXt
Definition: pngpriv.h:774
#define PNG_CHUNK_FROM_STRING(s)
Definition: pngpriv.h:782
void png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1751
#define PNG_HAVE_CHUNK_AFTER_IDAT
Definition: pngpriv.h:555
void png_push_have_info(png_structrp png_ptr, png_inforp info_ptr)
Definition: pngpread.c:1109
void png_handle_sBIT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1099
#define PNG_PUSH_SAVE_BUFFER_IF_LT(N)
Definition: pngpread.c:32
#define png_IDAT
Definition: pngpriv.h:752
#define PNG_AFTER_IDAT
Definition: png.h:787
void png_crc_read(png_structrp png_ptr, png_bytep buf, png_uint_32 length)
Definition: pngrutil.c:187
#define png_oFFs
Definition: pngpriv.h:766
#define png_gAMA
Definition: pngpriv.h:759
#define png_pCAL
Definition: pngpriv.h:767
PNG_IMPEXP png_uint_32() png_get_uint_31(png_const_structrp png_ptr, png_const_bytep buf)
Definition: pngrutil.c:22
#define png_cHRM
Definition: pngpriv.h:757
png_uint_32 mode
Definition: pngstruct.h:179
void png_handle_IEND(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1041
void png_handle_iTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:2556
PNG_IMPEXP void() png_error(png_const_structrp png_ptr, png_const_charp error_message)
Definition: pngerror.c:40
void png_handle_IHDR(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:793
int png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name)
Definition: png.c:919
#define png_sBIT
Definition: pngpriv.h:769
void png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1574
void png_push_have_end(png_structrp png_ptr, png_inforp info_ptr)
Definition: pngpread.c:1116
#define png_hIST
Definition: pngpriv.h:763
void png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:2227
#define png_pHYs
Definition: pngpriv.h:768
#define PNG_ROWBYTES(pixel_bits, width)
Definition: pngpriv.h:660
void png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:1301
#define png_tIME
Definition: pngpriv.h:775
void png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
Definition: pngrutil.c:867
#define png_zTXt
Definition: pngpriv.h:777
unsigned int uInt
Definition: zconf.h:370
PNG_IMPEXP void() png_benign_error(png_const_structrp png_ptr, png_const_charp warning_message)
Definition: pngerror.c:362