          frame_dims: tuple
              The (width (`int`), height (`int`)) of the display panel that will display the preview
          """
          logger.debug("Resizing image: (name: '%s', frame_dims: %s", name, frame_dims)
          displayimg = self._previewtrain[name][0]
          if frame_dims:
              frameratio = float(frame_dims[0]) / float(frame_dims[1])
              imgratio = float(displayimg.size[0]) / float(displayimg.size[1])
  
              if frameratio <= imgratio:
 
</s> remove         image_files = self._get_images(self._pathoutput)
 </s> add         assert self._pathoutput is not None
        image_path = self._get_newest_folder() if self._batch_mode else self._pathoutput
        image_files = self._get_images(image_path) </s> remove     def resize_image(self, name, frame_dims):
 </s> add     def resize_image(self, name: str, frame_dims: Tuple[int, int]): </s> remove     def _place_previews(self, frame_dims):
 </s> add     def _place_previews(self, frame_dims: Tuple[int, int]) -> Image.Image: </s> remove     def _load_images_to_cache(self, image_files, frame_dims, thumbnail_size):
 </s> add     def _load_images_to_cache(self,
                              image_files: List[str],
                              frame_dims: Tuple[int, int],
                              thumbnail_size: int) -> bool: </s> remove         if not self._previewtrain.get(name, None):
 </s> add         if not self._previewtrain.get(name):
        displayimg = cast(Image.Image, self._previewtrain[name][0])
          frame_dims: tuple
              The (width (`int`), height (`int`)) of the display panel that will display the preview
          """
          logger.debug("Resizing image: (name: '%s', frame_dims: %s", name, frame_dims)
        displayimg = cast(Image.Image, self._previewtrain[name][0])
          if frame_dims:
              frameratio = float(frame_dims[0]) / float(frame_dims[1])
              imgratio = float(displayimg.size[0]) / float(displayimg.size[1])
  
              if frameratio <= imgratio:
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py