Skip to content

Commit

Permalink
report if png has alpha channel
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Oct 5, 2024
1 parent 83f51b8 commit f4e0910
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion img/codec_png.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f4e0910

Please sign in to comment.