Bill Skaggs <weskaggs@primate.ucdavis.edu>

* plug-ins/common/tga.c: gracefully handle incorrect alpha
	info in header; fixes bug #306675.
This commit is contained in:
William Skaggs 2006-05-19 16:10:07 +00:00
parent 42ff7f4920
commit 34e144e1eb
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-05-19 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/common/tga.c: gracefully handle incorrect alpha
info in header; fixes bug #306675.
2006-05-19 Michael Natterer <mitch@gimp.org>
* app/core/gimpitem-linked.h: remove enum GimpItemLinkedMask...

View File

@ -505,6 +505,10 @@ load_image (const gchar *filename)
info.flipHoriz = (header[17] & 0x10) ? 1 : 0;
info.flipVert = (header[17] & 0x20) ? 0 : 1;
/* hack to handle some existing files with incorrect headers, see bug #306675 */
if (info.alphaBits == info.bpp)
info.alphaBits = 0;
switch (info.imageType)
{
case TGA_TYPE_MAPPED: