readPalette method
Implementation
void readPalette(InputBuffer input) {
final numColors = totalColors == 0 ? 1 << bitsPerPixel : totalColors;
const numChannels = 3;
palette = PaletteUint8(numColors, numChannels);
for (var i = 0; i < numColors; ++i) {
final b = input.readByte();
final g = input.readByte();
final r = input.readByte();
final a = input.readByte(); // ignored
palette!.setRgba(i, r, g, b, a);
}
}