mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(TgaFormat.ReadMetaData): additional sanity check for color-mapped images.
This commit is contained in:
parent
8f6d2963bb
commit
1c031ad24b
@ -142,15 +142,18 @@ namespace GameRes
|
||||
{
|
||||
default: return null;
|
||||
case 1: // Uncompressed, color-mapped images.
|
||||
case 2: // Uncompressed, RGB images.
|
||||
case 3: // Uncompressed, black and white images.
|
||||
case 9: // Runlength encoded color-mapped images.
|
||||
case 10: // Runlength encoded RGB images.
|
||||
case 11: // Compressed, black and white images.
|
||||
case 32: // Compressed color-mapped data, using Huffman, Delta, and
|
||||
// runlength encoding.
|
||||
case 33: // Compressed color-mapped data, using Huffman, Delta, and
|
||||
// runlength encoding. 4-pass quadtree-type process.
|
||||
if (colormap_depth != 24 && colormap_depth != 32)
|
||||
return null;
|
||||
break;
|
||||
case 2: // Uncompressed, RGB images.
|
||||
case 3: // Uncompressed, black and white images.
|
||||
case 10: // Runlength encoded RGB images.
|
||||
case 11: // Compressed, black and white images.
|
||||
break;
|
||||
}
|
||||
return new TgaMetaData {
|
||||
|
Loading…
x
Reference in New Issue
Block a user