#176 TGA with alpha

closed-fixed
5
2011-12-29
2011-12-29
ismfismf
No

There is an issue with TGA images that have not attributes set, but the color depth is 32. The TGA module returns matte=false in this case where it should return true.

I suggest changing the following line in tga.c:
image->matte=(alpha_bits > 0);
to
image->matte=(alpha_bits > 0) || (tga_info.bits_per_pixel == 32);

Discussion

    • status: open --> open-fixed
     
  • Fixed in Mercurial changeset 67e4b5a531ef. It is quite possible that TGA files exist in which the fourth channel is useless random content or not an alpha channel so there is some small risk to to this change.

     
    • status: open-fixed --> closed-fixed