[master] Imported from libpng-1.4.6beta06.tar

This commit is contained in:
Glenn Randers-Pehrson 2011-01-22 21:48:43 -06:00
parent 8502e1ff25
commit 686d45dcfd
11 changed files with 53 additions and 85 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.4.6beta06 - March 14, 2011
Libpng 1.4.6beta06 - January 23, 2011
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -49,9 +49,7 @@ version 1.4.6beta05 [January 23, 2011]
Fixed a typo in the *.def files and deleted entries that are now
declared in pngpriv.h
version 1.4.6beta06 [March 14, 2011]
Updated contrib/pngsuite/README to add the word "modify".
Added the private PNG_UNUSED() macro definition in pngconf.h.
version 1.4.6beta06 [January 23, 2011]
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -2761,9 +2761,7 @@ version 1.4.6beta05 [January 23, 2011]
Fixed a typo in the *.def files and deleted entries that are now
declared in pngpriv.h
version 1.4.6beta06 [March 14, 2011]
Updated contrib/pngsuite/README to add the word "modify".
Added the private PNG_UNUSED() macro definition in pngconf.h.
version 1.4.6beta06 [January 23, 2011]
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -1,58 +1,41 @@
pngsuite
--------
(c) Willem van Schaik, 1999, 2011
(c) Willem van Schaik, 1999
Permission to use, copy, modify, and distribute these images for any
purpose and without fee is hereby granted.
Permission to use, copy, and distribute these images for any purpose and
without fee is hereby granted.
The 15 "bas*.png" images are part of the much larger PngSuite test-set of
These 15 images are part of the much larger PngSuite test-set of
images, available for developers of PNG supporting software. The
complete set, available at http:/www.schaik.com/pngsuite/, contains
a variety of images to test interlacing, gamma settings, ancillary
chunks, etc.
The "ft*.png" images are "free/libre" replacements for the transparent
corresponding t*.png images in the PngSuite.
The images in this directory represent the basic PNG color-types:
grayscale (1-16 bit deep), full color (8 or 16 bit), paletted
(1-8 bit) and grayscale or color images with alpha channel. You
can use them to test the proper functioning of PNG software.
filename depth type
filename depth type
------------ ------ --------------
basn0g01.png 1-bit grayscale
basn0g02.png 2-bit grayscale
basn0g04.png 4-bit grayscale
basn0g08.png 8-bit grayscale
basn0g16.png 16-bit grayscale
basn2c08.png 8-bit truecolor
basn2c16.png 16-bit truecolor
basn3p01.png 1-bit paletted
basn3p02.png 2-bit paletted
basn3p04.png 4-bit paletted
basn3p08.png 8-bit paletted
basn4a08.png 8-bit gray with alpha
basn4a16.png 16-bit gray with alpha
basn6a08.png 8-bit RGBA
basn6a16.png 16-bit RGBA
basn0g01.png 1-bit grayscale
basn0g02.png 2-bit grayscale
basn0g04.png 4-bit grayscale
basn0g08.png 8-bit grayscale
basn0g16.png 16-bit grayscale
basn2c08.png 8-bit truecolor
basn2c16.png 16-bit truecolor
basn3p01.png 1-bit paletted
basn3p02.png 2-bit paletted
basn3p04.png 4-bit paletted
basn3p08.png 8-bit paletted
basn4a08.png 8-bit gray with alpha
basn4a16.png 16-bit gray with alpha
basn6a08.png 8-bit RGBA
basn6a16.png 16-bit RGBA
ftbbn0g04.png 4-bit grayscale, black bKGD
ftbbn2c16.png 16-bit truecolor, black bKGD
ftbbn3p08.png 8-bit paletted, black bKGD
ftbgn2c16.png 16-bit truecolor, gray bKGD
ftbgn3p08.png 8-bit paletted, gray bKGD
ftbrn2c08.png 8-bit truecolor, red bKGD
ftbwn0g16.png 16-bit gray, white bKGD
ftbwn3p08.png 8-bit paletted, white bKGD
ftbyn3p08.png 8-bit paletted, yellow bKGD
ftp0n0g08.png 8-bit grayscale, opaque
ftp0n2c08.png 8-bit truecolor, opaque
ftp0n3p08.png 8-bit paletted, opaque
ftp1n3p08.png 8-bit paletted, no bKGD
Here is the correct result of typing "pngtest -m bas*.png" in
Here is the correct result of typing "pngtest -m *.png" in
this directory:
Testing basn0g01.png: PASS (524 zero samples)

12
png.c
View File

@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
* Last changed in libpng 1.4.6 [March 8, 2011]
* Last changed in libpng 1.4.6 [January 23, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -541,19 +541,19 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
png_charp PNGAPI
png_get_copyright(png_const_structp png_ptr)
{
PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
#ifdef PNG_STRING_COPYRIGHT
return PNG_STRING_COPYRIGHT
#else
#ifdef __STDC__
return ((png_charp) PNG_STRING_NEWLINE \
"libpng version 1.4.6beta06 - March 8, 2011" PNG_STRING_NEWLINE \
"libpng version 1.4.6beta06 - January 23, 2011" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE);
#else
return ((png_charp) "libpng version 1.4.6beta06 - March 8, 2011\
return ((png_charp) "libpng version 1.4.6beta06 - January 23, 2011\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
@ -573,7 +573,7 @@ png_charp PNGAPI
png_get_libpng_ver(png_const_structp png_ptr)
{
/* Version of *.c files used when building libpng */
PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
return ((png_charp) PNG_LIBPNG_VER_STRING);
}
@ -581,7 +581,7 @@ png_charp PNGAPI
png_get_header_ver(png_const_structp png_ptr)
{
/* Version of *.h files used when building libpng */
PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
return ((png_charp) PNG_LIBPNG_VER_STRING);
}

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.4.6beta06 - March 14, 2011
* libpng version 1.4.6beta06 - January 23, 2011
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -84,18 +84,6 @@
/* End of material added to libpng-1.2.8 */
/* Added at libpng-1.4.6 */
#ifndef PNG_UNUSED
/* Unused formal parameter warnings are silenced using the following macro
* which is expected to have no bad effects on performance (optimizing
* compilers will probably remove it entirely). Note that if you replace
* it with something other than whitespace, you must include the terminating
* semicolon.
*/
# define PNG_UNUSED(param) (void)param;
#endif
/* End of material added to libpng-1.4.6 */
#ifndef PNG_VERSION_INFO_ONLY
/* This is the size of the compression buffer, and thus the size of

View File

@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* Last changed in libpng 1.4.6 [March 8, 2011]
* Last changed in libpng 1.4.6 [January 23, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -306,7 +306,7 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
/* Here if not setjmp support or if png_ptr is null. */
PNG_ABORT();
#ifndef PNG_CONSOLE_IO_SUPPORTED
PNG_UNUSED(error_message) /* Make compiler happy */
error_message = error_message; /* Make compiler happy */
#endif
}
@ -352,9 +352,9 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
fprintf(stderr, PNG_STRING_NEWLINE);
}
#else
PNG_UNUSED(warning_message) /* Make compiler happy */
warning_message = warning_message; /* Make compiler happy */
#endif
PNG_UNUSED(png_ptr) /* Make compiler happy */
png_ptr = png_ptr; /* Make compiler happy */
}
#endif /* PNG_WARNINGS_SUPPORTED */

View File

@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode
*
* Last changed in libpng 1.4.6 [March 8, 2011]
* Last changed in libpng 1.4.6 [January 23, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -1204,7 +1204,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{
png_error(png_ptr, "Out of place tEXt");
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
info_ptr = info_ptr; /* To quiet some compiler warnings */
}
#ifdef PNG_MAX_MALLOC_64K
@ -1302,7 +1302,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{
png_error(png_ptr, "Out of place zTXt");
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
info_ptr = info_ptr; /* To quiet some compiler warnings */
}
#ifdef PNG_MAX_MALLOC_64K
@ -1503,7 +1503,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{
png_error(png_ptr, "Out of place iTXt");
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
info_ptr = info_ptr; /* To quiet some compiler warnings */
}
#ifdef PNG_MAX_MALLOC_64K
@ -1637,7 +1637,8 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
)
#endif
png_chunk_error(png_ptr, "unknown critical chunk");
PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
info_ptr = info_ptr; /* To quiet some compiler warnings */
}
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED

View File

@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
* Last changed in libpng 1.4.6 [March 8, 2011]
* Last changed in libpng 1.4.6 [January 14, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -1337,8 +1337,8 @@ 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);
PNG_UNUSED(transforms) /* Quiet compiler warnings */
PNG_UNUSED(params)
transforms = transforms; /* Quiet compiler warnings */
params = params;
}
#endif /* PNG_INFO_IMAGE_SUPPORTED */

View File

@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.4.6 [March 8, 2011]
* Last changed in libpng 1.4.6 [January 23, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -703,7 +703,7 @@ png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_finish(png_ptr, length);
PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */
info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */
}
#ifdef PNG_READ_gAMA_SUPPORTED
@ -2505,7 +2505,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, skip);
#ifndef PNG_READ_USER_CHUNKS_SUPPORTED
PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */
info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */
#endif
}
@ -2961,7 +2961,7 @@ png_do_read_interlace(png_structp png_ptr)
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width);
}
#ifndef PNG_READ_PACKSWAP_SUPPORTED
PNG_UNUSED(transformations) /* Silence compiler warning */
transformations = transformations; /* Silence compiler warning */
#endif
}
#endif /* PNG_READ_INTERLACING_SUPPORTED */

View File

@ -1,7 +1,7 @@
/* pngtest.c - a simple test program to test libpng
*
* Last changed in libpng 1.4.6 [March 8, 2011]
* Last changed in libpng 1.4.6 [January 14, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -387,7 +387,7 @@ static void
pngtest_flush(png_structp png_ptr)
{
/* Do nothing; fflush() is said to be just a waste of energy. */
PNG_UNUSED(png_ptr) /* Stifle compiler warning */
png_ptr = png_ptr; /* Stifle compiler warning */
}
#endif

View File

@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
* Last changed in libpng 1.4.6 [March 8, 2011]
* Last changed in libpng 1.4.6 [January 14, 2011]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -1451,8 +1451,8 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
/* It is REQUIRED to call this to finish writing the rest of the file */
png_write_end(png_ptr, info_ptr);
PNG_UNUSED(transforms) /* Quiet compiler warnings */
PNG_UNUSED(params)
transforms = transforms; /* Quiet compiler warnings */
params = params;
}
#endif
#endif /* PNG_WRITE_SUPPORTED */