Skip to content

Instantly share code, notes, and snippets.

View gchiappe's full-sized avatar
💭
I may be slow to respond.

Giancarlo A. Chiappe gchiappe

💭
I may be slow to respond.
View GitHub Profile
@gchiappe
gchiappe / scale.py
Last active July 11, 2016 15:01 — forked from fabeat/scale.py
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