// Only types 2 and 10 are supported
if (header->image_type!=2 && header->image_type!=10) {
printf("TGA_decode() failed: unsupported tga compression type.\n");
return 0;
}
// Only 24bit or 32bit pixels are supported
if (header->colormap_type!=0||
(header->pixel_size!=32&&header->pixel_size!=24)) {
printf("TGA_decode() failed: only 24bit and 32bits image are supported\n");
return 0;
}