Commit baf856e7 authored by Mukund Sivaraman's avatar Mukund Sivaraman

file-tga: Simplify has_alpha expression

Also fix variable name that changed from gimp-2-8 to master. This and
the last commit were cherry-picked from the gimp-2-8 branch.
parent 6d09237c
......@@ -927,12 +927,9 @@ read_line (FILE *fp,
}
else if (convert_cmap)
{
gboolean has_alpha = (info->colorMapSize > 24) ||
((info->colorMapSize == 16 ||
info->colorMapSize == 15) &&
(info->alphaBits > 0));
gboolean has_alpha = (info->alphaBits > 0);
apply_colormap (row, buffer, info->width, convert_cmap, has_alpha);
apply_colormap (row, buf, info->width, convert_cmap, has_alpha);
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment