Imported from libpng-1.2.0beta2.tar

This commit is contained in:
Glenn Randers-Pehrson
2001-05-07 14:52:45 -05:00
parent 1fd5fb33c2
commit 3097f618f2
53 changed files with 413 additions and 283 deletions

View File

@@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
* libpng 1.2.0beta1 - May 6, 2001
* libpng 1.2.0beta2 - May 7, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -53,7 +53,6 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
{
return (png_structp)NULL;
}
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
png_init_mmx_flags(png_ptr); /* 1.2.0 addition */
#endif
@@ -723,7 +722,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
* not called png_set_interlace_handling(), the display_row buffer will
* be ignored, so pass NULL to it.
*
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta1
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta2
*/
void PNGAPI
@@ -772,7 +771,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
* only call this function once. If you desire to have an image for
* each pass of a interlaced image, use png_read_rows() instead.
*
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta1
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta2
*/
void PNGAPI
png_read_image(png_structp png_ptr, png_bytepp image)
@@ -1060,7 +1059,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
}
/* free all memory used by the read (old method) */
void PNGAPI
void /* PRIVATE */
png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)
{
#ifdef PNG_SETJMP_SUPPORTED
@@ -1313,7 +1312,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* Optional call to gamma correct and add the background to the palette
* and update info structure. REQUIRED if you are expecting libpng to
* update the palette for you (ie you selected such a transform above).
* update the palette for you (i.e., you selected such a transform above).
*/
png_read_update_info(png_ptr, info_ptr);
@@ -1325,13 +1324,15 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
if(info_ptr->row_pointers == NULL)
{
info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
info_ptr->height * sizeof(png_bytep));
info_ptr->height * sizeof(png_bytep));
#ifdef PNG_FREE_ME_SUPPORTED
info_ptr->free_me |= PNG_FREE_ROWS;
#endif
for (row = 0; row < (int)info_ptr->height; row++)
info_ptr->row_pointers[row] = png_malloc(png_ptr,
{
info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
png_get_rowbytes(png_ptr, info_ptr));
}
}
png_read_image(png_ptr, info_ptr->row_pointers);
@@ -1340,7 +1341,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* read rest of file, and get additional chunks in info_ptr - REQUIRED */
png_read_end(png_ptr, info_ptr);
if(transforms == 0 || params == (voidp)NULL)
if(transforms == 0 || params == NULL)
/* quiet compiler warnings */ return;
}