

@staticmethod
def resize(imgpath, savefile, maxsize, quality=100):
    img = Image.open(imgpath)
    img.thumbnail((maxsize, maxsize), Image.ANTIALIAS)
    img.save(savefile, quality=quality)
    return File(savefile)

dataset/ETHPy150Open niwinz/niwi-web/src/niwi/photo/image.py ImageAdapter.resize/original