From 0b9391e59acbdffb22fbb8ff419818ff7c44bff4 Mon Sep 17 00:00:00 2001 From: morkt Date: Wed, 9 Dec 2015 17:59:22 +0400 Subject: [PATCH] (TgaStream): interpret 8bpp images as grayscaled. --- ArcFormats/ArcCommon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArcFormats/ArcCommon.cs b/ArcFormats/ArcCommon.cs index 5e82ecb4..02abd76b 100644 --- a/ArcFormats/ArcCommon.cs +++ b/ArcFormats/ArcCommon.cs @@ -416,7 +416,7 @@ namespace GameRes.Formats public static Stream Create (ImageMetaData info, byte[] pixels, bool flipped = false) { var header = new byte[0x12]; - header[2] = 2; + header[2] = (byte)(info.BPP > 8 ? 2 : 3); LittleEndian.Pack ((short)info.OffsetX, header, 8); LittleEndian.Pack ((short)info.OffsetY, header, 0xa); LittleEndian.Pack ((ushort)info.Width, header, 0xc);