mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
(TgaStream): interpret 8bpp images as grayscaled.
This commit is contained in:
parent
1c457e1249
commit
0b9391e59a
@ -416,7 +416,7 @@ namespace GameRes.Formats
|
|||||||
public static Stream Create (ImageMetaData info, byte[] pixels, bool flipped = false)
|
public static Stream Create (ImageMetaData info, byte[] pixels, bool flipped = false)
|
||||||
{
|
{
|
||||||
var header = new byte[0x12];
|
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.OffsetX, header, 8);
|
||||||
LittleEndian.Pack ((short)info.OffsetY, header, 0xa);
|
LittleEndian.Pack ((short)info.OffsetY, header, 0xa);
|
||||||
LittleEndian.Pack ((ushort)info.Width, header, 0xc);
|
LittleEndian.Pack ((ushort)info.Width, header, 0xc);
|
||||||
|
Loading…
Reference in New Issue
Block a user