提交 59a6c379 编写于 作者: J John Bowler 提交者: Glenn Randers-Pehrson

[devel] Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly.

This allows pngvalid to build when ALPHA_MODE is not supported, which is
required if it is to build on libpng 1.4.
上级 d2f0bc2d
......@@ -169,7 +169,12 @@ Version 1.5.3beta11 [June 11, 2011]
IDE autogenerates appropriate makefiles (libpng.mk) for batch processing.
The project is configurable, unlike the Visual Studio project, so long
as the developer has an awk.
Improved gamma range checks and other things OpenWatcom warns about.
Changed png_set_gAMA to limit the gamma value range so that the inverse
of the stored value cannot overflow the fixed point representation,
and changed other things OpenWatcom warns about.
Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows
pngvalid to build when ALPHA_MODE is not supported, which is required if
it is to build on libpng 1.4.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit
......
......@@ -3432,7 +3432,12 @@ Version 1.5.3beta11 [June 11, 2011]
IDE autogenerates appropriate makefiles (libpng.mk) for batch processing.
The project is configurable, unlike the Visual Studio project, so long
as the developer has an awk.
Improved gamma range checks and other things OpenWatcom warns about.
Changed png_set_gAMA to limit the gamma value range so that the inverse
of the stored value cannot overflow the fixed point representation,
and changed other things OpenWatcom warns about.
Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows
pngvalid to build when ALPHA_MODE is not supported, which is required if
it is to build on libpng 1.4.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -6401,7 +6401,9 @@ gamma_component_validate(PNG_CONST char *name, PNG_CONST validate_info *vi,
if (alpha < 0) /* The alpha channel */
{
#ifdef PNG_READ_ALPHA_MODE_SUPPORTED
if (do_background != ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN)
#endif
{
/* In all other cases the output alpha channel is linear already,
* don't log errors here, they are much larger in linear data.
......@@ -6411,6 +6413,7 @@ gamma_component_validate(PNG_CONST char *name, PNG_CONST validate_info *vi,
}
}
#ifdef PNG_READ_ALPHA_MODE_SUPPORTED
else /* A component */
{
if (do_background == ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED &&
......@@ -6420,6 +6423,7 @@ gamma_component_validate(PNG_CONST char *name, PNG_CONST validate_info *vi,
output_is_encoded = 0;
}
}
#endif
if (output_is_encoded)
output = pow(output, vi->screen_gamma);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册