[devel] Added description of png_set_crc_action() to the manual.

This commit is contained in:
Glenn Randers-Pehrson 2011-01-06 21:42:36 -06:00
parent 20788d3b90
commit 9dd1cdff66
4 changed files with 65 additions and 13 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.1beta01 - January 6, 2011
Libpng 1.5.1beta01 - January 7, 2011
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.
@ -26,7 +26,8 @@ Other information:
Changes since the last public release (1.5.0):
Version 1.5.1beta01 [January 6, 2011]
Version 1.5.1beta01 [January 7, 2011]
Added description of png_set_crc_action() to the manual.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit

View File

@ -3142,7 +3142,8 @@ Version 1.5.0rc07 [January 4, 2011]
Version 1.5.0 [January 6, 2011]
No changes.
Version 1.5.1beta01 [January 6, 2011]
Version 1.5.1beta01 [January 7, 2011]
Added description of png_set_crc_action() to the manual.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.5.1beta01 - January 6, 2011
libpng version 1.5.1beta01 - January 7, 2011
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2010 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.1beta01 - January 6, 2011
libpng versions 0.97, January 1998, through 1.5.1beta01 - January 7, 2011
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2010 Glenn Randers-Pehrson
@ -420,6 +420,31 @@ where the default size is 8192 bytes. Note that the buffer size
is changed immediately and the buffer is reallocated immediately,
instead of setting a flag to be acted upon later.
If you want CRC errors to be handled in a different manner than
the default, use
png_set_crc_action(png_ptr, crit_action, ancil_action);
The values for png_set_crc_action() say how libpng is to handle CRC errors in
ancillary and critical chunks, and whether to use the data contained
therein. Note that it is impossible to "discard" data in a critical
chunk.
Choices for (int) crit_action are
PNG_CRC_DEFAULT 0 error/quit
PNG_CRC_ERROR_QUIT 1 error/quit
PNG_CRC_WARN_USE 3 warn/use data
PNG_CRC_QUIET_USE 4 quiet/use data
PNG_CRC_NO_CHANGE 5 use the current value
Choices for (int) ancil_action are
PNG_CRC_DEFAULT 0 error/quit
PNG_CRC_ERROR_QUIT 1 error/quit
PNG_CRC_WARN_DISCARD 2 warn/discard data
PNG_CRC_WARN_USE 3 warn/use data
PNG_CRC_QUIET_USE 4 quiet/use data
PNG_CRC_NO_CHANGE 5 use the current value
Setting up callback code
You can set up a callback function to handle any unknown chunks in the
@ -3810,7 +3835,7 @@ Other rules can be inferred by inspecting the libpng source.
XIV. Y2K Compliance in libpng
January 6, 2011
January 7, 2011
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 "January 6, 2011"
.TH LIBPNG 3 "January 7, 2011"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1beta01
.SH SYNOPSIS
@ -851,7 +851,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.1beta01 - January 6, 2011
libpng version 1.5.1beta01 - January 7, 2011
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2010 Glenn Randers-Pehrson
@ -862,7 +862,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.1beta01 - January 6, 2011
libpng versions 0.97, January 1998, through 1.5.1beta01 - January 7, 2011
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2010 Glenn Randers-Pehrson
@ -1271,6 +1271,31 @@ where the default size is 8192 bytes. Note that the buffer size
is changed immediately and the buffer is reallocated immediately,
instead of setting a flag to be acted upon later.
If you want CRC errors to be handled in a different manner than
the default, use
png_set_crc_action(png_ptr, crit_action, ancil_action);
The values for png_set_crc_action() say how libpng is to handle CRC errors in
ancillary and critical chunks, and whether to use the data contained
therein. Note that it is impossible to "discard" data in a critical
chunk.
Choices for (int) crit_action are
PNG_CRC_DEFAULT 0 error/quit
PNG_CRC_ERROR_QUIT 1 error/quit
PNG_CRC_WARN_USE 3 warn/use data
PNG_CRC_QUIET_USE 4 quiet/use data
PNG_CRC_NO_CHANGE 5 use the current value
Choices for (int) ancil_action are
PNG_CRC_DEFAULT 0 error/quit
PNG_CRC_ERROR_QUIT 1 error/quit
PNG_CRC_WARN_DISCARD 2 warn/discard data
PNG_CRC_WARN_USE 3 warn/use data
PNG_CRC_QUIET_USE 4 quiet/use data
PNG_CRC_NO_CHANGE 5 use the current value
.SS Setting up callback code
You can set up a callback function to handle any unknown chunks in the
@ -4661,7 +4686,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIV. Y2K Compliance in libpng
January 6, 2011
January 7, 2011
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
@ -4907,7 +4932,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.5.1beta01 - January 6, 2011:
Libpng version 1.5.1beta01 - January 7, 2011:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -4930,7 +4955,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.1beta01, January 6, 2011, are
libpng versions 1.2.6, August 15, 2004, through 1.5.1beta01, January 7, 2011, 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
@ -5029,7 +5054,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
January 6, 2011
January 7, 2011
.\" end of man page