startDecode method
Start decoding the data as an animation sequence, but don't actually process the frames until they are requested with decodeFrame.
Implementation
@override
DecodeInfo? startDecode(Uint8List bytes) {
info = TgaInfo();
input = InputBuffer(bytes);
final header = input.readBytes(18);
info!.read(header);
if (!info!.isValid()) {
return null;
}
input.skip(info!.idLength);
// Decode colormap
if (info!.hasColorMap) {
final size = info!.colorMapLength * (info!.colorMapDepth >> 3);
info!.colorMap = input.readBytes(size).toUint8List();
}
info!.imageOffset = input.offset;
return info;
}