code: def resize(self, image, size):
          
          (width, height, force) = size
  
          if image.size[0] > width or image.size[1] > height:
              if force:
                  return ImageOps.fit(self.image, (width, height), Image.ANTIALIAS)
              else:
                  thumb = self.image.copy()
                  thumb.thumbnail((width, height), Image.ANTIALIAS)
                  return thumb
  
          return image
docs: Resizes the image
  
              :param image: The image object
              :param size: size is PIL tuple (width, heigth, force) ex: (200,100,True)