[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.
This commit is contained in:
parent
d2f0bc2d13
commit
59a6c379dd
7
ANNOUNCE
7
ANNOUNCE
@ -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
|
||||
|
7
CHANGES
7
CHANGES
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user