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.
This commit is contained in:
Mukund Sivaraman 2012-12-05 00:45:36 +05:30
parent 6d09237ca1
commit baf856e79d
1 changed files with 2 additions and 5 deletions

View File

@ -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
{