Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
I have a TGA file with a 32-bit palette (so 256 colours, but each colour is RGBA) which was hanging during loading (link below). It loads fine in GIMP so I'm fairly confident that the file itself is ok. http://rapidshare.com/#!download|616l34 ... stem.tga|1
I found a section of code in tga.c which looks wrong, namely in ReadTGAImage it does:
case 24:
case 32:
{
/*
8 bits each of blue, green and red.
*/
pixel.blue=ScaleCharToQuantum((unsigned char)
ReadBlobByte(image));
pixel.green=ScaleCharToQuantum((unsigned char)
ReadBlobByte(image));
pixel.red=ScaleCharToQuantum((unsigned char)
ReadBlobByte(image));
break;
}
In the 32-bit case it's only reading 3 chars when the image contains 4 chars per colour (I've checked this in a hex editor). I made a local change which splits off the 32 bit case and adds an extra line: