[libpng] Added synopses for new png_image functions to the manual.

This commit is contained in:
Glenn Randers-Pehrson 2011-11-07 23:50:05 -06:00
parent efc4b69767
commit e0a6c06bfd
3 changed files with 78 additions and 14 deletions

View File

@ -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.7beta02 - November 4, 2011 libpng version 1.5.7beta02 - November 8, 2011
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-2011 Glenn Randers-Pehrson Copyright (c) 1998-2011 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.7beta02 - November 4, 2011 libpng versions 0.97, January 1998, through 1.5.7beta02 - November 8, 2011
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -4566,7 +4566,7 @@ Other rules can be inferred by inspecting the libpng source.
XIV. Y2K Compliance in libpng XIV. Y2K Compliance in libpng
November 4, 2011 November 8, 2011
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.

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "November 4, 2011" .TH LIBPNG 3 "November 8, 2011"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta02 libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta02
.SH SYNOPSIS .SH SYNOPSIS
@ -8,6 +8,36 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta02
\fI\fB \fI\fB
\fBint \fP\fIpng_image_begin_read_from_file\fP\fB, (png_imagep \fIimage,
\fBconst char \fI*file_name)\fP\fB);\fP
\fBint \fP\fIpng_image_begin_read_from_stdio\fP\fB, (png_imagep \fIimage,
\fBFILE* \fIfile)\fP\fB);\fP
\fBint, \fP\fIpng_image_begin_read_from_memory\fP\fB, (png_imagep \fIimage,
\fBpng_const_voidp \fP\fImemory\fP\fB, png_size_t \fIsize)\fP\fB);\fP
\fBint \fP\fIpng_image_finish_read\fP\fB, (png_imagep \fIimage,
\fBpng_colorp \fP\fIbackground\fP\fB, void \fP\fI*buffer\fP\fB, png_int_32 \fIrow_stride)\fP\fB);\fP
\fBvoid \fP\fIpng_image_free\fP\fB, (png_imagep \fIimage)\fP\fB);\fP
\fBint \fP\fIpng_image_write_to_file\fP\fB, (png_imagep \fIimage,
\fBconst char \fP\fI*file\fP\fB, int \fP\fIconvert_to_8bit\fP\fB, const void \fI*buffer,
\fBpng_int_32 \fIrow_stride)\fP\fB);\fP
\fBint \fP\fIpng_image_write_to_stdio\fP\fB, (png_imagep \fP\fIimage\fP\fB, FILE \fI*file,
\fBint \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fIrow_stride)\fP\fB);\fP
\fI\fB
\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP \fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP
\fI\fB \fI\fB
@ -432,6 +462,36 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta02
\fI\fB \fI\fB
\fBint png_image_begin_read_from_file (png_imagep \fP\fIimage\fP\fB, const char \fI*file_name\fP\fB);\fP
\fI\fB
\fBint png_image_begin_read_from_stdio (png_imagep \fP\fIimage\fP\fB, FILE* \fIfile\fP\fB);\fP
\fI\fB
\fBint, png_image_begin_read_from_memory (png_imagep \fP\fIimage\fP\fB, png_const_voidp \fP\fImemory\fP\fB, png_size_t \fIsize\fP\fB);\fP
\fI\fB
\fBint png_image_finish_read (png_imagep \fP\fIimage\fP\fB, png_colorp \fP\fIbackground\fP\fB, void \fP\fI*buffer\fP\fB, png_int_32 \fIrow_stride\fP\fB);\fP
\fI\fB
\fBvoid png_image_free (png_imagep \fIimage\fP\fB);\fP
\fI\fB
\fBint png_image_write_to_file (png_imagep \fP\fIimage\fP\fB, const char \fP\fI*file\fP\fB, int \fP\fIconvert_to_8bit\fP\fB, const void \fI*buffer,
\fBpng_int_32 \fIrow_stride\fP\fB);\fP
\fI\fB
\fBint png_image_write_to_stdio (png_imagep \fP\fIimage\fP\fB, FILE \fP\fI*file\fP\fB, int \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fIrow_stride)\fP\fB);\fP
\fI\fB
\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP \fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
\fI\fB \fI\fB
@ -977,7 +1037,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.7beta02 - November 4, 2011 libpng version 1.5.7beta02 - November 8, 2011
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-2011 Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -988,7 +1048,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.7beta02 - November 4, 2011 libpng versions 0.97, January 1998, through 1.5.7beta02 - November 8, 2011
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson
@ -5544,7 +5604,7 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIV. Y2K Compliance in libpng .SH XIV. Y2K Compliance in libpng
November 4, 2011 November 8, 2011
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.
@ -5809,7 +5869,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.7beta02 - November 4, 2011: Libpng version 1.5.7beta02 - November 8, 2011:
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).
@ -5832,7 +5892,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.7beta02, November 4, 2011, are libpng versions 1.2.6, August 15, 2004, through 1.5.7beta02, November 8, 2011, are
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are Copyright (c) 2004,2006-2007 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
@ -5931,7 +5991,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
November 4, 2011 November 8, 2011
.\" end of man page .\" end of man page

12
png.h
View File

@ -2781,12 +2781,14 @@ typedef struct
(PNG_IMAGE_CHANNELS((image).format) * (image).width) (PNG_IMAGE_CHANNELS((image).format) * (image).width)
/* Return the total number of components in a single row of the image; this /* Return the total number of components in a single row of the image; this
* is the minimum 'row stride', the minimum count of components between each * is the minimum 'row stride', the minimum count of components between each
* row. */ * row.
*/
#define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\ #define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\
(PNG_IMAGE_COMPONENT_SIZE((image).format) * (image).height * (row_stride)) (PNG_IMAGE_COMPONENT_SIZE((image).format) * (image).height * (row_stride))
/* Return the size, in bytes, of an image buffer given a png_image and a row /* Return the size, in bytes, of an image buffer given a png_image and a row
* stride - the number of components to leave space for in each row. */ * stride - the number of components to leave space for in each row.
*/
/* PNG_IMAGE_FLAG_* /* PNG_IMAGE_FLAG_*
* *
@ -2809,7 +2811,8 @@ typedef struct
PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image, PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image,
const char *file_name)); const char *file_name));
/* The named file is opened for read and the image filled in from the PNG /* The named file is opened for read and the image filled in from the PNG
* header in the file. */ * header in the file.
*/
PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image, PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
FILE* file)); FILE* file));
@ -2842,7 +2845,8 @@ PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image,
PNG_EXPORT(238, void, png_image_free, (png_imagep image)); PNG_EXPORT(238, void, png_image_free, (png_imagep image));
/* Free any data allocated by libpng in image->opaque, setting the pointer to /* Free any data allocated by libpng in image->opaque, setting the pointer to
* NULL. May be called at any time after the structure is initialized. */ * NULL. May be called at any time after the structure is initialized.
*/
#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */ #endif /* PNG_SIMPLIFIED_READ_SUPPORTED */
#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED