[libpng17] Imported from libpng-1.7.0beta88.tar

This commit is contained in:
Glenn Randers-Pehrson 2017-08-06 14:03:25 -05:00
parent 58cd558a43
commit 1c2e35ab73
15 changed files with 69 additions and 47 deletions

View File

@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license. This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.7.0beta88, April 1, 2017 are libpng versions 1.0.7, July 1, 2000 through 1.7.0beta88, August 6, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals disclaimer and license as libpng-1.0.6 with the following individuals
@ -127,4 +127,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
April 1, 2017 August 6, 2017

2
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.7.0beta88 - May 22, 2017 (shared library 17.0) README for libpng version 1.7.0beta88 - August 6, 2017 (shared library 17.0)
See the note about version numbers near the top of png.h See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng. See INSTALL for instructions on how to install libpng.

View File

@ -63,7 +63,7 @@ BUILD INSTRUCTIONS
- Prerequisites (in order of compilation): - Prerequisites (in order of compilation):
- zlib http://zlib.net/ - zlib https://zlib.net/
- libpng http://www.libpng.org/pub/png/libpng.html - libpng http://www.libpng.org/pub/png/libpng.html
- pngbook http://www.libpng.org/pub/png/book/sources.html - pngbook http://www.libpng.org/pub/png/book/sources.html

View File

@ -1,9 +1,8 @@
/*- /*-
* pngstest.c * pngstest.c
* *
* Copyright (c) 2013-2016 John Cunningham Bowler * Last changed in libpng 1.6.31 [July 27, 2017]
* * Copyright (c) 2013-2017 John Cunningham Bowler
* Last changed in libpng 1.6.24 [August 4, 2016]
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
@ -2611,9 +2610,9 @@ compare_two_images(Image *a, Image *b, int via_linear,
const unsigned int b_sample = PNG_IMAGE_SAMPLE_SIZE(formatb); const unsigned int b_sample = PNG_IMAGE_SAMPLE_SIZE(formatb);
int alpha_added, alpha_removed; int alpha_added, alpha_removed;
int bchannels; int bchannels;
int btoa[4];
png_uint_32 y; png_uint_32 y;
Transform tr; Transform tr;
int btoa[4]={0,0,0,0};
/* This should never happen: */ /* This should never happen: */
if (width != b->image.width || height != b->image.height) if (width != b->image.width || height != b->image.height)
@ -2746,22 +2745,27 @@ compare_two_images(Image *a, Image *b, int via_linear,
*/ */
else if ((a->opts & ACCUMULATE) == 0) else if ((a->opts & ACCUMULATE) == 0)
{ {
# ifdef __GNUC__
# define BYTE_CHARS 20 /* 2^32: GCC sprintf warning */
# else
# define BYTE_CHARS 3 /* 2^8: real maximum value */
# endif
/* Check the original image first, /* Check the original image first,
* TODO: deal with input images with bad pixel values? * TODO: deal with input images with bad pixel values?
*/ */
if (amax >= a->image.colormap_entries) if (amax >= a->image.colormap_entries)
{ {
char pindex[9]; char pindex[3+2*BYTE_CHARS];
sprintf(pindex, "%d[%lu]", amax, sprintf(pindex, "%d[%u]", amax,
(unsigned long)a->image.colormap_entries); (png_byte)/*SAFE*/a->image.colormap_entries);
return logerror(a, a->file_name, ": bad pixel index: ", pindex); return logerror(a, a->file_name, ": bad pixel index: ", pindex);
} }
else if (bmax >= b->image.colormap_entries) else if (bmax >= b->image.colormap_entries)
{ {
char pindex[9]; char pindex[3+2*BYTE_CHARS];
sprintf(pindex, "%d[%lu]", bmax, sprintf(pindex, "%d[%u]", bmax,
(unsigned long)b->image.colormap_entries); (png_byte)/*SAFE*/b->image.colormap_entries);
return logerror(b, b->file_name, ": bad pixel index: ", pindex); return logerror(b, b->file_name, ": bad pixel index: ", pindex);
} }
} }
@ -2881,10 +2885,13 @@ compare_two_images(Image *a, Image *b, int via_linear,
{ {
case 4: case 4:
if (pua[btoa[3]] != pub[3]) break; if (pua[btoa[3]] != pub[3]) break;
/* FALLTHROUGH */
case 3: case 3:
if (pua[btoa[2]] != pub[2]) break; if (pua[btoa[2]] != pub[2]) break;
/* FALLTHROUGH */
case 2: case 2:
if (pua[btoa[1]] != pub[1]) break; if (pua[btoa[1]] != pub[1]) break;
/* FALLTHROUGH */
case 1: case 1:
if (pua[btoa[0]] != pub[0]) break; if (pua[btoa[0]] != pub[0]) break;
if (alpha_added != 4 && pub[alpha_added] != 65535) break; if (alpha_added != 4 && pub[alpha_added] != 65535) break;
@ -2900,10 +2907,13 @@ compare_two_images(Image *a, Image *b, int via_linear,
{ {
case 4: case 4:
if (psa[btoa[3]] != psb[3]) break; if (psa[btoa[3]] != psb[3]) break;
/* FALLTHROUGH */
case 3: case 3:
if (psa[btoa[2]] != psb[2]) break; if (psa[btoa[2]] != psb[2]) break;
/* FALLTHROUGH */
case 2: case 2:
if (psa[btoa[1]] != psb[1]) break; if (psa[btoa[1]] != psb[1]) break;
/* FALLTHROUGH */
case 1: case 1:
if (psa[btoa[0]] != psb[0]) break; if (psa[btoa[0]] != psb[0]) break;
if (alpha_added != 4 && psb[alpha_added] != 255) break; if (alpha_added != 4 && psb[alpha_added] != 255) break;

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.7.0beta88 - May 22, 2017 libpng version 1.7.0beta88 - August 6, 2017
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2017 Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.7.0beta88 - May 22, 2017 libpng versions 0.97, January 1998, through 1.7.0beta88 - August 6, 2017
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2015 Glenn Randers-Pehrson Copyright (c) 1998-2015 Glenn Randers-Pehrson
@ -102,7 +102,7 @@ majority of the needs of its users.
Libpng uses zlib for its compression and decompression of PNG files. Libpng uses zlib for its compression and decompression of PNG files.
Further information about zlib, and the latest version of zlib, can Further information about zlib, and the latest version of zlib, can
be found at the zlib home page, <http://zlib.net/>. be found at the zlib home page, <https://zlib.net/>.
The zlib compression utility is a general purpose utility that is The zlib compression utility is a general purpose utility that is
useful for more than PNG files, and can be used without libpng. useful for more than PNG files, and can be used without libpng.
See the documentation delivered with zlib for more details. See the documentation delivered with zlib for more details.
@ -5189,11 +5189,13 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files
going back to version 0.70. You can access the git repository (read only) going back to version 0.70. You can access the git repository (read only)
at at
git://git.code.sf.net/p/libpng/code.git https://github.com/glennrp/libpng or
https://git.code.sf.net/p/libpng/code.git
or you can browse it with a web browser by selecting the "code" button at or you can browse it with a web browser at
https://sourceforge.net/projects/libpng https://github.com/glennrp/libpng or
https://sourceforge.net/p/libpng/code/ci/libpng16/tree/
Patches can be sent to glennrp at users.sourceforge.net or to Patches can be sent to glennrp at users.sourceforge.net or to
png-mng-implement at lists.sourceforge.net or you can upload them to png-mng-implement at lists.sourceforge.net or you can upload them to
@ -5201,10 +5203,14 @@ the libpng bug tracker at
https://libpng.sourceforge.io/ https://libpng.sourceforge.io/
or as a "pull request" to
https://github.com/glennrp/libpng/pulls
We also accept patches built from the tar or zip distributions, and We also accept patches built from the tar or zip distributions, and
simple verbal discriptions of bug fixes, reported either to the simple verbal discriptions of bug fixes, reported either to the
SourceForge bug tracker, to the png-mng-implement at lists.sf.net SourceForge bug tracker, to the png-mng-implement at lists.sf.net
mailing list, or directly to glennrp. mailing list, as github issues, or directly to glennrp.
XVI. Coding style XVI. Coding style

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "May 22, 2017" .TH LIBPNG 3 "August 6, 2017"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta88 libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta88
.SH SYNOPSIS .SH SYNOPSIS
@ -500,7 +500,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT .SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.7.0beta88 - May 22, 2017 libpng version 1.7.0beta88 - August 6, 2017
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2017 Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson
@ -511,7 +511,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.7.0beta88 - May 22, 2017 libpng versions 0.97, January 1998, through 1.7.0beta88 - August 6, 2017
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2015 Glenn Randers-Pehrson Copyright (c) 1998-2015 Glenn Randers-Pehrson
@ -602,7 +602,7 @@ majority of the needs of its users.
Libpng uses zlib for its compression and decompression of PNG files. Libpng uses zlib for its compression and decompression of PNG files.
Further information about zlib, and the latest version of zlib, can Further information about zlib, and the latest version of zlib, can
be found at the zlib home page, <http://zlib.net/>. be found at the zlib home page, <https://zlib.net/>.
The zlib compression utility is a general purpose utility that is The zlib compression utility is a general purpose utility that is
useful for more than PNG files, and can be used without libpng. useful for more than PNG files, and can be used without libpng.
See the documentation delivered with zlib for more details. See the documentation delivered with zlib for more details.
@ -5689,11 +5689,13 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files
going back to version 0.70. You can access the git repository (read only) going back to version 0.70. You can access the git repository (read only)
at at
git://git.code.sf.net/p/libpng/code.git https://github.com/glennrp/libpng or
https://git.code.sf.net/p/libpng/code.git
or you can browse it with a web browser by selecting the "code" button at or you can browse it with a web browser at
https://sourceforge.net/projects/libpng https://github.com/glennrp/libpng or
https://sourceforge.net/p/libpng/code/ci/libpng16/tree/
Patches can be sent to glennrp at users.sourceforge.net or to Patches can be sent to glennrp at users.sourceforge.net or to
png-mng-implement at lists.sourceforge.net or you can upload them to png-mng-implement at lists.sourceforge.net or you can upload them to
@ -5701,10 +5703,14 @@ the libpng bug tracker at
https://libpng.sourceforge.io/ https://libpng.sourceforge.io/
or as a "pull request" to
https://github.com/glennrp/libpng/pulls
We also accept patches built from the tar or zip distributions, and We also accept patches built from the tar or zip distributions, and
simple verbal discriptions of bug fixes, reported either to the simple verbal discriptions of bug fixes, reported either to the
SourceForge bug tracker, to the png-mng-implement at lists.sf.net SourceForge bug tracker, to the png-mng-implement at lists.sf.net
mailing list, or directly to glennrp. mailing list, as github issues, or directly to glennrp.
.SH XVI. Coding style .SH XVI. Coding style
@ -5991,7 +5997,7 @@ http://www.libpng.org/pub/png
.I libpng .I libpng
or at or at
.br .br
http://zlib.net/ https://zlib.net/
.LP .LP
.IR PNG specification: RFC 2083 .IR PNG specification: RFC 2083
@ -6020,7 +6026,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation. Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.7.0beta88 - May 22, 2017: Libpng version 1.7.0beta88 - August 6, 2017:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -6045,7 +6051,7 @@ this sentence.
This code is released under the libpng license. This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.7.0beta88, May 22, 2017 are libpng versions 1.0.7, July 1, 2000 through 1.7.0beta88, August 6, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals disclaimer and license as libpng-1.0.6 with the following individuals
@ -6170,7 +6176,7 @@ files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
May 22, 2017 August 6, 2017
.\" end of man page .\" end of man page

View File

@ -1,4 +1,4 @@
.TH LIBPNGPF 3 "April 1, 2017" .TH LIBPNGPF 3 "August 6, 2017"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta88 libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta88
(private functions) (private functions)

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "April 1, 2017" .TH PNG 5 "August 6, 2017"
.SH NAME .SH NAME
png \- Portable Network Graphics (PNG) format png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION .SH DESCRIPTION

4
png.c
View File

@ -705,14 +705,14 @@ png_get_copyright(png_const_structrp png_ptr)
#else #else
# ifdef __STDC__ # ifdef __STDC__
return PNG_STRING_NEWLINE \ return PNG_STRING_NEWLINE \
"libpng version 1.7.0beta88 - April 1, 2017" PNG_STRING_NEWLINE \ "libpng version 1.7.0beta88 - August 6, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \ "Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \ PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE; PNG_STRING_NEWLINE;
# else # else
return "libpng version 1.7.0beta88 - April 1, 2017\ return "libpng version 1.7.0beta88 - August 6, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\ Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";

10
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library /* png.h - header file for PNG reference library
* *
* libpng version 1.7.0beta88, April 1, 2017 * libpng version 1.7.0beta88, August 6, 2017
* *
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -12,7 +12,7 @@
* Authors and maintainers: * Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.7.0beta88, April 1, 2017: * libpng versions 0.97, January 1998, through 1.7.0beta88, August 6, 2017:
* Glenn Randers-Pehrson. * Glenn Randers-Pehrson.
* See also "Contributing Authors", below. * See also "Contributing Authors", below.
*/ */
@ -25,7 +25,7 @@
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* *
* libpng versions 1.0.7, July 1, 2000 through 1.7.0beta88, April 1, 2017 are * libpng versions 1.0.7, July 1, 2000 through 1.7.0beta88, August 6, 2017 are
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are * Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same * derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals * disclaimer and license as libpng-1.0.6 with the following individuals
@ -241,7 +241,7 @@
* Y2K compliance in libpng: * Y2K compliance in libpng:
* ========================= * =========================
* *
* April 1, 2017 * August 6, 2017
* *
* Since the PNG Development group is an ad-hoc body, we can't make * Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration. * an official declaration.
@ -310,7 +310,7 @@
/* Version information for png.h - this should match the version in png.c */ /* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.7.0beta88" #define PNG_LIBPNG_VER_STRING "1.7.0beta88"
#define PNG_HEADER_VERSION_STRING " libpng version 1.7.0beta88 - April 1, 2017\n" #define PNG_HEADER_VERSION_STRING " libpng version 1.7.0beta88 - August 6, 2017\n"
#define PNG_LIBPNG_VER_SONUM 17 #define PNG_LIBPNG_VER_SONUM 17
#define PNG_LIBPNG_VER_DLLNUM 17 #define PNG_LIBPNG_VER_DLLNUM 17

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng /* pngconf.h - machine configurable file for libpng
* *
* libpng version 1.7.0beta88, April 1, 2017 * libpng version 1.7.0beta88, August 6, 2017
* *
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -1,7 +1,7 @@
VisualStudio instructions VisualStudio instructions
libpng version 1.7.0beta88 - April 1, 2017 libpng version 1.7.0beta88 - August 6, 2017
Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson

View File

@ -2,7 +2,7 @@
<!-- <!--
* zlib.props - location of zlib source * zlib.props - location of zlib source
* *
* libpng version 1.7.0beta88 - April 1, 2017 * libpng version 1.7.0beta88 - August 6, 2017
* *
* Copyright (c) 2011,2013,2014 Glenn Randers-Pehrson * Copyright (c) 2011,2013,2014 Glenn Randers-Pehrson
* *

View File

@ -1,5 +1,5 @@
Makefiles for libpng version 1.7.0beta88 - April 1, 2017 Makefiles for libpng version 1.7.0beta88 - August 6, 2017
pnglibconf.h.prebuilt => Stores configuration settings pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile makefile.linux => Linux/ELF makefile

View File

@ -2,7 +2,7 @@
/* pnglibconf.h - library build configuration */ /* pnglibconf.h - library build configuration */
/* libpng version 1.7.0beta88, April 1, 2017 */ /* libpng version 1.7.0beta88, August 6, 2017 */
/* Copyright (c) 1998-2016 Glenn Randers-Pehrson */ /* Copyright (c) 1998-2016 Glenn Randers-Pehrson */