Resize an existing Image
from PIL import Image
in_file = 'in.png'
out_file = 'new.png'
img = Image.open(in_file)
size = (img.size[0] / 2, img.size[1] / 2)
img.thumbnail(size)
img.save(out_file)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
from PIL import Image
in_file = 'in.png'
out_file = 'new.png'
img = Image.open(in_file)
size = (img.size[0] / 2, img.size[1] / 2)
img.thumbnail(size)
img.save(out_file)