              draw = ImageDraw.Draw(img)
              draw.rectangle(((0, 0), (thumbnail_size, thumbnail_size)), outline="#E5E5E5", width=1)
              samples.append(np.array(img))
          samples = np.array(samples)
          logger.trace("Samples shape: %s", samples.shape)
          return show_files, samples
  
      @staticmethod
      def place_previews(samples, frame_dims):
          """ Stack the preview images to fit display """
 
</s> remove     @staticmethod
    def place_previews(samples, frame_dims):
 </s> add     def place_previews(self, frame_dims): </s> remove         logger.trace("num_images: %s, thumbnail_size: %s", num_images, thumbnail_size)
 </s> add         if self.previewcache["placeholder"] is None:
            self.create_placeholder(thumbnail_size)

        logger.debug("num_images: %s, thumbnail_size: %s", num_images, thumbnail_size) </s> remove         logger.trace("cols: %s, rows: %s", cols, rows)
 </s> add         logger.debug("cols: %s, rows: %s", cols, rows)
        remainder = (cols * rows) % num_images
        if remainder != 0:
            logger.debug("Padding final row. Remainder: %s", remainder)
            placeholder = np.concatenate([np.expand_dims(self.previewcache["placeholder"],
                                                         0)] * remainder)
            samples = np.concatenate((samples, placeholder))
        logger.debug("Samples shape: %s", samples.shape)
              draw = ImageDraw.Draw(img)
              draw.rectangle(((0, 0), (thumbnail_size, thumbnail_size)), outline="#E5E5E5", width=1)
              samples.append(np.array(img))
          samples = np.array(samples)
        logger.debug("Samples shape: %s", samples.shape)
          return show_files, samples
  
      @staticmethod
      def place_previews(samples, frame_dims):
          """ Stack the preview images to fit display """
keep keep keep keep replace keep keep keep keep keep
 GUI: Preview for convert

Display preview when outputting to a stream container (e.g. video, gif) 
lib/gui/utils.py