read method
Implementation
void read(InputBuffer header) {
if (header.length < 18) {
return;
}
idLength = header.readByte(); // 0
colorMapType = header.readByte(); // 1
final it = header.readByte();
imageType = it < TgaImageType.values.length
? TgaImageType.values[it]
: TgaImageType.none; // 2
colorMapOrigin = header.readUint16(); // 3
colorMapLength = header.readUint16(); // 5
colorMapDepth = header.readByte(); // 7
offsetX = header.readUint16(); // 8
offsetY = header.readUint16(); // 10
width = header.readUint16(); // 12
height = header.readUint16(); // 14
pixelDepth = header.readByte(); // 16
flags = header.readByte(); // 17
screenOrigin = (flags & 0x30) >> 4;
}