  
          assert isinstance(self._root, tk.Tk)
          self._root.update_idletasks()
          self._root.attributes("-fullscreen", True)
          self._root.state("iconic")
          retval = self._root.winfo_width(), self._root.winfo_height()
          self._root.attributes("-fullscreen", False)
 
</s> remove         # TODO skip when loading in GUI?
        logger.debug("Obtaining screen geometry")
 </s> add         if not self._is_standalone:
            root = self._root.winfo_toplevel()  # Get dims of whole GUI
            retval = root.winfo_width(), root.winfo_height()
            logger.debug("Obtained frame geometry: %s", retval)
            return retval
 </s> remove         assert self._pathoutput is not None
        folders = [] if not os.path.exists(self._pathoutput) else [
            os.path.join(self._pathoutput, folder)
            for folder in os.listdir(self._pathoutput)
            if os.path.isdir(os.path.join(self._pathoutput, folder))]
 </s> add         folders = [] if not os.path.exists(self._output_path) else [
            os.path.join(self._output_path, folder)
            for folder in os.listdir(self._output_path)
            if os.path.isdir(os.path.join(self._output_path, folder))] </s> remove         size = get_config().user_config_dict.get("icon_size", 16)
        size = int(round(size * get_config().scaling_factor))
        icons: Dict[str, ImageTk.PhotoImage] = {}
        pathicons = os.path.join(PATHCACHE, "icons")
        for fname in os.listdir(pathicons):
            name, ext = os.path.splitext(fname)
            if ext != ".png":
                continue
            img = Image.open(os.path.join(pathicons, fname))
            img = ImageTk.PhotoImage(img.resize((size, size), resample=Image.HAMMING))
            icons[name] = img
        logger.debug(icons)
        return icons
 </s> add         logger.debug("Saving preview to %s", filename)
        assert self._preview_image is not None
        self._preview_image.save(filename) </s> remove                          len(retval), self._previewcache["modified"])
 </s> add                          len(retval), self._modified) </s> remove             placeholder = np.concatenate([np.expand_dims(
                cast(np.ndarray, self._previewcache["placeholder"]), 0)] * remainder)
 </s> add             assert self._placeholder is not None
            placeholder = np.concatenate([np.expand_dims(self._placeholder, 0)] * remainder)
        logger.debug("Obtaining screen geometry")
  
          assert isinstance(self._root, tk.Tk)
        logger.debug("Obtaining screen geometry")
          self._root.update_idletasks()
          self._root.attributes("-fullscreen", True)
          self._root.state("iconic")
          retval = self._root.winfo_width(), self._root.winfo_height()
          self._root.attributes("-fullscreen", False)
keep add keep keep keep keep keep
 GUI - Preview updates
  - Training preview. Embed preview pop-out window
  - Bugfix - convert/extract previews 
lib/training/preview_tk.py