  
      def resize_image(self, name, framesize):
          """ Resize the training preview image
              based on the passed in frame size """
          logger.trace("Resizing image: (name: '%s', framesize: %s", name, framesize)
          displayimg = self.previewtrain[name][0]
          if framesize:
              frameratio = float(framesize[0]) / float(framesize[1])
              imgratio = float(displayimg.size[0]) / float(displayimg.size[1])
  
 
</s> remove         logger.trace("Got size: (name: '%s', width: '%s', height: '%s')",
 </s> add         logger.debug("Got size: (name: '%s', width: '%s', height: '%s')", </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("Loading Training preview images")
 </s> add         logger.debug("Loading Training preview images") </s> remove         logger.trace("Getting size: '%s'", name)
 </s> add         logger.debug("Getting size: '%s'", name) </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)",
        logger.debug("Resizing image: (name: '%s', framesize: %s", name, framesize)
  
      def resize_image(self, name, framesize):
          """ Resize the training preview image
              based on the passed in frame size """
        logger.debug("Resizing image: (name: '%s', framesize: %s", name, framesize)
          displayimg = self.previewtrain[name][0]
          if framesize:
              frameratio = float(framesize[0]) / float(framesize[1])
              imgratio = float(displayimg.size[0]) / float(displayimg.size[1])
  
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