[libpng17] Bump version to 1.7.0beta08

This commit is contained in:
Glenn Randers-Pehrson 2013-04-18 07:27:13 -05:00
parent 8ef61c4693
commit 6cf97e37af
20 changed files with 193 additions and 59 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.7.0beta08 - April 17, 2013
Libpng 1.7.0beta08 - April 18, 2013
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.
@ -249,7 +249,7 @@ Version 1.7.0beta07 [April 14, 2013]
(Flavio Medeiros).
Corrected length written to uncompressed iTXt chunks (Samuli Suominen).
Version 1.7.0beta08 [April 17, 2013]
Version 1.7.0beta08 [April 18, 2013]
Added contrib/tools/fixitxt.c, to repair the erroneous iTXt chunk length
written by libpng-1.6.0 and 1.6.1.

View File

@ -4536,9 +4536,10 @@ Version 1.7.0beta07 [April 14, 2013]
(Flavio Medeiros).
Corrected length written to uncompressed iTXt chunks (Samuli Suominen).
Version 1.7.0beta08 [April 17, 2013]
Version 1.7.0beta08 [April 18, 2013]
Added contrib/tools/fixitxt.c, to repair the erroneous iTXt chunk length
written by libpng-1.6.0 and 1.6.1.
Disallow storing sRGB information when the sRGB is not supported.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

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.7.0beta08, April 14, 2013, are
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta08, April 18, 2013, are
Copyright (c) 2004, 2006-2013 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
April 14, 2013
April 18, 2013

2
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.7.0beta08 - April 14, 2013 (shared library 17.0)
README for libpng version 1.7.0beta08 - April 18, 2013 (shared library 17.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

View File

@ -139,23 +139,128 @@ static struct
{ "PLTE", PNG_INFO_PLTE, png_PLTE, 0, 0, ABSENT, 0 },
/* Non-critical chunks that libpng handles */
{ "bKGD", PNG_INFO_bKGD, png_bKGD, 0, 1, START, 0 },
{ "cHRM", PNG_INFO_cHRM, png_cHRM, 0, 1, START, 0 },
{ "gAMA", PNG_INFO_gAMA, png_gAMA, 0, 1, START, 0 },
{ "hIST", PNG_INFO_hIST, png_hIST, 0, 1, ABSENT, 0 },
{ "iCCP", PNG_INFO_iCCP, png_iCCP, 0, 1, ABSENT, 0 },
{ "iTXt", PNG_INFO_iTXt, png_iTXt, 0, 1, ABSENT, 0 },
{ "oFFs", PNG_INFO_oFFs, png_oFFs, 0, 1, START, 0 },
{ "pCAL", PNG_INFO_pCAL, png_pCAL, 0, 1, START, 0 },
{ "pHYs", PNG_INFO_pHYs, png_pHYs, 0, 1, START, 0 },
{ "sBIT", PNG_INFO_sBIT, png_sBIT, 0, 1, START, 0 },
{ "sCAL", PNG_INFO_sCAL, png_sCAL, 0, 1, START, 0 },
{ "sPLT", PNG_INFO_sPLT, png_sPLT, 0, 1, ABSENT, 0 },
{ "sRGB", PNG_INFO_sRGB, png_sRGB, 0, 1, START, 0 },
{ "tEXt", PNG_INFO_tEXt, png_tEXt, 0, 1, START, 0 },
{ "tIME", PNG_INFO_tIME, png_tIME, 0, 1, START, 0 },
{ "tRNS", PNG_INFO_tRNS, png_tRNS, 0, 0, ABSENT, 0 },
{ "zTXt", PNG_INFO_zTXt, png_zTXt, 0, 1, END, 0 },
/* This is a mess but it seems to be the only way to do it - there is no way to
* check for definition outside a #if.
*/
{ "bKGD", PNG_INFO_bKGD, png_bKGD,
# ifdef PNG_READ_bKGD_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "cHRM", PNG_INFO_cHRM, png_cHRM,
# ifdef PNG_READ_cHRM_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "gAMA", PNG_INFO_gAMA, png_gAMA,
# ifdef PNG_READ_gAMA_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "hIST", PNG_INFO_hIST, png_hIST,
# ifdef PNG_READ_hIST_SUPPORTED
0,
# else
1,
# endif
1, ABSENT, 0 },
{ "iCCP", PNG_INFO_iCCP, png_iCCP,
# ifdef PNG_READ_iCCP_SUPPORTED
0,
# else
1,
# endif
1, ABSENT, 0 },
{ "iTXt", PNG_INFO_iTXt, png_iTXt,
# ifdef PNG_READ_iTXt_SUPPORTED
0,
# else
1,
# endif
1, ABSENT, 0 },
{ "oFFs", PNG_INFO_oFFs, png_oFFs,
# ifdef PNG_READ_oFFs_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "pCAL", PNG_INFO_pCAL, png_pCAL,
# ifdef PNG_READ_pCAL_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "pHYs", PNG_INFO_pHYs, png_pHYs,
# ifdef PNG_READ_pHYs_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "sBIT", PNG_INFO_sBIT, png_sBIT,
# ifdef PNG_READ_sBIT_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "sCAL", PNG_INFO_sCAL, png_sCAL,
# ifdef PNG_READ_sCAL_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "sPLT", PNG_INFO_sPLT, png_sPLT,
# ifdef PNG_READ_sPLT_SUPPORTED
0,
# else
1,
# endif
1, ABSENT, 0 },
{ "sRGB", PNG_INFO_sRGB, png_sRGB,
# ifdef PNG_READ_sRGB_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "tEXt", PNG_INFO_tEXt, png_tEXt,
# ifdef PNG_READ_tEXt_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "tIME", PNG_INFO_tIME, png_tIME,
# ifdef PNG_READ_tIME_SUPPORTED
0,
# else
1,
# endif
1, START, 0 },
{ "tRNS", PNG_INFO_tRNS, png_tRNS,
# ifdef PNG_READ_tRNS_SUPPORTED
0,
# else
1,
# endif
0, ABSENT, 0 },
{ "zTXt", PNG_INFO_zTXt, png_zTXt,
# ifdef PNG_READ_zTXt_SUPPORTED
0,
# else
1,
# endif
1, END, 0 },
/* No libpng handling */
{ "sTER", PNG_INFO_sTER, png_sTER, 1, 1, START, 0 },
@ -955,6 +1060,7 @@ main(void)
{
fprintf(stderr,
" test ignored because libpng was not built with unknown chunk support\n");
return 0;
/* So the test is skipped: */
return 77;
}
#endif

View File

@ -10351,6 +10351,7 @@ int main(int argc, char **argv)
int main(void)
{
fprintf(stderr, "pngvalid: no write support in libpng, all tests skipped\n");
return 0;
/* So the test is skipped: */
return 77;
}
#endif

View File

@ -25,13 +25,15 @@
* gcc -O -o fixitxt fixitxt.c -lz
*/
#define MAX_LENGTH 500000
#define GETBREAK c=getchar(); if (c == EOF) break;
#include <zlib.h>
main()
{
unsigned int i;
unsigned char buf[100000];
unsigned char buf[MAX_LENGTH];
unsigned long crc;
unsigned int c;
@ -46,13 +48,13 @@ if (c != EOF)
for (;;)
{
/* Read the length */
unsigned int length;
unsigned long length;
c=GETBREAK; buf[0] = c;
c=GETBREAK; buf[1] = c;
c=GETBREAK; buf[2] = c;
c=GETBREAK; buf[3] = c;
length=buf[0]<<24 | buf[1]<<16 | buf[2] << 8 | buf[3];
length=((((unsigned long) buf[0]<<8 + buf[1]<<16) + buf[2] << 8) + buf[3]);
/* Read the chunkname */
c=GETBREAK; buf[4] = c;
c=GETBREAK; buf[5] = c;
@ -63,6 +65,9 @@ for (;;)
/* The iTXt chunk type expressed as integers is (105, 84, 88, 116) */
if (buf[4] == 105 && buf[5] == 84 && buf[6] == 88 && buf[7] == 116)
{
if (length >= MAX_LENGTH-12)
break; /* To do: handle this more gracefully */
/* Initialize the CRC */
crc = crc32(0, Z_NULL, 0);
@ -86,6 +91,9 @@ for (;;)
length++;
if (length >= MAX_LENGTH-12)
break;
c=GETBREAK;
buf[length+11]=c;
@ -115,12 +123,8 @@ for (;;)
{
c=GETBREAK;
putchar(c);
buf[i]=c;
}
crc = crc32(0, Z_NULL, 0);
crc = crc32(crc, buf+4, (uInt)length+4);
if (c == EOF)
{
break;

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.7.0beta08 - April 14, 2013
libpng version 1.7.0beta08 - April 18, 2013
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2013 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.0beta08 - April 14, 2013
libpng versions 0.97, January 1998, through 1.7.0beta08 - April 18, 2013
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -5196,7 +5196,7 @@ Other rules can be inferred by inspecting the libpng source.
XVII. Y2K Compliance in libpng
April 14, 2013
April 18, 2013
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 "April 14, 2013"
.TH LIBPNG 3 "April 18, 2013"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta08
.SH SYNOPSIS
@ -494,7 +494,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.0beta08 - April 14, 2013
libpng version 1.7.0beta08 - April 18, 2013
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -505,7 +505,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.7.0beta08 - April 14, 2013
libpng versions 0.97, January 1998, through 1.7.0beta08 - April 18, 2013
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2013 Glenn Randers-Pehrson
@ -5691,7 +5691,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVII. Y2K Compliance in libpng
April 14, 2013
April 18, 2013
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@ -5961,7 +5961,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.7.0beta08 - April 14, 2013:
Libpng version 1.7.0beta08 - April 18, 2013:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -5984,7 +5984,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta08, April 14, 2013, are
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta08, April 18, 2013, are
Copyright (c) 2004,2006-2007 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
@ -6083,7 +6083,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
April 14, 2013
April 18, 2013
.\" end of man page

View File

@ -1,4 +1,4 @@
.TH LIBPNGPF 3 "April 14, 2013"
.TH LIBPNGPF 3 "April 18, 2013"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta08
(private functions)

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "April 14, 2013"
.TH PNG 5 "April 18, 2013"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

9
png.c
View File

@ -691,13 +691,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.7.0beta08 - April 14, 2013" PNG_STRING_NEWLINE \
"libpng version 1.7.0beta08 - April 18, 2013" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2013 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.7.0beta08 - April 14, 2013\
return "libpng version 1.7.0beta08 - April 18, 2013\
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@ -2183,7 +2183,10 @@ png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace,
png_icc_check_tag_table(png_ptr, colorspace, name, profile_length,
profile))
{
png_icc_set_sRGB(png_ptr, colorspace, profile, 0);
# ifdef PNG_sRGB_SUPPORTED
/* If no sRGB support, don't try storing sRGB information */
png_icc_set_sRGB(png_ptr, colorspace, profile, 0);
# endif
return 1;
}

10
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.7.0beta08 - April 14, 2013
* libpng version 1.7.0beta08 - April 18, 2013
* Copyright (c) 1998-2013 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.7.0beta08 - April 14, 2013: Glenn
* libpng versions 0.97, January 1998, through 1.7.0beta08 - April 18, 2013: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@ -200,7 +200,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.7.0beta08, April 14, 2013, are
* libpng versions 1.2.6, August 15, 2004, through 1.7.0beta08, April 18, 2013, are
* Copyright (c) 2004, 2006-2013 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:
@ -312,7 +312,7 @@
* Y2K compliance in libpng:
* =========================
*
* April 14, 2013
* April 18, 2013
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@ -380,7 +380,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.7.0beta08"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.7.0beta08 - April 14, 2013\n"
" libpng version 1.7.0beta08 - April 18, 2013\n"
#define PNG_LIBPNG_VER_SONUM 17
#define PNG_LIBPNG_VER_DLLNUM 17

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.7.0beta08 - April 14, 2013
* libpng version 1.7.0beta08 - April 18, 2013
*
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -227,6 +227,8 @@ translate_gamma_flags(png_structrp png_ptr, png_fixed_point output_gamma,
*/
# ifdef PNG_READ_sRGB_SUPPORTED
png_ptr->flags |= PNG_FLAG_ASSUME_sRGB;
# else
PNG_UNUSED(png_ptr)
# endif
if (is_screen)
output_gamma = PNG_GAMMA_sRGB;

View File

@ -43,7 +43,23 @@
#include "png.h"
#ifdef PNG_READ_SUPPORTED /* else nothing can be done */
/* Known chunks that exist in pngtest.png must be supported or pngtest will fail
* simply as a result of re-ordering them. This may be fixed in 1.7
*/
#if defined PNG_READ_SUPPORTED && /* else nothing can be done */\
defined PNG_READ_bKGD_SUPPORTED &&\
defined PNG_READ_cHRM_SUPPORTED &&\
defined PNG_READ_gAMA_SUPPORTED &&\
defined PNG_READ_oFFs_SUPPORTED &&\
defined PNG_READ_pCAL_SUPPORTED &&\
defined PNG_READ_pHYs_SUPPORTED &&\
defined PNG_READ_sBIT_SUPPORTED &&\
defined PNG_READ_sCAL_SUPPORTED &&\
defined PNG_READ_sRGB_SUPPORTED &&\
defined PNG_READ_tEXt_SUPPORTED &&\
defined PNG_READ_tIME_SUPPORTED &&\
defined PNG_READ_zTXt_SUPPORTED
#include PNG_ZLIB_HEADER /* defined by pnglibconf.h */
/* Copied from pngpriv.h but only used in error messages below. */
#ifndef PNG_ZBUF_SIZE
@ -1942,7 +1958,8 @@ main(void)
{
fprintf(STDERR,
" test ignored because libpng was not built with read support\n");
return 0;
/* And skip this test */
return 77;
}
#endif

View File

@ -1,7 +1,7 @@
VisualStudio instructions
libpng version 1.7.0beta08 - April 14, 2013
libpng version 1.7.0beta08 - April 18, 2013
Copyright (c) 1998-2010 Glenn Randers-Pehrson

View File

@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
* libpng version 1.7.0beta08 - April 14, 2013
* libpng version 1.7.0beta08 - April 18, 2013
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*

View File

@ -1,5 +1,5 @@
Makefiles for libpng version 1.7.0beta08 - April 14, 2013
Makefiles for libpng version 1.7.0beta08 - April 18, 2013
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile

View File

@ -2,7 +2,7 @@
/* pnglibconf.h - library build configuration */
/* Libpng version 1.7.0beta08 - April 14, 2013 */
/* Libpng version 1.7.0beta08 - April 18, 2013 */
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */