      def _load_icons() -> Dict[str, ImageTk.PhotoImage]:
          """ Scan the icons cache folder and load the icons into :attr:`icons` for retrieval
          throughout the GUI.
  
          Returns
          -------
          dict:
              The icons formatted as described in :attr:`icons`
  
          """
          size = get_config().user_config_dict.get("icon_size", 16)
          size = int(round(size * get_config().scaling_factor))
          icons: Dict[str, ImageTk.PhotoImage] = {}
 
</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     @property
    def icons(self) -> Dict[str, ImageTk.PhotoImage]:
        """ dict: The faceswap icons for all parts of the GUI. The dictionary key is the icon
        name (`str`) the value is the icon sized and formatted for display
        (:class:`PIL.ImageTK.PhotoImage`).
 </s> add  </s> remove     def resize_image(self, name: str, frame_dims: Optional[Tuple[int, int]]) -> None:
        """ Resize the training preview image based on the passed in frame size.
 </s> add         """
        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> remove     def load_training_preview(self) -> None:
        """ Load the training preview images.
 </s> add  </s> remove class Images():
    """ The centralized image repository for holding all icons and images required by the GUI.
 </s> add def _get_previews(image_path: str) -> List[str]:
    """ Get the images stored within the given directory.

    Parameters
    ----------
    image_path: str
        The folder containing images to be scanned

    Returns
    -------
    list:
        The image filenames stored within the given folder
        self._batch_mode = False
        self._output_path = ""
      def _load_icons() -> Dict[str, ImageTk.PhotoImage]:
          """ Scan the icons cache folder and load the icons into :attr:`icons` for retrieval
          throughout the GUI.
  
        self._batch_mode = False
        self._output_path = ""
        self._batch_mode = False
        self._output_path = ""
        self._batch_mode = False
        self._output_path = ""
        self._batch_mode = False
        self._output_path = ""
  
          """
          size = get_config().user_config_dict.get("icon_size", 16)
          size = int(round(size * get_config().scaling_factor))
          icons: Dict[str, ImageTk.PhotoImage] = {}
keep keep keep keep replace replace replace replace keep keep keep keep keep
 GUI - Preview updates
  - Training preview. Embed preview pop-out window
  - Bugfix - convert/extract previews 
lib/gui/utils/image.py