[libpng17] Merge contrib/libtests and contrib/tools with libpng16.

This commit is contained in:
Glenn Randers-Pehrson 2015-09-15 17:11:43 -05:00
parent cc7fa5e23f
commit c68de14844
10 changed files with 57 additions and 38 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.7.0beta65 - August 3, 2015
Libpng 1.7.0beta65 - September 15, 2015
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.
@ -852,7 +852,7 @@ Version 1.7.0beta64 [July 26, 2015]
Belatedly added Mans Rullgard and James Yu to the list of Contributing
Authors.
Version 1.7.0beta65 [August 3, 2015]
Version 1.7.0beta65 [September 15, 2015]
Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c
because usleep() is deprecated (port from libpng16).
Fixed potential leak of png_pixels in contrib/pngminus/pnm2png.c
@ -860,6 +860,7 @@ Version 1.7.0beta65 [August 3, 2015]
Moved config.h.in~ from the "libpng_autotools_files" list to the
"libpng_autotools_extra" list in autogen.sh because it was causing a
false positive for missing files (bug report by Robert C. Seacord).
Fixed some bad links in the man page.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -5158,6 +5158,15 @@ Version 1.7.0beta65 [September 15, 2015]
"libpng_autotools_extra" list in autogen.sh because it was causing a
false positive for missing files (bug report by Robert C. Seacord).
Fixed some bad links in the man page.
Renamed the arm subdirectory to contrib/neon.
Made minor fixes to the test scripts:
pngimage: add --list-combos pngunknown: add --strict to catch warnings
pngvalid-standard: remove the spurious --progressive read (compare with
pngvalid-progressive-standard!) (John Bowler).
Implemented a new chunk parse implementation that can be shared. It
is currently shared by the progressive reader and the sequential one
(but not yet by the writer) (John Bowler).
Implemented shared transform handling that is used throughout (John Bowler).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1,4 +1,4 @@
/* Fake a PNG - just write it out directly. */
/* Fake a PNG - just write it out directly.
*
* COPYRIGHT: Written by John Cunningham Bowler, 2014.
* To the extent possible under law, the author has waived all copyright and

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 2013-2015 John Cunningham Bowler
*
* Last changed in libpng 1.6.18 [(PENDING RELEASE)]
* Last changed in libpng 1.6.18 [July 23, 2015]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@ -2154,7 +2154,7 @@ typedef struct
int in_opaque; /* Value of input alpha that is opaque */
int is_palette; /* Sample values come from the palette */
int accumulate; /* Accumlate component errors (don't log) */
int output_8bit; /* Output is 8 bit (else 16 bit) */
int output_8bit; /* Output is 8-bit (else 16-bit) */
void (*in_gp)(Pixel*, png_const_voidp);
void (*out_gp)(Pixel*, png_const_voidp);

View File

@ -31,6 +31,13 @@
# include "../../png.h"
#endif
#if PNG_LIBPNG_VER < 10700
/* READ_INTERLACING was used instead of READ_DEINTERLACE. */
# ifdef PNG_READ_INTERLACING_SUPPORTED
# define PNG_READ_DEINTERLACE_SUPPORTED
# endif
#endif
static int
read_png(FILE *fp)
{

View File

@ -634,7 +634,7 @@ int validation_muldiv(int count, int argc, char **argv)
{
png_fixed_point result;
/* NOTE: your mileage may vary, a type is required below that can
* hold 64 bits or more, if floating point is used a 64 bit or
* hold 64 bits or more, if floating point is used a 64-bit or
* better mantissa is required.
*/
long long int fp, fpround;
@ -721,7 +721,7 @@ int validation_muldiv(int count, int argc, char **argv)
}
while (--count > 0);
printf("%d tests including %d overflows, %d passed, %d failed (%d 64 bit "
printf("%d tests including %d overflows, %d passed, %d failed (%d 64-bit "
"errors)\n", tested, overflow, passed, error, error64);
return 0;
}
@ -799,13 +799,13 @@ int validation_gamma(int argc, char **argv)
if (i == 0 && png_log8bit(i) != 0xffffffff ||
i != 0 && png_log8bit(i) != floor(correct+.5))
{
fprintf(stderr, "8 bit log error: %d: got %u, expected %f\n",
fprintf(stderr, "8-bit log error: %d: got %u, expected %f\n",
i, png_log8bit(i), correct);
}
}
if (!silent)
printf("maximum 8 bit log error = %f\n", maxerr);
printf("maximum 8-bit log error = %f\n", maxerr);
maxerr = 0;
for (i=0; i<65536; ++i)
@ -821,14 +821,14 @@ int validation_gamma(int argc, char **argv)
{
if (error > .68) /* By experiment error is less than .68 */
{
fprintf(stderr, "16 bit log error: %d: got %u, expected %f"
fprintf(stderr, "16-bit log error: %d: got %u, expected %f"
" error: %f\n", i, png_log16bit(i), correct, error);
}
}
}
if (!silent)
printf("maximum 16 bit log error = %f\n", maxerr);
printf("maximum 16-bit log error = %f\n", maxerr);
/* Now exponentiations. */
maxerr = 0;
@ -841,13 +841,13 @@ int validation_gamma(int argc, char **argv)
maxerr = fabs(error);
if (fabs(error) > 1883) /* By experiment. */
{
fprintf(stderr, "32 bit exp error: %d: got %u, expected %f"
fprintf(stderr, "32-bit exp error: %d: got %u, expected %f"
" error: %f\n", i, png_exp(i), correct, error);
}
}
if (!silent)
printf("maximum 32 bit exp error = %f\n", maxerr);
printf("maximum 32-bit exp error = %f\n", maxerr);
maxerr = 0;
for (i=0; i<=0xfffff; ++i)
@ -859,13 +859,13 @@ int validation_gamma(int argc, char **argv)
maxerr = fabs(error);
if (fabs(error) > .50002) /* By experiment */
{
fprintf(stderr, "8 bit exp error: %d: got %u, expected %f"
fprintf(stderr, "8-bit exp error: %d: got %u, expected %f"
" error: %f\n", i, png_exp8bit(i), correct, error);
}
}
if (!silent)
printf("maximum 8 bit exp error = %f\n", maxerr);
printf("maximum 8-bit exp error = %f\n", maxerr);
maxerr = 0;
for (i=0; i<=0xfffff; ++i)
@ -877,13 +877,13 @@ int validation_gamma(int argc, char **argv)
maxerr = fabs(error);
if (fabs(error) > .524) /* By experiment */
{
fprintf(stderr, "16 bit exp error: %d: got %u, expected %f"
fprintf(stderr, "16-bit exp error: %d: got %u, expected %f"
" error: %f\n", i, png_exp16bit(i), correct, error);
}
}
if (!silent)
printf("maximum 16 bit exp error = %f\n", maxerr);
printf("maximum 16-bit exp error = %f\n", maxerr);
} /* !onlygamma */
/* Test the overall gamma correction. */
@ -913,7 +913,7 @@ int validation_gamma(int argc, char **argv)
}
if (!silent)
printf("gamma %f: maximum 8 bit error %f\n", g, maxerr);
printf("gamma %f: maximum 8-bit error %f\n", g, maxerr);
maxerr = 0;
for (j=0; j<65536; ++j)
@ -932,7 +932,7 @@ int validation_gamma(int argc, char **argv)
}
if (!silent)
printf("gamma %f: maximum 16 bit error %f\n", g, maxerr);
printf("gamma %f: maximum 16-bit error %f\n", g, maxerr);
}
return 0;

View File

@ -2,7 +2,7 @@
/* png-fix-itxt version 1.0.0
*
* Copyright 2015 Glenn Randers-Pehrson
* Last changed in libpng 1.6.18 [(PENDING RELEASE)]
* Last changed in libpng 1.6.18 [July 23, 2015]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@ -37,7 +37,7 @@
/* Read one character (inchar), also return octet (c), break if EOF */
#define GETBREAK inchar=getchar(); \
c=(inchar & 0xffU);\
if (inchar != (int) c) break
if (inchar != c) break
int
main(void)
{
@ -54,7 +54,7 @@ main(void)
putchar(c);
}
if (inchar == (int) c) /* !EOF */
if (inchar == c) /* !EOF */
for (;;)
{
/* Read the length */
@ -86,7 +86,7 @@ for (;;)
GETBREAK; buf[i] = c;
}
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
break;
/* Calculate the CRC */
@ -113,7 +113,7 @@ for (;;)
crc = crc32(crc, buf+7+length, 1);
}
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
break;
/* Update length bytes */
@ -129,7 +129,7 @@ for (;;)
else
{
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
break;
/* Copy bytes that were already read (length and chunk name) */
@ -143,7 +143,7 @@ for (;;)
putchar(c);
}
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
{
break;
}
@ -153,7 +153,7 @@ for (;;)
break;
}
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
break;
if (buf[4] == 73 && buf[5] == 69 && buf[6] == 78 && buf[7] == 68)

View File

@ -53,7 +53,9 @@
#include <setjmp.h>
#if defined(PNG_READ_SUPPORTED) && defined(PNG_EASY_ACCESS_SUPPORTED) &&\
defined(PNG_READ_DEINTERLACE_SUPPORTED)
(defined(PNG_READ_DEINTERLACE_SUPPORTED) ||\
defined(PNG_READ_INTERLACING_SUPPORTED))
/* zlib.h defines the structure z_stream, an instance of which is included
* in this structure and is required for decompressing the LZ compressed
* data in PNG files.

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.7.0beta65 - August 18, 2015
libpng version 1.7.0beta65 - September 15, 2015
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2015 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.7.0beta65 - August 18, 2015
libpng versions 0.97, January 1998, through 1.7.0beta65 - September 15, 2015
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@ -5317,7 +5317,7 @@ Other rules can be inferred by inspecting the libpng source.
XVII. Y2K Compliance in libpng
August 18, 2015
September 15, 2015
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "August 18, 2015"
.TH LIBPNG 3 "September 15, 2015"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta65
.SH SYNOPSIS
@ -498,7 +498,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.7.0beta65 - August 18, 2015
libpng version 1.7.0beta65 - September 15, 2015
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@ -509,7 +509,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.7.0beta65 - August 18, 2015
libpng versions 0.97, January 1998, through 1.7.0beta65 - September 15, 2015
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@ -5815,7 +5815,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVII. Y2K Compliance in libpng
August 18, 2015
September 15, 2015
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@ -6137,7 +6137,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.7.0beta65 - August 18, 2015:
Libpng version 1.7.0beta65 - September 15, 2015:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -6160,7 +6160,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000, through 1.7.0beta65, August 18, 2015, are
libpng versions 1.0.7, July 1, 2000, through 1.7.0beta65, September 15, 2015, are
Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors:
@ -6254,7 +6254,7 @@ the additional disclaimers inserted at version 1.0.7.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
August 18, 2015
September 15, 2015
.\" end of man page