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.23beta02.tar
This commit is contained in:
4
ANNOUNCE
4
ANNOUNCE
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.5.23beta02 - June 3, 2015
|
Libpng 1.5.23beta02 - June 30, 2015
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
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.
|
within a few weeks by a public version or by another test version.
|
||||||
@@ -38,7 +38,7 @@ Version 1.5.23beta01 [May 21, 2015]
|
|||||||
Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug
|
Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug
|
||||||
report from Christopher Ferris).
|
report from Christopher Ferris).
|
||||||
|
|
||||||
Version 1.5.23beta02 [June 3, 2015]
|
Version 1.5.23beta02 [June 30, 2015]
|
||||||
Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the
|
Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the
|
||||||
compiled library size. It never worked properly and as far as we can
|
compiled library size. It never worked properly and as far as we can
|
||||||
tell, no one uses it. The png_set_filter_heuristics() and
|
tell, no one uses it. The png_set_filter_heuristics() and
|
||||||
|
|||||||
2
CHANGES
2
CHANGES
@@ -4350,7 +4350,7 @@ Version 1.5.23beta01 [May 21, 2015]
|
|||||||
Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug
|
Avoid a harmless potential integer overflow in png_XYZ_from_xy() (Bug
|
||||||
report from Christopher Ferris).
|
report from Christopher Ferris).
|
||||||
|
|
||||||
Version 1.5.23beta02 [June 3, 2015]
|
Version 1.5.23beta02 [June 30, 2015]
|
||||||
Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the
|
Removed WRITE_WEIGHTED_FILTERED code, to save a few kbytes of the
|
||||||
compiled library size. It never worked properly and as far as we can
|
compiled library size. It never worked properly and as far as we can
|
||||||
tell, no one uses it. The png_set_filter_heuristics() and
|
tell, no one uses it. The png_set_filter_heuristics() and
|
||||||
|
|||||||
4
LICENSE
4
LICENSE
@@ -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.2.6, August 15, 2004, through 1.5.23beta02, June 1, 2015, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.23beta02, June 30, 2015, are
|
||||||
Copyright (c) 2004, 2006-2015 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004, 2006-2015 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
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
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
June 1, 2015
|
June 30, 2015
|
||||||
|
|||||||
2
README
2
README
@@ -1,4 +1,4 @@
|
|||||||
README for libpng version 1.5.23beta02 - June 1, 2015 (shared library 15.0)
|
README for libpng version 1.5.23beta02 - June 30, 2015 (shared library 15.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.
|
||||||
|
|||||||
@@ -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.5.23beta02 - June 1, 2015
|
libpng version 1.5.23beta02 - June 30, 2015
|
||||||
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-2014 Glenn Randers-Pehrson
|
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:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.23beta02 - June 1, 2015
|
libpng versions 0.97, January 1998, through 1.5.23beta02 - June 30, 2015
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -4535,7 +4535,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XIV. Y2K Compliance in libpng
|
XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
June 1, 2015
|
June 30, 2015
|
||||||
|
|
||||||
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.
|
||||||
|
|||||||
14
libpng.3
14
libpng.3
@@ -1,4 +1,4 @@
|
|||||||
.TH LIBPNG 3 "June 1, 2015"
|
.TH LIBPNG 3 "June 30, 2015"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.23beta02
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.23beta02
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -492,7 +492,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.5.23beta02 - June 1, 2015
|
libpng version 1.5.23beta02 - June 30, 2015
|
||||||
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-2014 Glenn Randers-Pehrson
|
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:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.23beta02 - June 1, 2015
|
libpng versions 0.97, January 1998, through 1.5.23beta02 - June 30, 2015
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -5027,7 +5027,7 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XIV. Y2K Compliance in libpng
|
.SH XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
June 1, 2015
|
June 30, 2015
|
||||||
|
|
||||||
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.
|
||||||
@@ -5337,7 +5337,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.5.23beta02 - June 1, 2015:
|
Libpng version 1.5.23beta02 - June 30, 2015:
|
||||||
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).
|
||||||
|
|
||||||
@@ -5360,7 +5360,7 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.5.23beta02, June 1, 2015, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.23beta02, June 30, 2015, are
|
||||||
Copyright (c) 2004,2006-2015 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004,2006-2015 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
@@ -5459,7 +5459,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
June 1, 2015
|
June 30, 2015
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH LIBPNGPF 3 "June 1, 2015"
|
.TH LIBPNGPF 3 "June 30, 2015"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.23beta02
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.23beta02
|
||||||
(private functions)
|
(private functions)
|
||||||
|
|||||||
2
png.5
2
png.5
@@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "June 1, 2015"
|
.TH PNG 5 "June 30, 2015"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|||||||
4
png.c
4
png.c
@@ -648,13 +648,13 @@ png_get_copyright(png_const_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.5.23beta02 - June 1, 2015" PNG_STRING_NEWLINE \
|
"libpng version 1.5.23beta02 - June 30, 2015" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2015 Glenn Randers-Pehrson" 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.5.23beta02 - June 1, 2015\
|
return "libpng version 1.5.23beta02 - June 30, 2015\
|
||||||
Copyright (c) 1998-2015 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2015 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
10
png.h
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.5.23beta02, June 10, 2015
|
* libpng version 1.5.23beta02, June 30, 2015
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2015 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2015 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.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.5.23beta02, June 10, 2015: Glenn
|
* libpng versions 0.97, January 1998, through 1.5.23beta02, June 30, 2015: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.23beta02, June 10, 2015, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.5.23beta02, June 30, 2015, are
|
||||||
* Copyright (c) 2004, 2006-2015 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2015 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
@@ -353,7 +353,7 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* June 10, 2015
|
* June 30, 2015
|
||||||
*
|
*
|
||||||
* 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.
|
||||||
@@ -422,7 +422,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.5.23beta02"
|
#define PNG_LIBPNG_VER_STRING "1.5.23beta02"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.5.23beta02 - June 10, 2015\n"
|
" libpng version 1.5.23beta02 - June 30, 2015\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 15
|
#define PNG_LIBPNG_VER_SONUM 15
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.5.23beta02, June 1, 2015
|
* libpng version 1.5.23beta02, June 30, 2015
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
|||||||
@@ -70,10 +70,10 @@ png_process_data_pause(png_structp png_ptr, int save)
|
|||||||
png_uint_32 PNGAPI
|
png_uint_32 PNGAPI
|
||||||
png_process_data_skip(png_structp png_ptr)
|
png_process_data_skip(png_structp png_ptr)
|
||||||
{
|
{
|
||||||
/* TODO: somewhere the implementation of this seems to have been lost,
|
/* TODO: Deprecate and remove this API.
|
||||||
* or abandoned. It was only to support some internal snooping done by
|
* Somewhere the implementation of this seems to have been lost,
|
||||||
* Mozilla (i.e. back-door access to png_struct) in 1.4; apparently they
|
* or abandoned. It was only to support some internal back-door access
|
||||||
* must have stopped doing it.
|
* to png_struct) in libpng-1.4.x.
|
||||||
*/
|
*/
|
||||||
png_warning(png_ptr,
|
png_warning(png_ptr,
|
||||||
"png_process_data_skip is not implemented in any current version"
|
"png_process_data_skip is not implemented in any current version"
|
||||||
|
|||||||
11
pngread.c
11
pngread.c
@@ -559,7 +559,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
|||||||
if (ret == Z_STREAM_END)
|
if (ret == Z_STREAM_END)
|
||||||
{
|
{
|
||||||
if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in ||
|
if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in ||
|
||||||
png_ptr->idat_size)
|
png_ptr->idat_size)
|
||||||
png_benign_error(png_ptr, "Extra compressed data");
|
png_benign_error(png_ptr, "Extra compressed data");
|
||||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
png_ptr->mode |= PNG_AFTER_IDAT;
|
||||||
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
|
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
|
||||||
@@ -617,7 +617,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
|||||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||||
/* Blow up interlaced rows to full size */
|
/* Blow up interlaced rows to full size */
|
||||||
if (png_ptr->interlaced &&
|
if (png_ptr->interlaced &&
|
||||||
(png_ptr->transformations & PNG_INTERLACE))
|
(png_ptr->transformations & PNG_INTERLACE))
|
||||||
{
|
{
|
||||||
if (png_ptr->pass < 6)
|
if (png_ptr->pass < 6)
|
||||||
png_do_read_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass,
|
png_do_read_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass,
|
||||||
@@ -1119,9 +1119,8 @@ png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn)
|
|||||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||||
#ifdef PNG_INFO_IMAGE_SUPPORTED
|
#ifdef PNG_INFO_IMAGE_SUPPORTED
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_read_png(png_structp png_ptr, png_infop info_ptr,
|
png_read_png(png_structp png_ptr, png_infop info_ptr, int transforms,
|
||||||
int transforms,
|
voidp params)
|
||||||
voidp params)
|
|
||||||
{
|
{
|
||||||
int row;
|
int row;
|
||||||
|
|
||||||
@@ -1281,7 +1280,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
|||||||
|
|
||||||
for (row = 0; row < (int)info_ptr->height; row++)
|
for (row = 0; row < (int)info_ptr->height; row++)
|
||||||
info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
|
info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
|
||||||
png_get_rowbytes(png_ptr, info_ptr));
|
png_get_rowbytes(png_ptr, info_ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
png_read_image(png_ptr, info_ptr->row_pointers);
|
png_read_image(png_ptr, info_ptr->row_pointers);
|
||||||
|
|||||||
126
pngwrite.c
126
pngwrite.c
@@ -34,85 +34,87 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
|
|||||||
|
|
||||||
if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
|
if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
|
||||||
{
|
{
|
||||||
/* Write PNG signature */
|
/* Write PNG signature */
|
||||||
png_write_sig(png_ptr);
|
png_write_sig(png_ptr);
|
||||||
|
|
||||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||||
if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \
|
if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \
|
||||||
(png_ptr->mng_features_permitted))
|
(png_ptr->mng_features_permitted))
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "MNG features are not allowed in a PNG datastream");
|
png_warning(png_ptr,
|
||||||
png_ptr->mng_features_permitted = 0;
|
"MNG features are not allowed in a PNG datastream");
|
||||||
}
|
png_ptr->mng_features_permitted = 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Write IHDR information. */
|
/* Write IHDR information. */
|
||||||
png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height,
|
png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height,
|
||||||
info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type,
|
info_ptr->bit_depth, info_ptr->color_type,
|
||||||
info_ptr->filter_type,
|
info_ptr->compression_type, info_ptr->filter_type,
|
||||||
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
||||||
info_ptr->interlace_type);
|
info_ptr->interlace_type
|
||||||
#else
|
#else
|
||||||
0);
|
0
|
||||||
#endif
|
#endif
|
||||||
/* The rest of these check to see if the valid field has the appropriate
|
);
|
||||||
* flag set, and if it does, writes the chunk.
|
/* The rest of these check to see if the valid field has the appropriate
|
||||||
*/
|
* flag set, and if it does, writes the chunk.
|
||||||
|
*/
|
||||||
#ifdef PNG_WRITE_gAMA_SUPPORTED
|
#ifdef PNG_WRITE_gAMA_SUPPORTED
|
||||||
if (info_ptr->valid & PNG_INFO_gAMA)
|
if (info_ptr->valid & PNG_INFO_gAMA)
|
||||||
png_write_gAMA_fixed(png_ptr, info_ptr->gamma);
|
png_write_gAMA_fixed(png_ptr, info_ptr->gamma);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PNG_WRITE_sRGB_SUPPORTED
|
#ifdef PNG_WRITE_sRGB_SUPPORTED
|
||||||
if (info_ptr->valid & PNG_INFO_sRGB)
|
if (info_ptr->valid & PNG_INFO_sRGB)
|
||||||
png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent);
|
png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_iCCP_SUPPORTED
|
#ifdef PNG_WRITE_iCCP_SUPPORTED
|
||||||
if (info_ptr->valid & PNG_INFO_iCCP)
|
if (info_ptr->valid & PNG_INFO_iCCP)
|
||||||
png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE,
|
png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE,
|
||||||
(png_charp)info_ptr->iccp_profile, (int)info_ptr->iccp_proflen);
|
(png_charp)info_ptr->iccp_profile, (int)info_ptr->iccp_proflen);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PNG_WRITE_sBIT_SUPPORTED
|
#ifdef PNG_WRITE_sBIT_SUPPORTED
|
||||||
if (info_ptr->valid & PNG_INFO_sBIT)
|
if (info_ptr->valid & PNG_INFO_sBIT)
|
||||||
png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type);
|
png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PNG_WRITE_cHRM_SUPPORTED
|
#ifdef PNG_WRITE_cHRM_SUPPORTED
|
||||||
if (info_ptr->valid & PNG_INFO_cHRM)
|
if (info_ptr->valid & PNG_INFO_cHRM)
|
||||||
png_write_cHRM_fixed(png_ptr,
|
png_write_cHRM_fixed(png_ptr,
|
||||||
info_ptr->x_white, info_ptr->y_white,
|
info_ptr->x_white, info_ptr->y_white,
|
||||||
info_ptr->x_red, info_ptr->y_red,
|
info_ptr->x_red, info_ptr->y_red,
|
||||||
info_ptr->x_green, info_ptr->y_green,
|
info_ptr->x_green, info_ptr->y_green,
|
||||||
info_ptr->x_blue, info_ptr->y_blue);
|
info_ptr->x_blue, info_ptr->y_blue);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
if (info_ptr->unknown_chunks_num)
|
if (info_ptr->unknown_chunks_num)
|
||||||
{
|
|
||||||
png_unknown_chunk *up;
|
|
||||||
|
|
||||||
png_debug(5, "writing extra chunks");
|
|
||||||
|
|
||||||
for (up = info_ptr->unknown_chunks;
|
|
||||||
up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
|
|
||||||
up++)
|
|
||||||
{
|
{
|
||||||
int keep = png_handle_as_unknown(png_ptr, up->name);
|
png_unknown_chunk *up;
|
||||||
|
|
||||||
if (keep != PNG_HANDLE_CHUNK_NEVER &&
|
png_debug(5, "writing extra chunks");
|
||||||
up->location &&
|
|
||||||
!(up->location & PNG_HAVE_PLTE) &&
|
for (up = info_ptr->unknown_chunks;
|
||||||
!(up->location & PNG_HAVE_IDAT) &&
|
up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num;
|
||||||
!(up->location & PNG_AFTER_IDAT) &&
|
up++)
|
||||||
((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
|
|
||||||
(png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
|
|
||||||
{
|
{
|
||||||
if (up->size == 0)
|
int keep = png_handle_as_unknown(png_ptr, up->name);
|
||||||
png_warning(png_ptr, "Writing zero-length unknown chunk");
|
|
||||||
|
|
||||||
png_write_chunk(png_ptr, up->name, up->data, up->size);
|
if (keep != PNG_HANDLE_CHUNK_NEVER &&
|
||||||
|
up->location &&
|
||||||
|
!(up->location & PNG_HAVE_PLTE) &&
|
||||||
|
!(up->location & PNG_HAVE_IDAT) &&
|
||||||
|
!(up->location & PNG_AFTER_IDAT) &&
|
||||||
|
((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
|
||||||
|
(png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
|
||||||
|
{
|
||||||
|
if (up->size == 0)
|
||||||
|
png_warning(png_ptr, "Writing zero-length unknown chunk");
|
||||||
|
|
||||||
|
png_write_chunk(png_ptr, up->name, up->data, up->size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE;
|
png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE;
|
||||||
}
|
}
|
||||||
@@ -498,14 +500,13 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
*/
|
*/
|
||||||
#ifdef USE_FAR_KEYWORD
|
#ifdef USE_FAR_KEYWORD
|
||||||
if (setjmp(tmp_jmpbuf))
|
if (setjmp(tmp_jmpbuf))
|
||||||
|
png_memcpy(png_jmpbuf(png_ptr), tmp_jmpbuf, png_sizeof(jmp_buf));
|
||||||
|
PNG_ABORT();
|
||||||
#else
|
#else
|
||||||
if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */
|
if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */
|
||||||
#endif
|
|
||||||
#ifdef USE_FAR_KEYWORD
|
|
||||||
png_memcpy(png_jmpbuf(png_ptr), tmp_jmpbuf, png_sizeof(jmp_buf));
|
|
||||||
#endif
|
|
||||||
PNG_ABORT();
|
PNG_ABORT();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_USER_MEM_SUPPORTED
|
#ifdef PNG_USER_MEM_SUPPORTED
|
||||||
png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn);
|
png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn);
|
||||||
@@ -1066,6 +1067,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
|
|||||||
*/
|
*/
|
||||||
if (png_ptr->row_buf != NULL)
|
if (png_ptr->row_buf != NULL)
|
||||||
{
|
{
|
||||||
|
png_ptr->do_filter = PNG_FILTER_NONE;
|
||||||
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||||
if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL)
|
if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL)
|
||||||
{
|
{
|
||||||
@@ -1126,8 +1128,8 @@ png_set_filter(png_structp png_ptr, int method, int filters)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (png_ptr->do_filter == PNG_NO_FILTERS)
|
if (png_ptr->do_filter == PNG_NO_FILTERS)
|
||||||
#endif /* PNG_WRITE_FILTER_SUPPORTED */
|
|
||||||
png_ptr->do_filter = PNG_FILTER_NONE;
|
png_ptr->do_filter = PNG_FILTER_NONE;
|
||||||
|
#endif /* PNG_WRITE_FILTER_SUPPORTED */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1309,10 +1311,10 @@ png_set_text_compression_window_bits(png_structp png_ptr, int window_bits)
|
|||||||
#ifndef WBITS_8_OK
|
#ifndef WBITS_8_OK
|
||||||
/* Avoid libpng bug with 256-byte windows */
|
/* Avoid libpng bug with 256-byte windows */
|
||||||
if (window_bits == 8)
|
if (window_bits == 8)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Text compression window is being reset to 512");
|
png_warning(png_ptr, "Text compression window is being reset to 512");
|
||||||
window_bits = 9;
|
window_bits = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS;
|
png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
VisualStudio instructions
|
VisualStudio instructions
|
||||||
|
|
||||||
libpng version 1.5.23beta02 - June 1, 2015
|
libpng version 1.5.23beta02 - June 30, 2015
|
||||||
|
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* zlib.props - location of zlib source
|
* zlib.props - location of zlib source
|
||||||
*
|
*
|
||||||
* libpng version 1.5.23beta02 - June 1, 2015
|
* libpng version 1.5.23beta02 - June 30, 2015
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Makefiles for libpng version 1.5.23beta02 - June 1, 2015
|
Makefiles for libpng version 1.5.23beta02 - June 30, 2015
|
||||||
|
|
||||||
pnglibconf.h.prebuilt => Stores configuration settings
|
pnglibconf.h.prebuilt => Stores configuration settings
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* 1.5.23beta02 STANDARD API DEFINITION */
|
/* 1.5.23beta02 STANDARD API DEFINITION */
|
||||||
/* pnglibconf.h - library build configuration */
|
/* pnglibconf.h - library build configuration */
|
||||||
|
|
||||||
/* libpng version 1.5.23beta02 - June 1, 2015 */
|
/* libpng version 1.5.23beta02 - June 30, 2015 */
|
||||||
|
|
||||||
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user