提交 8596468e 编写于 作者: G Glenn Randers-Pehrson

[libpng15] Removed PNG_CONST from the sRGB table declarations

in pngpriv.h and png.c
上级 c32de8c6
Libpng 1.5.7beta03 - November 12, 2011
Libpng 1.5.7beta03 - November 16, 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.
......@@ -65,7 +65,8 @@ Version 1.5.7beta02 [November 11, 2011]
convert to an off-by-one 8-bit value. The "makesRGB.c" code that was used
to generate the tables is now in a contrib/sRGBtables sub-directory.
Version 1.5.7beta03 [November 12, 2011]
Version 1.5.7beta03 [November 16, 2011]
Removed PNG_CONST from the sRGB table declarations in pngpriv.h and png.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit
......
......@@ -3710,7 +3710,8 @@ Version 1.5.7beta02 [November 11, 2011]
convert to an off-by-one 8-bit value. The "makesRGB.c" code that was used
to generate the tables is now in a contrib/sRGBtables sub-directory.
Version 1.5.7beta03 [November 12, 2011]
Version 1.5.7beta03 [November 16, 2011]
Removed PNG_CONST from the sRGB table declarations in pngpriv.h and png.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -645,13 +645,13 @@ png_get_copyright(png_const_structp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.5.7beta03 - November 12, 2011" PNG_STRING_NEWLINE \
"libpng version 1.5.7beta03 - November 16, 2011" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2011 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.7beta03 - November 12, 2011\
return "libpng version 1.5.7beta03 - November 16, 2011\
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
......@@ -2876,7 +2876,7 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth)
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
/* The convert-to-sRGB table is only currently required for read. */
PNG_CONST png_uint_16 png_sRGB_table[256] =
png_uint_16 png_sRGB_table[256] =
{
0,20,40,60,80,99,119,139,
159,179,199,219,241,264,288,313,
......@@ -2917,7 +2917,7 @@ PNG_CONST png_uint_16 png_sRGB_table[256] =
/* The base/delta tables are required for both read and write (but currently
* only the simplified versions.)
*/
PNG_CONST png_uint_16 png_sRGB_base[512] =
png_uint_16 png_sRGB_base[512] =
{
128,1782,3383,4644,5675,6564,7357,8074,
8732,9346,9921,10463,10977,11466,11935,12384,
......@@ -2985,7 +2985,7 @@ PNG_CONST png_uint_16 png_sRGB_base[512] =
65070,65126,65183,65239,65296,65352,65409,65465
};
PNG_CONST png_byte png_sRGB_delta[512] =
png_byte png_sRGB_delta[512] =
{
207,201,158,129,113,100,90,82,77,72,68,64,61,59,56,54,
52,50,49,47,46,45,43,42,41,40,39,39,38,37,36,36,
......
......@@ -516,24 +516,24 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
abs((int)((c1).blue) - (int)((c2).blue)))
/* Added to libpng-1.5.7: sRGB conversion tables */
#if defined PNG_SIMPLIFIED_READ_SUPPORTED ||\
defined PNG_SIMPLIFIED_WRITE_SUPPORTED
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
PNG_EXTERN /*PRIVATE*/ PNG_CONST png_uint_16 png_sRGB_table[256];
PNG_EXTERN /*PRIVATE*/ png_uint_16 png_sRGB_table[256];
/* Convert from an sRGB encoded value 0..255 to a 16-bit linear value,
* 0..65535. This table gives the closes 16-bit answers (no errors).
*/
#endif
#if defined PNG_SIMPLIFIED_READ_SUPPORTED ||\
defined PNG_SIMPLIFIED_WRITE_SUPPORTED
PNG_EXTERN /*PRIVATE*/ PNG_CONST png_uint_16 png_sRGB_base[512];
PNG_EXTERN /*PRIVATE*/ PNG_CONST png_byte png_sRGB_delta[512];
PNG_EXTERN /*PRIVATE*/ png_uint_16 png_sRGB_base[512];
PNG_EXTERN /*PRIVATE*/ png_byte png_sRGB_delta[512];
#define PNG_sRGB_FROM_LINEAR(linear) ((png_sRGB_base[(linear)>>15] +\
((((linear)&0x7fff)*png_sRGB_delta[(linear)>>15])>>12)) >> 8)
/* Given a value 'linear' in the range 0..255*65535 calculate the 8-bit sRGB
* encoded value with maximum error 0.646365. Note that the input is not a
* 16-bit value; it has been multiplied by 255! */
#endif
#endif /* PNG_SIMPLIFIED_READ/WRITE */
/* Added to libpng-1.2.6 JB */
#define PNG_ROWBYTES(pixel_bits, width) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册