                               for row in range(rows)])
          logger.debug("display shape: %s", display.shape)
          return Image.fromarray(display)
  
      def load_training_preview(self):
          """ Load the training preview images """
          logger.debug("Loading Training preview images")
          imagefiles = self.get_images(self.pathpreview)
          modified = None
 
</s> remove         logger.trace("Loading Training preview images")
 </s> add         logger.debug("Loading Training preview images") </s> remove         logger.trace("display shape: %s", display.shape)
 </s> add         logger.debug("display shape: %s", display.shape) </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)) </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("Loading preview image: (thumbnail_size: %s, frame_dims: %s)",
 </s> add         logger.debug("Loading preview image: (thumbnail_size: %s, frame_dims: %s)",
    def create_placeholder(self, thumbnail_size):
        """ Create a placeholder image for when there are fewer samples available
            then columns to display them """
        logger.debug("Creating placeholder. thumbnail_size: %s", thumbnail_size)
        placeholder = Image.new("RGB", (thumbnail_size, thumbnail_size))
        draw = ImageDraw.Draw(placeholder)
        draw.rectangle(((0, 0), (thumbnail_size, thumbnail_size)), outline="#E5E5E5", width=1)
        placeholder = np.array(placeholder)
        self.previewcache["placeholder"] = placeholder
        logger.debug("Created placeholder. shape: %s", placeholder.shape)

                               for row in range(rows)])
          logger.debug("display shape: %s", display.shape)
          return Image.fromarray(display)
  
    def create_placeholder(self, thumbnail_size):
        """ Create a placeholder image for when there are fewer samples available
            then columns to display them """
        logger.debug("Creating placeholder. thumbnail_size: %s", thumbnail_size)
        placeholder = Image.new("RGB", (thumbnail_size, thumbnail_size))
        draw = ImageDraw.Draw(placeholder)
        draw.rectangle(((0, 0), (thumbnail_size, thumbnail_size)), outline="#E5E5E5", width=1)
        placeholder = np.array(placeholder)
        self.previewcache["placeholder"] = placeholder
        logger.debug("Created placeholder. shape: %s", placeholder.shape)

      def load_training_preview(self):
          """ Load the training preview images """
          logger.debug("Loading Training preview images")
          imagefiles = self.get_images(self.pathpreview)
          modified = None
keep keep keep add 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