Progress bar + thumbnail generator

This commit is contained in:
simon
2018-03-20 09:01:43 -04:00
parent 9d75fc4d59
commit 047d2653bc
11 changed files with 151 additions and 25 deletions

14
thumbnail.py Normal file
View File

@@ -0,0 +1,14 @@
from PIL import Image
class ThumbnailGenerator:
def __init__(self, size):
self.size = (size, size)
def generate(self, path, dest_path):
image = Image.open(path)
image.thumbnail(self.size, Image.BICUBIC)
image.save(dest_path)
image.close()