          """
          logger.debug("Getting images: '%s'", image_path)
          if not os.path.isdir(image_path):
              logger.debug("Folder does not exist")
              return None
          files = [os.path.join(image_path, f)
                   for f in os.listdir(image_path) if f.lower().endswith((".png", ".jpg"))]
          logger.debug("Image files: %s", files)
          return files
  
 
</s> remove     def load_latest_preview(self, thumbnail_size, frame_dims):
 </s> add     def load_latest_preview(self, thumbnail_size: int, frame_dims: Tuple[int, int]) -> None: </s> remove         img = self._previewtrain[name][1]
 </s> add         img = cast(Image.Image, self._previewtrain[name][1]) </s> remove         if not self._previewtrain.get(name, None):
 </s> add         if not self._previewtrain.get(name): </s> remove         if dropped_files:
            logger.debug("Removing dropped files: %s", dropped_files)
            show_files = [fname for fname in show_files if fname not in dropped_files]

        self._previewcache["filenames"] = (self._previewcache["filenames"] +
                                           show_files)[-num_images:]
        cache = self._previewcache["images"]
 </s> add         self._previewcache["filenames"] = (cast(List[str], self._previewcache["filenames"]) +
                                           filenames)[-num_images:]
        cache = cast(Optional[np.ndarray], self._previewcache["images"]) </s> remove             self._previewcache["modified"] = max([os.path.getmtime(img) for img in retval])
 </s> add             self._previewcache["modified"] = max(os.path.getmtime(img) for img in retval)
            return []
          """
          logger.debug("Getting images: '%s'", image_path)
          if not os.path.isdir(image_path):
              logger.debug("Folder does not exist")
            return []
          files = [os.path.join(image_path, f)
                   for f in os.listdir(image_path) if f.lower().endswith((".png", ".jpg"))]
          logger.debug("Image files: %s", files)
          return files
  
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py