              name = os.path.basename(img)
              name = os.path.splitext(name)[0]
              name = name[name.rfind("_") + 1:].title()
              try:
                  logger.trace("Displaying preview: '%s'", img)
                  size = self.get_current_size(name)
                  self.previewtrain[name] = [Image.open(img), None, modified]
                  self.resize_image(name, size)
                  self.errcount = 0
              except ValueError:
 
</s> remove         logger.trace("Getting size: '%s'", name)
 </s> add         logger.debug("Getting size: '%s'", name) </s> remove         filenames, samples = self.get_preview_samples(imagefiles, num_images, thumbnail_size)
        show_image = self.place_previews(samples, frame_dims)
        logger.trace("Displaying preview: '%s'", filenames)
 </s> add         self.load_images_to_cache(imagefiles, frame_dims, thumbnail_size)
        if imagefiles == [gui_preview]:
            # Delete the preview image so that the main scripts know to output another
            logger.debug("Deleting preview image")
            os.remove(imagefiles[0])
        show_image = self.place_previews(frame_dims)
        logger.debug("Displaying preview: '%s'", self.previewcache["filenames"]) </s> remove             logger.trace("Scaling: (scale: %s, size: %s", scale, size)
 </s> add             logger.debug("Scaling: (scale: %s, size: %s", scale, size) </s> remove         logger.trace("Image Files: %s", len(imagefiles))
        num_images = (frame_dims[0] // thumbnail_size) * (frame_dims[1] // thumbnail_size)
        if num_images > len(imagefiles):
            logger.debug("Not enough images to generate display. (to display: %s, available "
                         "images: %s)", num_images, len(imagefiles))
            self.previewoutput = None
 </s> add         # Filter to just the gui_preview if it exists in folder output
        imagefiles = [gui_preview] if gui_preview in imagefiles else imagefiles
        logger.debug("Image Files: %s", len(imagefiles))

        imagefiles = self.get_newest_filenames(imagefiles)
        if not imagefiles:
                logger.debug("Displaying preview: '%s'", img)
              name = os.path.basename(img)
              name = os.path.splitext(name)[0]
              name = name[name.rfind("_") + 1:].title()
              try:
                logger.debug("Displaying preview: '%s'", img)
                  size = self.get_current_size(name)
                  self.previewtrain[name] = [Image.open(img), None, modified]
                  self.resize_image(name, size)
                  self.errcount = 0
              except ValueError:
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