[devel] Made the manual, synopses, and function prototypes use the function
argument names file_gamma, int_file_gamma, and srgb_intent consistently.
This commit is contained in:
parent
81ce889435
commit
8d0bc0f026
14
ANNOUNCE
14
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.5.1beta10 - January 24, 2011
|
||||
Libpng 1.5.1beta10 - January 26, 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.
|
||||
@ -96,8 +96,16 @@ Version 1.5.1beta09 [January 24, 2011]
|
||||
documentation did not accurately describe what libpng really does when
|
||||
converting RGB to gray.
|
||||
|
||||
Version 1.5.1beta10 [January 24, 2011]
|
||||
Fixed incorrect examples of callback prototypes in the manual.
|
||||
Version 1.5.1beta10 [January 26, 2011]
|
||||
Fixed incorrect examples of callback prototypes in the manual, that were
|
||||
introduced in libpng-1.0.0.
|
||||
In addition the order of the png_get_uint macros with respect to the
|
||||
relevant function definitions has been reversed. This helps the
|
||||
preprocessing of the symbol files be more robust. Furthermore, the
|
||||
symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS; this stops
|
||||
the read macros interfering with the symbol file format.
|
||||
Made the manual, synopses, and function prototypes use the function
|
||||
argument names file_gamma, int_file_gamma, and srgb_intent consistent.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||
(subscription required; visit
|
||||
|
18
CHANGES
18
CHANGES
@ -3212,14 +3212,16 @@ Version 1.5.1beta09 [January 24, 2011]
|
||||
documentation did not accurately describe what libpng really does when
|
||||
converting RGB to gray.
|
||||
|
||||
Version 1.5.1beta10 [January 24, 2011]
|
||||
Fixed incorrect examples of callback prototypes in the manual.
|
||||
|
||||
In addition the order of the png_get_uint macros with respect to the relevant
|
||||
function definitions has been reversed. This helps the preprocessing of the
|
||||
symbol files be more robust. Further the symbol file preprocessing now uses
|
||||
-DPNG_NO_USE_READ_MACROS; this stops the read macros interfering with the symbol
|
||||
file format.
|
||||
Version 1.5.1beta10 [January 26, 2011]
|
||||
Fixed incorrect examples of callback prototypes in the manual, that were
|
||||
introduced in libpng-1.0.0.
|
||||
In addition the order of the png_get_uint macros with respect to the
|
||||
relevant function definitions has been reversed. This helps the
|
||||
preprocessing of the symbol files be more robust. Furthermore, the
|
||||
symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS; this stops
|
||||
the read macros interfering with the symbol file format.
|
||||
Made the manual, synopses, and function prototypes use the function
|
||||
argument names file_gamma, int_file_gamma, and srgb_intent consistent.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -1,6 +1,6 @@
|
||||
libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.5.1beta10 - January 24, 2011
|
||||
libpng version 1.5.1beta10 - January 26, 2011
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
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:
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.5.1beta10 - January 24, 2011
|
||||
libpng versions 0.97, January 1998, through 1.5.1beta10 - January 26, 2011
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
|
||||
@ -848,10 +848,14 @@ pointer into the info_ptr is returned for any complex types.
|
||||
|
||||
num_palette - number of entries in the palette
|
||||
|
||||
png_get_gAMA(png_ptr, info_ptr, &gamma);
|
||||
png_get_gAMA(png_ptr, info_ptr, &file_gamma);
|
||||
png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
|
||||
|
||||
gamma - the gamma the file is written
|
||||
at (PNG_INFO_gAMA)
|
||||
file_gamma - the gamma at which the file is
|
||||
written (PNG_INFO_gAMA)
|
||||
|
||||
int_file_gamma - 100,000 times the gamma at which the
|
||||
file is written
|
||||
|
||||
png_get_sRGB(png_ptr, info_ptr, &srgb_intent);
|
||||
|
||||
@ -1430,8 +1434,8 @@ on gamma in the PNG specification for an excellent description of what
|
||||
gamma is, and why all applications should support it. It is strongly
|
||||
recommended that PNG viewers support gamma correction.
|
||||
|
||||
if (png_get_gAMA(png_ptr, info_ptr, &gamma))
|
||||
png_set_gamma(png_ptr, screen_gamma, gamma);
|
||||
if (png_get_gAMA(png_ptr, info_ptr, &file_gamma))
|
||||
png_set_gamma(png_ptr, screen_gamma, file_gamma);
|
||||
|
||||
else
|
||||
png_set_gamma(png_ptr, screen_gamma, 0.45455);
|
||||
@ -2314,10 +2318,14 @@ width, height, bit_depth, and color_type must be the same in each call.
|
||||
(array of png_color)
|
||||
num_palette - number of entries in the palette
|
||||
|
||||
png_set_gAMA(png_ptr, info_ptr, gamma);
|
||||
png_set_gAMA(png_ptr, info_ptr, file_gamma);
|
||||
png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
|
||||
|
||||
gamma - the gamma the image was created
|
||||
at (PNG_INFO_gAMA)
|
||||
file_gamma - the gamma at which the image was
|
||||
created (PNG_INFO_gAMA)
|
||||
|
||||
int_file_gamma - 100,000 times the gamma at which
|
||||
the image was created
|
||||
|
||||
png_set_sRGB(png_ptr, info_ptr, srgb_intent);
|
||||
|
||||
@ -2388,10 +2396,9 @@ width, height, bit_depth, and color_type must be the same in each call.
|
||||
(PNG_INFO_tRNS)
|
||||
|
||||
png_set_hIST(png_ptr, info_ptr, hist);
|
||||
(PNG_INFO_hIST)
|
||||
|
||||
hist - histogram of palette (array of
|
||||
png_uint_16)
|
||||
png_uint_16) (PNG_INFO_hIST)
|
||||
|
||||
png_set_tIME(png_ptr, info_ptr, mod_time);
|
||||
|
||||
@ -4073,7 +4080,7 @@ Other rules can be inferred by inspecting the libpng source.
|
||||
|
||||
XIV. Y2K Compliance in libpng
|
||||
|
||||
January 24, 2011
|
||||
January 26, 2011
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
47
libpng.3
47
libpng.3
@ -1,4 +1,4 @@
|
||||
.TH LIBPNG 3 "January 24, 2011"
|
||||
.TH LIBPNG 3 "January 26, 2011"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1beta10
|
||||
.SH SYNOPSIS
|
||||
@ -312,7 +312,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1beta10
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_uint_32 png_get_sRGB (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int \fI*intent\fP\fB);\fP
|
||||
\fBpng_uint_32 png_get_sRGB (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int \fI*file_srgb_intent\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
@ -764,11 +764,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1beta10
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP
|
||||
\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP
|
||||
\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
@ -919,7 +919,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.1beta10 - January 24, 2011
|
||||
libpng version 1.5.1beta10 - January 26, 2011
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
@ -930,7 +930,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.5.1beta10 - January 24, 2011
|
||||
libpng versions 0.97, January 1998, through 1.5.1beta10 - January 26, 2011
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
|
||||
@ -1767,10 +1767,14 @@ pointer into the info_ptr is returned for any complex types.
|
||||
|
||||
num_palette - number of entries in the palette
|
||||
|
||||
png_get_gAMA(png_ptr, info_ptr, &gamma);
|
||||
png_get_gAMA(png_ptr, info_ptr, &file_gamma);
|
||||
png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
|
||||
|
||||
gamma - the gamma the file is written
|
||||
at (PNG_INFO_gAMA)
|
||||
file_gamma - the gamma at which the file is
|
||||
written (PNG_INFO_gAMA)
|
||||
|
||||
int_file_gamma - 100,000 times the gamma at which the
|
||||
file is written
|
||||
|
||||
png_get_sRGB(png_ptr, info_ptr, &srgb_intent);
|
||||
|
||||
@ -2349,8 +2353,8 @@ on gamma in the PNG specification for an excellent description of what
|
||||
gamma is, and why all applications should support it. It is strongly
|
||||
recommended that PNG viewers support gamma correction.
|
||||
|
||||
if (png_get_gAMA(png_ptr, info_ptr, &gamma))
|
||||
png_set_gamma(png_ptr, screen_gamma, gamma);
|
||||
if (png_get_gAMA(png_ptr, info_ptr, &file_gamma))
|
||||
png_set_gamma(png_ptr, screen_gamma, file_gamma);
|
||||
|
||||
else
|
||||
png_set_gamma(png_ptr, screen_gamma, 0.45455);
|
||||
@ -3233,10 +3237,14 @@ width, height, bit_depth, and color_type must be the same in each call.
|
||||
(array of png_color)
|
||||
num_palette - number of entries in the palette
|
||||
|
||||
png_set_gAMA(png_ptr, info_ptr, gamma);
|
||||
png_set_gAMA(png_ptr, info_ptr, file_gamma);
|
||||
png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
|
||||
|
||||
gamma - the gamma the image was created
|
||||
at (PNG_INFO_gAMA)
|
||||
file_gamma - the gamma at which the image was
|
||||
created (PNG_INFO_gAMA)
|
||||
|
||||
int_file_gamma - 100,000 times the gamma at which
|
||||
the image was created
|
||||
|
||||
png_set_sRGB(png_ptr, info_ptr, srgb_intent);
|
||||
|
||||
@ -3307,10 +3315,9 @@ width, height, bit_depth, and color_type must be the same in each call.
|
||||
(PNG_INFO_tRNS)
|
||||
|
||||
png_set_hIST(png_ptr, info_ptr, hist);
|
||||
(PNG_INFO_hIST)
|
||||
|
||||
hist - histogram of palette (array of
|
||||
png_uint_16)
|
||||
png_uint_16) (PNG_INFO_hIST)
|
||||
|
||||
png_set_tIME(png_ptr, info_ptr, mod_time);
|
||||
|
||||
@ -4992,7 +4999,7 @@ Other rules can be inferred by inspecting the libpng source.
|
||||
|
||||
.SH XIV. Y2K Compliance in libpng
|
||||
|
||||
January 24, 2011
|
||||
January 26, 2011
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
@ -5238,7 +5245,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.5.1beta10 - January 24, 2011:
|
||||
Libpng version 1.5.1beta10 - January 26, 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).
|
||||
|
||||
@ -5261,7 +5268,7 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.1beta10, January 24, 2011, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.1beta10, January 26, 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
|
||||
@ -5360,7 +5367,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
January 24, 2011
|
||||
January 26, 2011
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
16
png.h
16
png.h
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.5.1beta10 - January 24, 2011
|
||||
* libpng version 1.5.1beta10 - January 26, 2011
|
||||
* Copyright (c) 1998-2011 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.1beta10 - January 24, 2011: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.5.1beta10 - January 26, 2011: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -176,7 +176,7 @@
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.1beta10, January 24, 2011, are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.1beta10, January 26, 2011, are
|
||||
* Copyright (c) 2004, 2006-2011 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:
|
||||
@ -288,7 +288,7 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* January 24, 2011
|
||||
* January 26, 2011
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
@ -352,7 +352,7 @@
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.5.1beta10"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.5.1beta10 - January 24, 2011\n"
|
||||
" libpng version 1.5.1beta10 - January 26, 2011\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 15
|
||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||
@ -1859,14 +1859,14 @@ PNG_EXPORT(154, void, png_set_sBIT,
|
||||
|
||||
#ifdef PNG_sRGB_SUPPORTED
|
||||
PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structp png_ptr,
|
||||
png_const_infop info_ptr, int *intent));
|
||||
png_const_infop info_ptr, int *file_srgb_intent));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_sRGB_SUPPORTED
|
||||
PNG_EXPORT(156, void, png_set_sRGB,
|
||||
(png_structp png_ptr, png_infop info_ptr, int intent));
|
||||
(png_structp png_ptr, png_infop info_ptr, int srgb_intent));
|
||||
PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr,
|
||||
png_infop info_ptr, int intent));
|
||||
png_infop info_ptr, int srgb_intent));
|
||||
#endif
|
||||
|
||||
#ifdef PNG_iCCP_SUPPORTED
|
||||
|
8
pngset.c
8
pngset.c
@ -522,27 +522,27 @@ png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
|
||||
|
||||
#ifdef PNG_sRGB_SUPPORTED
|
||||
void PNGAPI
|
||||
png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
|
||||
png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int srgb_intent)
|
||||
{
|
||||
png_debug1(1, "in %s storage function", "sRGB");
|
||||
|
||||
if (png_ptr == NULL || info_ptr == NULL)
|
||||
return;
|
||||
|
||||
info_ptr->srgb_intent = (png_byte)intent;
|
||||
info_ptr->srgb_intent = (png_byte)srgb_intent;
|
||||
info_ptr->valid |= PNG_INFO_sRGB;
|
||||
}
|
||||
|
||||
void PNGAPI
|
||||
png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
|
||||
int intent)
|
||||
int srgb_intent)
|
||||
{
|
||||
png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM");
|
||||
|
||||
if (png_ptr == NULL || info_ptr == NULL)
|
||||
return;
|
||||
|
||||
png_set_sRGB(png_ptr, info_ptr, intent);
|
||||
png_set_sRGB(png_ptr, info_ptr, srgb_intent);
|
||||
|
||||
# ifdef PNG_gAMA_SUPPORTED
|
||||
png_set_gAMA_fixed(png_ptr, info_ptr, 45455L);
|
||||
|
Loading…
Reference in New Issue
Block a user