[libpng16] Bump version to 1.6.0beta28

This commit is contained in:
Glenn Randers-Pehrson 2012-08-17 21:23:06 -05:00
parent 74a9c07fdd
commit 702053d110
24 changed files with 1635 additions and 690 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.6.0beta28 - August 17, 2012
Libpng 1.6.0beta28 - August 18, 2012
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.
@ -442,7 +442,7 @@ Version 1.6.0beta27 [August 11, 2012]
Work around gcc 3.x and Microsoft Visual Studio 2010 complaints. Both object
to the split initialization of num_chunks.
Version 1.6.0beta28 [August 17, 2012]
Version 1.6.0beta28 [August 18, 2012]
Unknown handling fixes and clean up. This adds more correct option
control of the unknown handling, corrects the pre-existing bug where
the per-chunk 'keep' setting is ignored and makes it possible to skip

View File

@ -4193,7 +4193,7 @@ Version 1.6.0beta27 [August 11, 2012]
Work around gcc 3.x and Microsoft Visual Studio 2010 complaints. Both object
to the split initialization of num_chunks.
Version 1.6.0beta28 [August 17, 2012]
Version 1.6.0beta28 [August 18, 2012]
Unknown handling fixes and clean up. This adds more correct option
control of the unknown handling, corrects the pre-existing bug where
the per-chunk 'keep' setting is ignored and makes it possible to skip

View File

@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.6.0beta28, August 11, 2012, are
libpng versions 1.2.6, August 15, 2004, through 1.6.0beta28, August 18, 2012, are
Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
August 11, 2012
August 18, 2012

View File

@ -14,14 +14,14 @@ pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS = test-pngtest.sh
# Only do the following if the contrib directory is present.
check_PROGRAMS+= pngvalid pngstest tunknown
check_PROGRAMS+= pngvalid pngstest pngunknown
pngvalid_SOURCES = contrib/libtests/pngvalid.c
pngstest_SOURCES = contrib/libtests/pngstest.c
tunknown_SOURCES = contrib/libtests/test-unknown.c
pngunknown_SOURCES = contrib/libtests/pngunknown.c
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
tunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS += contrib/libtests/test-unknown.sh\
pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS += contrib/libtests/test-pngunknown.sh\
contrib/libtests/test-pngvalid-simple.sh\
contrib/libtests/test-pngvalid-full.sh\
contrib/libtests/test-pngstest.sh

1450
Makefile.in_1_11_2 Normal file

File diff suppressed because it is too large Load Diff

2
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.6.0beta28 - August 11, 2012 (shared library 16.0)
README for libpng version 1.6.0beta28 - August 18, 2012 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

View File

@ -1,5 +1,5 @@
/* test-unknown.c - test the read side unknown chunk handling
/* pngunknown.c - test the read side unknown chunk handling
*
* Last changed in libpng 1.6.0 [(PENDING RELEASE)]
* Copyright (c) 2012 Glenn Randers-Pehrson
@ -12,7 +12,7 @@
* NOTES:
* This is a C program that is intended to be linked against libpng. It
* allows the libpng unknown handling code to be tested by interpreting
* arguemnts to save or discard combinations of chunks. The program is
* arguments to save or discard combinations of chunks. The program is
* currently just a minimal validation for the built-in libpng facilities.
*/
@ -61,7 +61,7 @@ typedef png_byte *png_const_bytep;
#endif
#if PNG_LIBPNG_VER < 10600
/* 1.6.0 constifies many APIs, the following exists to allow pngvalid to be
/* 1.6.0 constifies many APIs. The following exists to allow pngvalid to be
* compiled against earlier versions.
*/
# define png_const_structp png_structp
@ -189,7 +189,7 @@ find_by_flag(png_uint_32 flag)
while (--i >= 0) if (chunk_info[i].flag == flag) return i;
fprintf(stderr, "test-unknown: internal error\n");
fprintf(stderr, "pngunknown: internal error\n");
exit(4);
}
@ -270,7 +270,7 @@ get_unknown(const char *file, int def, png_const_structp png_ptr,
{
int chunk = findb(unknown[num_unknown].name);
/* Chunks not know to test-unknown must be validated here; since they
/* Chunks not known to pngunknown must be validated here; since they
* must also be unknown to libpng the 'def' behavior should have been
* used.
*/
@ -640,7 +640,7 @@ main(int argc, const char **argv)
if (--argc < 1)
{
fprintf(stderr, "test-unknown: usage:\n"
fprintf(stderr, "pngunknown: usage:\n"
" %s {(CHNK|default|all)=(default|discard|if-safe|save)} testfile.png\n",
program);
exit(2);
@ -648,7 +648,7 @@ main(int argc, const char **argv)
# ifndef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
fprintf(stderr,
"test-unknown: warning: no 'save' support so arguments ignored\n");
"pngunknown: warning: no 'save' support so arguments ignored\n");
# endif
fp = fopen(argv[argc], "rb");
if (fp == NULL)

View File

@ -9,9 +9,9 @@ image="${srcdir}/pngtest.png"
exec 4>&1 1>>pngtest-log.txt 2>&1
echo
echo "============ test-unknown.sh =============="
echo "============ test-pngunknown.sh =============="
echo "Running test-unknown.sh" >&4
echo "Running test-pngunknown.sh" >&4
for tests in \
"discard default=discard"\
@ -26,11 +26,11 @@ do
test="$1"
shift
if ./tunknown "$@" "$image" 4>&-
if ./pngunknown "$@" "$image" 4>&-
then
echo " PASS: test-unknown $test" >&4
echo " PASS: test-pngunknown $test" >&4
else
echo " FAIL: test-unknown $test" >&4
echo " FAIL: test-pngunknown $test" >&4
err=1
fi
done

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.0beta28 - August 11, 2012
libpng version 1.6.0beta28 - August 18, 2012
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.0beta28 - August 11, 2012
libpng versions 0.97, January 1998, through 1.6.0beta28 - August 18, 2012
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -4563,9 +4563,12 @@ need access to information in zlib.h will need to add the '#include "zlib.h"'
directive. It does not matter whether this is placed prior to or after
the '"#include png.h"' directive.
We moved the png_strcpy(), png_strncpy(), png_strlen(), png_memcpy(),
png_memcmp(), png_sprintf(), and png_memcpy() macros into a private
header file (pngpriv.h) that is not accessible by applications.
The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used
and were removed.
We moved the png_strlen(), png_memcpy(), png_memset(), and png_memcmp()
macros into a private header file (pngpriv.h) that is not accessible to
applications.
In png_get_iCCP, the type of "profile" was changed from png_charpp
to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep.
@ -4874,9 +4877,10 @@ The following has been removed:
with png_get_io_chunk_type(). The new
function returns a 32-bit integer instead of
a string.
The png_sizeof(), png_strlen(), png_strncpy(), png_strcpy(), png_strncpy(),
png_memcpy(), png_memcmp(), png_sprintf(), and png_memset() macros are
no longer used in the libpng sources and have been removed.
The png_sizeof(), png_strlen(), png_memcpy(), png_memcmp(), and
png_memset() macros are no longer used in the libpng sources and
have been removed. These had already been made invisible to applications
since libpng-1.5.0.
XIII. Detecting libpng
@ -5028,6 +5032,9 @@ when there is only one macro being tested.
We prefer to express integers that are used as bit masks in hex format,
with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100).
We prefer to use underscores in variable names rather than camelCase, except
for a few type names that we inherit from zlib.h.
We do not use the TAB character for indentation in the C sources.
Lines do not exceed 80 characters.
@ -5036,7 +5043,7 @@ Other rules can be inferred by inspecting the libpng source.
XVI. Y2K Compliance in libpng
August 11, 2012
August 18, 2012
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.

564
libpng.3

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,11 @@
.TH LIBPNGPF 3 "August 11, 2012"
.TH LIBPNGPF 3 "August 18, 2012"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.0beta28
(private functions)
.SH SYNOPSIS
\fB#include \fI"pngpriv.h"
\fI\fB
\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now \fIthat
\fBthe private function prototypes are hidden in pngpriv.h and not \fIaccessible
\fBto applications. Look in pngpriv.h for the prototypes and a short \fIdescription
\fBof each \fIfunction.
\fI\fB
\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now that the private function prototypes are hidden in pngpriv.h and not accessible to applications. Look in pngpriv.h for the prototypes and a short description of each \fIfunction.
.SH DESCRIPTION
The functions previously listed here are used privately by libpng and are not

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "August 11, 2012"
.TH PNG 5 "August 18, 2012"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

114
png.c
View File

@ -139,18 +139,18 @@ png_calculate_crc(png_structrp png_ptr, png_const_bytep ptr, png_size_t length)
do
{
uInt safeLength = (uInt)length;
if (safeLength == 0)
safeLength = (uInt)-1; /* evil, but safe */
uInt safe_length = (uInt)length;
if (safe_length == 0)
safe_length = (uInt)-1; /* evil, but safe */
crc = crc32(crc, ptr, safeLength);
crc = crc32(crc, ptr, safe_length);
/* The following should never issue compiler warnings, if they do the
* target system has characteristics that will probably violate other
* assumptions within the libpng code.
*/
ptr += safeLength;
length -= safeLength;
ptr += safe_length;
length -= safe_length;
}
while (length > 0);
@ -749,13 +749,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.0beta28 - August 16, 2012" PNG_STRING_NEWLINE \
"libpng version 1.6.0beta28 - August 18, 2012" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2012 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 "libpng version 1.6.0beta28 - August 16, 2012\
return "libpng version 1.6.0beta28 - August 18, 2012\
Copyright (c) 1998-2012 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@ -1177,26 +1177,26 @@ png_xy_from_XYZ(png_xy *xy, const png_XYZ *XYZ)
{
png_int_32 d, dwhite, whiteX, whiteY;
d = XYZ->redX + XYZ->redY + XYZ->redZ;
if (!png_muldiv(&xy->redx, XYZ->redX, PNG_FP_1, d)) return 1;
if (!png_muldiv(&xy->redy, XYZ->redY, PNG_FP_1, d)) return 1;
d = XYZ->red_X + XYZ->red_Y + XYZ->red_Z;
if (!png_muldiv(&xy->redx, XYZ->red_X, PNG_FP_1, d)) return 1;
if (!png_muldiv(&xy->redy, XYZ->red_Y, PNG_FP_1, d)) return 1;
dwhite = d;
whiteX = XYZ->redX;
whiteY = XYZ->redY;
whiteX = XYZ->red_X;
whiteY = XYZ->red_Y;
d = XYZ->greenX + XYZ->greenY + XYZ->greenZ;
if (!png_muldiv(&xy->greenx, XYZ->greenX, PNG_FP_1, d)) return 1;
if (!png_muldiv(&xy->greeny, XYZ->greenY, PNG_FP_1, d)) return 1;
d = XYZ->green_X + XYZ->green_Y + XYZ->green_Z;
if (!png_muldiv(&xy->greenx, XYZ->green_X, PNG_FP_1, d)) return 1;
if (!png_muldiv(&xy->greeny, XYZ->green_Y, PNG_FP_1, d)) return 1;
dwhite += d;
whiteX += XYZ->greenX;
whiteY += XYZ->greenY;
whiteX += XYZ->green_X;
whiteY += XYZ->green_Y;
d = XYZ->blueX + XYZ->blueY + XYZ->blueZ;
if (!png_muldiv(&xy->bluex, XYZ->blueX, PNG_FP_1, d)) return 1;
if (!png_muldiv(&xy->bluey, XYZ->blueY, PNG_FP_1, d)) return 1;
d = XYZ->blue_X + XYZ->blue_Y + XYZ->blue_Z;
if (!png_muldiv(&xy->bluex, XYZ->blue_X, PNG_FP_1, d)) return 1;
if (!png_muldiv(&xy->bluey, XYZ->blue_Y, PNG_FP_1, d)) return 1;
dwhite += d;
whiteX += XYZ->blueX;
whiteY += XYZ->blueY;
whiteX += XYZ->blue_X;
whiteY += XYZ->blue_Y;
/* The reference white is simply the sum of the end-point (X,Y,Z) vectors,
* thus:
@ -1444,21 +1444,21 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
/* And fill in the png_XYZ: */
if (!png_muldiv(&XYZ->redX, xy->redx, PNG_FP_1, red_inverse)) return 1;
if (!png_muldiv(&XYZ->redY, xy->redy, PNG_FP_1, red_inverse)) return 1;
if (!png_muldiv(&XYZ->redZ, PNG_FP_1 - xy->redx - xy->redy, PNG_FP_1,
if (!png_muldiv(&XYZ->red_X, xy->redx, PNG_FP_1, red_inverse)) return 1;
if (!png_muldiv(&XYZ->red_Y, xy->redy, PNG_FP_1, red_inverse)) return 1;
if (!png_muldiv(&XYZ->red_Z, PNG_FP_1 - xy->redx - xy->redy, PNG_FP_1,
red_inverse))
return 1;
if (!png_muldiv(&XYZ->greenX, xy->greenx, PNG_FP_1, green_inverse)) return 1;
if (!png_muldiv(&XYZ->greenY, xy->greeny, PNG_FP_1, green_inverse)) return 1;
if (!png_muldiv(&XYZ->greenZ, PNG_FP_1 - xy->greenx - xy->greeny, PNG_FP_1,
if (!png_muldiv(&XYZ->green_X, xy->greenx, PNG_FP_1, green_inverse)) return 1;
if (!png_muldiv(&XYZ->green_Y, xy->greeny, PNG_FP_1, green_inverse)) return 1;
if (!png_muldiv(&XYZ->green_Z, PNG_FP_1 - xy->greenx - xy->greeny, PNG_FP_1,
green_inverse))
return 1;
if (!png_muldiv(&XYZ->blueX, xy->bluex, blue_scale, PNG_FP_1)) return 1;
if (!png_muldiv(&XYZ->blueY, xy->bluey, blue_scale, PNG_FP_1)) return 1;
if (!png_muldiv(&XYZ->blueZ, PNG_FP_1 - xy->bluex - xy->bluey, blue_scale,
if (!png_muldiv(&XYZ->blue_X, xy->bluex, blue_scale, PNG_FP_1)) return 1;
if (!png_muldiv(&XYZ->blue_Y, xy->bluey, blue_scale, PNG_FP_1)) return 1;
if (!png_muldiv(&XYZ->blue_Z, PNG_FP_1 - xy->bluex - xy->bluey, blue_scale,
PNG_FP_1))
return 1;
@ -1470,9 +1470,9 @@ png_XYZ_normalize(png_XYZ *XYZ)
{
png_int_32 Y;
if (XYZ->redY < 0 || XYZ->greenY < 0 || XYZ->blueY < 0 ||
XYZ->redX < 0 || XYZ->greenX < 0 || XYZ->blueX < 0 ||
XYZ->redZ < 0 || XYZ->greenZ < 0 || XYZ->blueZ < 0)
if (XYZ->red_Y < 0 || XYZ->green_Y < 0 || XYZ->blue_Y < 0 ||
XYZ->red_X < 0 || XYZ->green_X < 0 || XYZ->blue_X < 0 ||
XYZ->red_Z < 0 || XYZ->green_Z < 0 || XYZ->blue_Z < 0)
return 1;
/* Normalize by scaling so the sum of the end-point Y values is PNG_FP_1.
@ -1480,25 +1480,25 @@ png_XYZ_normalize(png_XYZ *XYZ)
* relying on addition of two positive values producing a negative one is not
* safe.
*/
Y = XYZ->redY;
if (0x7fffffff - Y < XYZ->greenX) return 1;
Y += XYZ->greenY;
if (0x7fffffff - Y < XYZ->blueX) return 1;
Y += XYZ->blueY;
Y = XYZ->red_Y;
if (0x7fffffff - Y < XYZ->green_X) return 1;
Y += XYZ->green_Y;
if (0x7fffffff - Y < XYZ->blue_X) return 1;
Y += XYZ->blue_Y;
if (Y != PNG_FP_1)
{
if (!png_muldiv(&XYZ->redX, XYZ->redX, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->redY, XYZ->redY, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->redZ, XYZ->redZ, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->red_X, XYZ->red_X, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->red_Y, XYZ->red_Y, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->red_Z, XYZ->red_Z, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->greenX, XYZ->greenX, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->greenY, XYZ->greenY, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->greenZ, XYZ->greenZ, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->green_X, XYZ->green_X, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->green_Y, XYZ->green_Y, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->green_Z, XYZ->green_Z, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->blueX, XYZ->blueX, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->blueY, XYZ->blueY, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->blueZ, XYZ->blueZ, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->blue_X, XYZ->blue_X, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->blue_Y, XYZ->blue_Y, PNG_FP_1, Y)) return 1;
if (!png_muldiv(&XYZ->blue_Z, XYZ->blue_Z, PNG_FP_1, Y)) return 1;
}
return 0;
@ -1532,16 +1532,16 @@ static int
png_colorspace_check_xy(png_XYZ *XYZ, const png_xy *xy)
{
int result;
png_xy xyTest;
png_xy xy_test;
/* As a side-effect this routine also returns the XYZ endpoints. */
result = png_XYZ_from_xy(XYZ, xy);
if (result) return result;
result = png_xy_from_XYZ(&xyTest, XYZ);
result = png_xy_from_XYZ(&xy_test, XYZ);
if (result) return result;
if (png_colorspace_endpoints_match(xy, &xyTest,
if (png_colorspace_endpoints_match(xy, &xy_test,
5/*actually, the math is pretty accurate*/))
return 0;
@ -1664,9 +1664,9 @@ png_colorspace_set_chromaticities(png_const_structrp png_ptr,
int /* PRIVATE */
png_colorspace_set_endpoints(png_const_structrp png_ptr,
png_colorspacerp colorspace, const png_XYZ *XYZIn, int preferred)
png_colorspacerp colorspace, const png_XYZ *XYZ_in, int preferred)
{
png_XYZ XYZ = *XYZIn;
png_XYZ XYZ = *XYZ_in;
png_xy xy;
switch (png_colorspace_check_XYZ(&xy, &XYZ))
@ -2209,9 +2209,9 @@ png_colorspace_set_rgb_coefficients(png_structrp png_ptr)
/* png_set_background has not been called, get the coefficients from the Y
* values of the colorspace colorants.
*/
png_fixed_point r = png_ptr->colorspace.end_points_XYZ.redY;
png_fixed_point g = png_ptr->colorspace.end_points_XYZ.greenY;
png_fixed_point b = png_ptr->colorspace.end_points_XYZ.blueY;
png_fixed_point r = png_ptr->colorspace.end_points_XYZ.red_Y;
png_fixed_point g = png_ptr->colorspace.end_points_XYZ.green_Y;
png_fixed_point b = png_ptr->colorspace.end_points_XYZ.blue_Y;
png_fixed_point total = r+g+b;
if (total > 0 &&

18
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.0beta28 - August 16, 2012
* libpng version 1.6.0beta28 - August 18, 2012
* Copyright (c) 1998-2012 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.)
@ -11,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.0beta28 - August 16, 2012: Glenn
* libpng versions 0.97, January 1998, through 1.6.0beta28 - August 18, 2012: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -198,7 +198,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.6.0beta28, August 16, 2012, are
* libpng versions 1.2.6, August 15, 2004, through 1.6.0beta28, August 18, 2012, are
* Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@ -310,7 +310,7 @@
* Y2K compliance in libpng:
* =========================
*
* August 16, 2012
* August 18, 2012
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@ -378,7 +378,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.0beta28"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.6.0beta28 - August 16, 2012\n"
" libpng version 1.6.0beta28 - August 18, 2012\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@ -2635,10 +2635,10 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
* necessary to find the row in the output image given a row in an interlaced
* image, so two more macros:
*/
#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \
(((yIn)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass))
#define PNG_COL_FROM_PASS_COL(xIn, pass) \
(((xIn)<<PNG_PASS_COL_SHIFT(pass))+PNG_PASS_START_COL(pass))
#define PNG_ROW_FROM_PASS_ROW(y_in, pass) \
(((y_in)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass))
#define PNG_COL_FROM_PASS_COL(x_in, pass) \
(((x_in)<<PNG_PASS_COL_SHIFT(pass))+PNG_PASS_START_COL(pass))
/* Two macros which return a boolean (0 or 1) saying whether the given row
* or column is in a particular pass. These use a common utility macro that

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.6.0beta28 - August 16, 2012
* libpng version 1.6.0beta28 - August 18, 2012
*
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -867,9 +867,9 @@ png_safe_warning(png_structp png_nonconst_ptr, png_const_charp warning_message)
#endif
int /* PRIVATE */
png_safe_execute(png_imagep imageIn, int (*function)(png_voidp), png_voidp arg)
png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
{
volatile png_imagep image = imageIn;
volatile png_imagep image = image_in;
volatile int result;
volatile png_voidp saved_error_buf;
jmp_buf safe_jmpbuf;

View File

@ -534,31 +534,31 @@ png_get_cHRM_XYZ(png_const_structrp png_ptr, png_const_inforp info_ptr,
png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)");
if (red_X != NULL)
*red_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.redX,
*red_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_X,
"cHRM red X");
if (red_Y != NULL)
*red_Y = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.redY,
*red_Y = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_Y,
"cHRM red Y");
if (red_Z != NULL)
*red_Z = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.redZ,
*red_Z = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_Z,
"cHRM red Z");
if (green_X != NULL)
*green_X = png_float(png_ptr,
info_ptr->colorspace.end_points_XYZ.greenX, "cHRM green X");
info_ptr->colorspace.end_points_XYZ.green_X, "cHRM green X");
if (green_Y != NULL)
*green_Y = png_float(png_ptr,
info_ptr->colorspace.end_points_XYZ.greenY, "cHRM green Y");
info_ptr->colorspace.end_points_XYZ.green_Y, "cHRM green Y");
if (green_Z != NULL)
*green_Z = png_float(png_ptr,
info_ptr->colorspace.end_points_XYZ.greenZ, "cHRM green Z");
info_ptr->colorspace.end_points_XYZ.green_Z, "cHRM green Z");
if (blue_X != NULL)
*blue_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.blueX,
*blue_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.blue_X,
"cHRM blue X");
if (blue_Y != NULL)
*blue_Y = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.blueY,
*blue_Y = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.blue_Y,
"cHRM blue Y");
if (blue_Z != NULL)
*blue_Z = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.blueZ,
*blue_Z = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.blue_Z,
"cHRM blue Z");
return (PNG_INFO_cHRM);
}
@ -582,23 +582,23 @@ png_get_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr,
png_debug1(1, "in %s retrieval function", "cHRM_XYZ");
if (int_red_X != NULL)
*int_red_X = info_ptr->colorspace.end_points_XYZ.redX;
*int_red_X = info_ptr->colorspace.end_points_XYZ.red_X;
if (int_red_Y != NULL)
*int_red_Y = info_ptr->colorspace.end_points_XYZ.redY;
*int_red_Y = info_ptr->colorspace.end_points_XYZ.red_Y;
if (int_red_Z != NULL)
*int_red_Z = info_ptr->colorspace.end_points_XYZ.redZ;
*int_red_Z = info_ptr->colorspace.end_points_XYZ.red_Z;
if (int_green_X != NULL)
*int_green_X = info_ptr->colorspace.end_points_XYZ.greenX;
*int_green_X = info_ptr->colorspace.end_points_XYZ.green_X;
if (int_green_Y != NULL)
*int_green_Y = info_ptr->colorspace.end_points_XYZ.greenY;
*int_green_Y = info_ptr->colorspace.end_points_XYZ.green_Y;
if (int_green_Z != NULL)
*int_green_Z = info_ptr->colorspace.end_points_XYZ.greenZ;
*int_green_Z = info_ptr->colorspace.end_points_XYZ.green_Z;
if (int_blue_X != NULL)
*int_blue_X = info_ptr->colorspace.end_points_XYZ.blueX;
*int_blue_X = info_ptr->colorspace.end_points_XYZ.blue_X;
if (int_blue_Y != NULL)
*int_blue_Y = info_ptr->colorspace.end_points_XYZ.blueY;
*int_blue_Y = info_ptr->colorspace.end_points_XYZ.blue_Y;
if (int_blue_Z != NULL)
*int_blue_Z = info_ptr->colorspace.end_points_XYZ.blueZ;
*int_blue_Z = info_ptr->colorspace.end_points_XYZ.blue_Z;
return (PNG_INFO_cHRM);
}

View File

@ -80,15 +80,15 @@ png_set_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_inforp info_ptr,
if (png_ptr == NULL || info_ptr == NULL)
return;
XYZ.redX = int_red_X;
XYZ.redY = int_red_Y;
XYZ.redZ = int_red_Z;
XYZ.greenX = int_green_X;
XYZ.greenY = int_green_Y;
XYZ.greenZ = int_green_Z;
XYZ.blueX = int_blue_X;
XYZ.blueY = int_blue_Y;
XYZ.blueZ = int_blue_Z;
XYZ.red_X = int_red_X;
XYZ.red_Y = int_red_Y;
XYZ.red_Z = int_red_Z;
XYZ.green_X = int_green_X;
XYZ.green_Y = int_green_Y;
XYZ.green_Z = int_green_Z;
XYZ.blue_X = int_blue_X;
XYZ.blue_Y = int_blue_Y;
XYZ.blue_Z = int_blue_Z;
if (png_colorspace_set_endpoints(png_ptr, &info_ptr->colorspace, &XYZ, 2))
info_ptr->colorspace.flags |= PNG_COLORSPACE_FROM_cHRM;
@ -1251,7 +1251,7 @@ add_one_chunk(png_bytep list, unsigned int count, png_const_bytep add, int keep)
void PNGAPI
png_set_keep_unknown_chunks(png_structrp png_ptr, int keep,
png_const_bytep chunk_list, int num_chunksIn)
png_const_bytep chunk_list, int num_chunks_in)
{
png_bytep new_list;
unsigned int num_chunks, old_num_chunks;
@ -1265,16 +1265,16 @@ png_set_keep_unknown_chunks(png_structrp png_ptr, int keep,
return;
}
if (num_chunksIn <= 0)
if (num_chunks_in <= 0)
{
png_ptr->unknown_default = keep;
/* '0' means just set the flags, so stop here */
if (num_chunksIn == 0)
if (num_chunks_in == 0)
return;
}
if (num_chunksIn < 0)
if (num_chunks_in < 0)
{
/* Ignore all unknown chunks and all chunks recognized by
* libpng except for IHDR, PLTE, tRNS, IDAT, and IEND
@ -1303,7 +1303,7 @@ png_set_keep_unknown_chunks(png_structrp png_ptr, int keep,
num_chunks = (sizeof chunks_to_ignore)/5;
}
else /* num_chunksIn > 0 */
else /* num_chunks_in > 0 */
{
if (chunk_list == NULL)
{
@ -1314,7 +1314,7 @@ png_set_keep_unknown_chunks(png_structrp png_ptr, int keep,
return;
}
num_chunks = num_chunksIn;
num_chunks = num_chunks_in;
}
old_num_chunks = png_ptr->num_chunk_list;

View File

@ -94,9 +94,9 @@ typedef struct png_xy
*/
typedef struct png_XYZ
{
png_fixed_point redX, redY, redZ;
png_fixed_point greenX, greenY, greenZ;
png_fixed_point blueX, blueY, blueZ;
png_fixed_point red_X, red_Y, red_Z;
png_fixed_point green_X, green_Y, green_Z;
png_fixed_point blue_X, blue_Y, blue_Z;
} png_XYZ;
#endif /* COLORSPACE */

View File

@ -235,18 +235,18 @@ png_image_size(png_structrp png_ptr)
*/
png_uint_32 w = png_ptr->width;
unsigned int pd = png_ptr->pixel_depth;
png_alloc_size_t cbBase;
png_alloc_size_t cb_base;
int pass;
for (cbBase=0, pass=0; pass<=6; ++pass)
for (cb_base=0, pass=0; pass<=6; ++pass)
{
png_uint_32 pw = PNG_PASS_COLS(w, pass);
if (pw > 0)
cbBase += (PNG_ROWBYTES(pd, pw)+1) * PNG_PASS_ROWS(h, pass);
cb_base += (PNG_ROWBYTES(pd, pw)+1) * PNG_PASS_ROWS(h, pass);
}
return cbBase;
return cb_base;
}
else

View File

@ -1,7 +1,7 @@
VisualStudio instructions
libpng version 1.6.0beta28 - August 11, 2012
libpng version 1.6.0beta28 - August 18, 2012
Copyright (c) 1998-2010 Glenn Randers-Pehrson

View File

@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
* libpng version 1.6.0beta28 - August 11, 2012
* libpng version 1.6.0beta28 - August 18, 2012
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*

View File

@ -1,5 +1,5 @@
Makefiles for libpng version 1.6.0beta28 - August 11, 2012
Makefiles for libpng version 1.6.0beta28 - August 18, 2012
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile

View File

@ -3,7 +3,7 @@
/* pnglibconf.h - library build configuration */
/* Libpng 1.6.0beta28 - August 16, 2012 */
/* Libpng 1.6.0beta28 - August 18, 2012 */
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */