          logger.debug("Got size: (name: '%s', width: '%s', height: '%s')",
                       name, img.width(), img.height())
          return img.width(), img.height()
  
      def resize_image(self, name: str, frame_dims: Tuple[int, int]):
          """ Resize the training preview image based on the passed in frame size.
  
          If the canvas that holds the preview image changes, update the image size
          to fit the new canvas and refresh :attr:`previewtrain`.
  
 
</s> remove         frame_dims: tuple
            The (width (`int`), height (`int`)) of the display panel that will display the preview
 </s> add         frame_dims: tuple, optional
            The (width (`int`), height (`int`)) of the display panel that will display the preview.
            ``None`` if the frame dimensions are not known. </s> remove                 if not size:
                    return
 </s> add 
    def resize_image(self, name: str, frame_dims: Optional[Tuple[int, int]]) -> None:
          logger.debug("Got size: (name: '%s', width: '%s', height: '%s')",
                       name, img.width(), img.height())
          return img.width(), img.height()
  
    def resize_image(self, name: str, frame_dims: Optional[Tuple[int, int]]) -> None:
          """ Resize the training preview image based on the passed in frame size.
  
          If the canvas that holds the preview image changes, update the image size
          to fit the new canvas and refresh :attr:`previewtrain`.
  
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Display preview image in gui 
lib/gui/utils.py