          The taskbar widget which holds the scaling variables
      image: :class:`_Image`
          The object which holds the source and display version of the preview image
      """
      def __init__(self, canvas: _PreviewCanvas, taskbar: _Taskbar, image: _Image) -> None:
          logger.debug("Initializing %s (canvas: '%s', taskbar: '%s', image: '%s')",
                       self.__class__.__name__, canvas, taskbar, image)
          self._canvas = canvas
          self._taskbar = taskbar
          self._image = image
 
</s> remove     def __init__(self, parent: tk.Frame, is_standalone: bool) -> None:
        logger.debug("Initializing %s (parent: '%s', is_standalone: %s)",
                     self.__class__.__name__, parent, is_standalone)
        super().__init__(parent)
 </s> add     def __init__(self, parent: tk.Frame, taskbar: Optional[ttk.Frame]) -> None:
        logger.debug("Initializing %s (parent: '%s', taskbar: %s)",
                     self.__class__.__name__, parent, taskbar)
        self._is_standalone = taskbar is None
        self._gui_mapped: List[tk.Widget] = []
        self._frame = tk.Frame(parent) if taskbar is None else taskbar
 </s> remove     is_standalone: bool
        ``True`` if preview is a pop-up window otherwise ``False``
 </s> add     taskbar: :class:`tkinter.ttk.Frame` or ``None``
        None if preview is a pop-up window otherwise ttk.Frame if taskbar is managed by the GUI </s> remove         Parameters
        ----------
        name: str
            The name of the training image to be resized
        frame_dims: tuple, optional
            The (width (`int`), height (`int`)) of the display panel that will display the preview.
            ``None`` if the frame dimensions are not known.
 </s> add         Should be called when terminating tasks, or when Faceswap starts up or shuts down. </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
    def __init__(self,
                 canvas: _PreviewCanvas,
                 taskbar: _Taskbar,
                 image: _Image,
                 is_standalone: bool) -> None:
          The taskbar widget which holds the scaling variables
      image: :class:`_Image`
          The object which holds the source and display version of the preview image
      """
    def __init__(self,
                 canvas: _PreviewCanvas,
                 taskbar: _Taskbar,
                 image: _Image,
                 is_standalone: bool) -> None:
          logger.debug("Initializing %s (canvas: '%s', taskbar: '%s', image: '%s')",
                       self.__class__.__name__, canvas, taskbar, image)
          self._canvas = canvas
          self._taskbar = taskbar
          self._image = image
keep keep keep keep replace keep keep keep keep keep
 GUI - Preview updates
  - Training preview. Embed preview pop-out window
  - Bugfix - convert/extract previews 
lib/training/preview_tk.py