Beispiel #1
0
def get_image_w_h(image):
    """
    imageのwidth・heightを取得しdictで返す
    :return: {'width': 100, 'height': 200}
    """
    pil_image = Image.open(image.picture.path)
    return pil_image.size