This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
def add_whitespaces(image, max_size): | |
""" | |
Adds white spaces until the image reaches the desired max_size. | |
Forked from: https://gist.github.com/fabeat/6621507 | |
:param image: Image | |
:param max_size: [ W , H ] | |
:return: Image |