[vlc-devel] [PATCH] PNG: Sligtly modified how the color correction is applied (it fixes semi-transparent pixels)
Diogo Silva
dbtdsilva at gmail.com
Sat Apr 15 17:32:16 CEST 2017
Improved color correction by replacing PNG_ALPHA_STANDARD with
PNG_ALPHA_OPTIMIZED and PNG_GAMMA_LINEAR with PNG_DEFAULT_sRGB (was marked
for academic environments).
---
modules/codec/png.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/png.c b/modules/codec/png.c
index 75f3ad440b..da97909bad 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -262,7 +262,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
i_color_type == PNG_COLOR_TYPE_GRAY_ALPHA )
png_set_gray_to_rgb( p_png );
if( i_color_type & PNG_COLOR_MASK_ALPHA )
- png_set_alpha_mode( p_png, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR );
+ png_set_alpha_mode( p_png, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB );
/* Strip to 8 bits per channel */
if( i_bit_depth == 16 ) png_set_strip_16( p_png );
--
2.12.2
More information about the vlc-devel
mailing list