From f4e091047da95f7974a93c75b3c0948695891e80 Mon Sep 17 00:00:00 2001 From: Dmitry Karasik Date: Sat, 5 Oct 2024 17:40:53 +0200 Subject: [PATCH] report if png has alpha channel --- img/codec_png.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/img/codec_png.c b/img/codec_png.c index 42add802..cbe20e04 100644 --- a/img/codec_png.c +++ b/img/codec_png.c @@ -486,10 +486,11 @@ process_header( PImgLoadFileInstance fi, Bool use_subloader ) l->has_alpha = false; if ( l->icon) { if ( color_type & PNG_COLOR_MASK_ALPHA ) { + HV * profile = fi->frameProperties; + pset_i( hasAlpha, 1 ); l->has_alpha = true; i-> autoMasking = amNone; i-> self-> set_maskType((Handle) i, imbpp8 ); - pset_i( hasAlpha, 1 ); } else if ( l->m_alpha_size < 0) { i-> maskColor = l-> m_transparent_color; i-> autoMasking = amMaskColor;