finish method

List<int>? finish()

Encode the images that were added with addFrame.

Implementation

List<int>? finish() {
  List<int>? bytes;
  if (output == null) {
    return bytes;
  }

  /*if (_encodedFrames == 0) {
    _writeHeader(_width, _height);
  } else {
    _writeGraphicsCtrlExt();
  }

  _addImage(_lastImage, _width, _height, _lastColorMap.colorMap, 256);

  output.writeByte(TERMINATE_RECORD_TYPE);

  _lastImage = null;
  _encodedFrames = 0;*/

  bytes = output!.getBytes();
  output = null;

  return bytes;
}