File size: 198 Bytes
768009c
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from PIL import Image

class ImageAgent:

    def resize(self, path, output):
        image = Image.open(path)
        image.thumbnail((1024, 1024))
        image.save(output)

        return output