code: function reset() {
  
      // reset for subsequent use
      transIndex = 0;
      image = null;
      pixels = null;
      indexedPixels = null;
      colorTab = null;
      closeStream = false;
      firstFrame = true;
    }
docs: Resets some members so that a new stream can be started.
  This method is actually called by the start method