mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.4.0beta27.tar
This commit is contained in:
24
pngread.c
24
pngread.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.4.0 [August 4, 2008]
|
||||
* Last changed in libpng 1.4.0 [August 5, 2008]
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -44,7 +44,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
|
||||
int i;
|
||||
|
||||
png_debug(1, "in png_create_read_struct\n");
|
||||
png_debug(1, "in png_create_read_struct");
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
|
||||
malloc_fn, mem_ptr);
|
||||
@@ -202,7 +202,7 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
|
||||
}
|
||||
} while (png_libpng_ver[i++]);
|
||||
|
||||
png_debug(1, "in png_read_init_3\n");
|
||||
png_debug(1, "in png_read_init_3");
|
||||
|
||||
#ifdef PNG_SETJMP_SUPPORTED
|
||||
/* save jump buffer and error functions */
|
||||
@@ -266,7 +266,7 @@ void PNGAPI
|
||||
png_read_info(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
if (png_ptr == NULL || info_ptr == NULL) return;
|
||||
png_debug(1, "in png_read_info\n");
|
||||
png_debug(1, "in png_read_info");
|
||||
/* If we haven't checked all of the PNG signature bytes, do so now. */
|
||||
if (png_ptr->sig_bytes < 8)
|
||||
{
|
||||
@@ -476,7 +476,7 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
|
||||
void PNGAPI
|
||||
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
png_debug(1, "in png_read_update_info\n");
|
||||
png_debug(1, "in png_read_update_info");
|
||||
if (png_ptr == NULL) return;
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
png_read_start_row(png_ptr);
|
||||
@@ -495,7 +495,7 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr)
|
||||
void PNGAPI
|
||||
png_start_read_image(png_structp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_start_read_image\n");
|
||||
png_debug(1, "in png_start_read_image");
|
||||
if (png_ptr == NULL) return;
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
png_read_start_row(png_ptr);
|
||||
@@ -514,7 +514,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
#endif
|
||||
int ret;
|
||||
if (png_ptr == NULL) return;
|
||||
png_debug2(1, "in png_read_row (row %lu, pass %d)\n",
|
||||
png_debug2(1, "in png_read_row (row %lu, pass %d)",
|
||||
(unsigned long) png_ptr->row_number, png_ptr->pass);
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
png_read_start_row(png_ptr);
|
||||
@@ -764,7 +764,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
|
||||
png_bytepp rp;
|
||||
png_bytepp dp;
|
||||
|
||||
png_debug(1, "in png_read_rows\n");
|
||||
png_debug(1, "in png_read_rows");
|
||||
if (png_ptr == NULL) return;
|
||||
rp = row;
|
||||
dp = display_row;
|
||||
@@ -813,7 +813,7 @@ png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
int pass, j;
|
||||
png_bytepp rp;
|
||||
|
||||
png_debug(1, "in png_read_image\n");
|
||||
png_debug(1, "in png_read_image");
|
||||
if (png_ptr == NULL) return;
|
||||
|
||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||
@@ -849,7 +849,7 @@ png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
void PNGAPI
|
||||
png_read_end(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
png_debug(1, "in png_read_end\n");
|
||||
png_debug(1, "in png_read_end");
|
||||
if (png_ptr == NULL) return;
|
||||
png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
|
||||
|
||||
@@ -1029,7 +1029,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
|
||||
png_voidp mem_ptr = NULL;
|
||||
#endif
|
||||
|
||||
png_debug(1, "in png_destroy_read_struct\n");
|
||||
png_debug(1, "in png_destroy_read_struct");
|
||||
if (png_ptr_ptr != NULL)
|
||||
png_ptr = *png_ptr_ptr;
|
||||
if (png_ptr == NULL)
|
||||
@@ -1103,7 +1103,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
|
||||
png_free_ptr free_fn;
|
||||
#endif
|
||||
|
||||
png_debug(1, "in png_read_destroy\n");
|
||||
png_debug(1, "in png_read_destroy");
|
||||
if (info_ptr != NULL)
|
||||
png_info_destroy(png_ptr, info_ptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user