mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Imported from libpng-1.5.22beta01.tar
This commit is contained in:
parent
747cea57e3
commit
3cd4a410a5
5
ANNOUNCE
5
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.5.22beta01 - January 13, 2015
|
||||
Libpng 1.5.22beta01 - January 28, 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.
|
||||
@ -27,10 +27,11 @@ Other information:
|
||||
|
||||
Changes since the last public release (1.5.21):
|
||||
|
||||
Version 1.5.22beta01 [January 13, 2015]
|
||||
Version 1.5.22beta01 [January 28, 2015]
|
||||
Regenerated configure scripts with libtool-2.4.4
|
||||
Made the check for out-of-range values in png_set_tRNS() detect
|
||||
values that are exactly 2^bit_depth, and work on 16-bit platforms.
|
||||
Quieted some warnings from Coverity-scan.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
3
CHANGES
3
CHANGES
@ -4291,10 +4291,11 @@ Version 1.5.21rc03 [December 21, 2014]
|
||||
Version 1.5.21 [December 22, 2014]
|
||||
No changes.
|
||||
|
||||
Version 1.5.22beta01 [January 13, 2015]
|
||||
Version 1.5.22beta01 [January 28, 2015]
|
||||
Regenerated configure scripts with libtool-2.4.4
|
||||
Made the check for out-of-range values in png_set_tRNS() detect
|
||||
values that are exactly 2^bit_depth, and work on 16-bit platforms.
|
||||
Quieted some warnings from Coverity-scan.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
4
LICENSE
4
LICENSE
@ -10,7 +10,7 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, December 22, 2014, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, January 28, 2015, are
|
||||
Copyright (c) 2004, 2006-2014 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
|
||||
December 22, 2014
|
||||
January 28, 2015
|
||||
|
||||
2
README
2
README
@ -1,4 +1,4 @@
|
||||
README for libpng version 1.5.22beta01 - December 22, 2014 (shared library 15.0)
|
||||
README for libpng version 1.5.22beta01 - January 28, 2015 (shared library 15.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.5.22beta01 - December 22, 2014
|
||||
libpng version 1.5.22beta01 - January 28, 2015
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2014 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.5.22beta01 - December 22, 2014
|
||||
libpng versions 0.97, January 1998, through 1.5.22beta01 - January 28, 2015
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
|
||||
@ -4531,7 +4531,7 @@ Other rules can be inferred by inspecting the libpng source.
|
||||
|
||||
XIV. Y2K Compliance in libpng
|
||||
|
||||
December 22, 2014
|
||||
January 28, 2015
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
14
libpng.3
14
libpng.3
@ -1,4 +1,4 @@
|
||||
.TH LIBPNG 3 "December 22, 2014"
|
||||
.TH LIBPNG 3 "January 28, 2015"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.22beta01
|
||||
.SH SYNOPSIS
|
||||
@ -492,7 +492,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.5.22beta01 - December 22, 2014
|
||||
libpng version 1.5.22beta01 - January 28, 2015
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
@ -503,7 +503,7 @@ Libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.5.22beta01 - December 22, 2014
|
||||
libpng versions 0.97, January 1998, through 1.5.22beta01 - January 28, 2015
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
|
||||
@ -5023,7 +5023,7 @@ Other rules can be inferred by inspecting the libpng source.
|
||||
|
||||
.SH XIV. Y2K Compliance in libpng
|
||||
|
||||
December 22, 2014
|
||||
January 28, 2015
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
@ -5330,7 +5330,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.5.22beta01 - December 22, 2014:
|
||||
Libpng version 1.5.22beta01 - January 28, 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).
|
||||
|
||||
@ -5353,7 +5353,7 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, December 22, 2014, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, January 28, 2015, are
|
||||
Copyright (c) 2004,2006-20014 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
|
||||
@ -5452,7 +5452,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
December 22, 2014
|
||||
January 28, 2015
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
.TH LIBPNGPF 3 "December 22, 2014"
|
||||
.TH LIBPNGPF 3 "January 28, 2015"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.22beta01
|
||||
(private functions)
|
||||
|
||||
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "December 22, 2014"
|
||||
.TH PNG 5 "January 28, 2015"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
||||
55
png.c
55
png.c
@ -1,8 +1,8 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* Last changed in libpng 1.5.21 [December 22, 2014]
|
||||
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.22 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2015 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.)
|
||||
*
|
||||
@ -149,9 +149,10 @@ png_calculate_crc(png_structp png_ptr, png_const_bytep ptr, png_size_t length)
|
||||
do
|
||||
{
|
||||
uInt safeLength = (uInt)length;
|
||||
#ifndef __COVERITY__
|
||||
if (safeLength == 0)
|
||||
safeLength = (uInt)-1; /* evil, but safe */
|
||||
|
||||
#endif
|
||||
crc = crc32(crc, ptr, safeLength);
|
||||
|
||||
/* The following should never issue compiler warnings, if they do the
|
||||
@ -660,13 +661,13 @@ png_get_copyright(png_const_structp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.5.22beta01 - December 22, 2014" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.5.22beta01 - January 28, 2015" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2014 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.5.22beta01 - December 22, 2014\
|
||||
return "libpng version 1.5.22beta01 - January 28, 2015\
|
||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
@ -2081,17 +2082,20 @@ png_muldiv_warn(png_structp png_ptr, png_fixed_point a, png_int_32 times,
|
||||
png_fixed_point
|
||||
png_reciprocal(png_fixed_point a)
|
||||
{
|
||||
if (a != 0)
|
||||
{
|
||||
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||
double r = floor(1E10/a+.5);
|
||||
double r = floor(1E10/a+.5);
|
||||
|
||||
if (r <= 2147483647. && r >= -2147483648.)
|
||||
return (png_fixed_point)r;
|
||||
if (r <= 2147483647. && r >= -2147483648.)
|
||||
return (png_fixed_point)r;
|
||||
#else
|
||||
png_fixed_point res;
|
||||
png_fixed_point res;
|
||||
|
||||
if (png_muldiv(&res, 100000, 100000, a))
|
||||
return res;
|
||||
if (png_muldiv(&res, 100000, 100000, a))
|
||||
return res;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0; /* error/overflow */
|
||||
}
|
||||
@ -2126,23 +2130,26 @@ png_reciprocal2(png_fixed_point a, png_fixed_point b)
|
||||
{
|
||||
/* The required result is 1/a * 1/b; the following preserves accuracy. */
|
||||
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||
double r = 1E15/a;
|
||||
r /= b;
|
||||
r = floor(r+.5);
|
||||
if (a != 0 && b != 0)
|
||||
{
|
||||
double r = 1E15/a;
|
||||
r /= b;
|
||||
r = floor(r+.5);
|
||||
|
||||
if (r <= 2147483647. && r >= -2147483648.)
|
||||
return (png_fixed_point)r;
|
||||
if (r <= 2147483647. && r >= -2147483648.)
|
||||
return (png_fixed_point)r;
|
||||
#else
|
||||
/* This may overflow because the range of png_fixed_point isn't symmetric,
|
||||
* but this API is only used for the product of file and screen gamma so it
|
||||
* doesn't matter that the smallest number it can produce is 1/21474, not
|
||||
* 1/100000
|
||||
*/
|
||||
png_fixed_point res = png_product2(a, b);
|
||||
/* This may overflow because the range of png_fixed_point isn't
|
||||
* symmetric, but this API is only used for the product of file and
|
||||
* screen gamma so it doesn't matter that the smallest number it can
|
||||
* produce is 1/21474, not 1/100000
|
||||
*/
|
||||
png_fixed_point res = png_product2(a, b);
|
||||
|
||||
if (res != 0)
|
||||
return png_reciprocal(res);
|
||||
if (res != 0)
|
||||
return png_reciprocal(res);
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0; /* overflow */
|
||||
}
|
||||
|
||||
10
png.h
10
png.h
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.5.22beta01 - December 22, 2014
|
||||
* libpng version 1.5.22beta01 - January 28, 2015
|
||||
* Copyright (c) 1998-2014 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.5.22beta01 - December 22, 2014: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.5.22beta01 - January 28, 2015: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -237,7 +237,7 @@
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, December 22, 2014, are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.22beta01, January 28, 2015, are
|
||||
* Copyright (c) 2004, 2006-2014 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:
|
||||
@ -349,7 +349,7 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* December 22, 2014
|
||||
* January 28, 2015
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
@ -418,7 +418,7 @@
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.5.22beta01"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.5.22beta01 - December 22, 2014\n"
|
||||
" libpng version 1.5.22beta01 - January 28, 2015\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 15
|
||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.5.22beta01 - December 22, 2014
|
||||
* libpng version 1.5.22beta01 - January 28, 2015
|
||||
*
|
||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
||||
12
pngrtran.c
12
pngrtran.c
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.22 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2015 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.)
|
||||
*
|
||||
@ -3341,11 +3341,17 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
|
||||
for (i = 0; i < row_width; i++)
|
||||
{
|
||||
png_uint_16 red, green, blue, w;
|
||||
|
||||
#if 0 /* Coverity doesn't like this */
|
||||
red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
|
||||
green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
|
||||
blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
|
||||
#else
|
||||
png_byte hi,lo;
|
||||
|
||||
hi=*(sp)++; lo=*(sp)++; red = (png_uint_16)((hi << 8) | (lo));
|
||||
hi=*(sp)++; lo=*(sp)++; green = (png_uint_16)((hi << 8) | (lo));
|
||||
hi=*(sp)++; lo=*(sp)++; blue = (png_uint_16)((hi << 8) | (lo));
|
||||
#endif
|
||||
if (red == green && red == blue)
|
||||
{
|
||||
if (png_ptr->gamma_16_table != NULL)
|
||||
|
||||
31
pngrutil.c
31
pngrutil.c
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.5.21 [December 22, 2014]
|
||||
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.5.22 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2015 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.)
|
||||
*
|
||||
@ -2549,20 +2549,23 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
* compression type]". The compression flag shall be 0 (no compression) or
|
||||
* 1 (compressed with method 0 - deflate.)
|
||||
*/
|
||||
if (comp_flag != 0 && comp_flag != 1)
|
||||
if (comp_flag/*compressed*/ != 0)
|
||||
{
|
||||
png_warning(png_ptr, "invalid iTXt compression flag");
|
||||
png_free(png_ptr, png_ptr->chunkdata);
|
||||
png_ptr->chunkdata = NULL;
|
||||
return;
|
||||
}
|
||||
if (comp_flag != 1)
|
||||
{
|
||||
png_warning(png_ptr, "invalid iTXt compression flag");
|
||||
png_free(png_ptr, png_ptr->chunkdata);
|
||||
png_ptr->chunkdata = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (comp_flag/*compressed*/ && comp_type != 0)
|
||||
{
|
||||
png_warning(png_ptr, "unknown iTXt compression type");
|
||||
png_free(png_ptr, png_ptr->chunkdata);
|
||||
png_ptr->chunkdata = NULL;
|
||||
return;
|
||||
if (comp_type != 0)
|
||||
{
|
||||
png_warning(png_ptr, "unknown iTXt compression type");
|
||||
png_free(png_ptr, png_ptr->chunkdata);
|
||||
png_ptr->chunkdata = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (lang_key = lang; *lang_key; lang_key++)
|
||||
|
||||
2
pngset.c
2
pngset.c
@ -2,7 +2,7 @@
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.5.22 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2015 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.)
|
||||
*
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
VisualStudio instructions
|
||||
|
||||
libpng version 1.5.22beta01 - December 22, 2014
|
||||
libpng version 1.5.22beta01 - January 28, 2015
|
||||
|
||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
* zlib.props - location of zlib source
|
||||
*
|
||||
* libpng version 1.5.22beta01 - December 22, 2014
|
||||
* libpng version 1.5.22beta01 - January 28, 2015
|
||||
*
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
|
||||
Makefiles for libpng version 1.5.22beta01 - December 22, 2014
|
||||
Makefiles for libpng version 1.5.22beta01 - January 28, 2015
|
||||
|
||||
pnglibconf.h.prebuilt => Stores configuration settings
|
||||
makefile.linux => Linux/ELF makefile
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* 1.5.22beta01 STANDARD API DEFINITION */
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* libpng version 1.5.22beta01 - December 22, 2014 */
|
||||
/* libpng version 1.5.22beta01 - January 28, 2015 */
|
||||
|
||||
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user