rem: uint8 nalpha; if (imagespec.depth == 32)      nalpha = 8; else nalpha = imagespec.descriptor & TGA_DESC_ALPHABITS;
add: if (settings.SetGetIgnoreAlpha()) return 0; else { uint8 nalpha; if (filehead.imagetype == TGA_NOCOMP_COLORMAP || filehead.imagetype == TGA_RLE_COLORMAP) {   if (mapspec.entrysize == 32) nalpha = 8; else if (mapspec.entrysize == 16) nalpha = 1; else nalpha = 0;  } else {   if (imagespec.depth == 32)      nalpha = 8; else nalpha = imagespec.descriptor & TGA_DESC_ALPHABITS; }
context: tga_alphabits(TGAImageSpec &imagespec){	uint8 nalpha;	if (imagespec.depth == 32)		// Some programs that generate 32-bit TGA files 		// have an alpha channel, but have an incorrect		// descriptor which says there are no alpha bits.		// This logic is so that the alpha data can be		// obtained from TGA files that lie.		nalpha = 8;	else		nalpha = imagespec.descriptor & TGA_DESC_ALPHABITS;			return nalpha;}