resize photo in oython code example
Example 1: python resize image
from PIL import Image
image = Image.open("path/.../image.png")
image = image.resize((500,500),Image.ANTIALIAS)
image.save(fp="newimage.png")
Example 2: pyhton image resize
from PIL import Image
from resizeimage import resizeimage
fd_img = open('test-image.jpeg', 'r')
img = Image.open(fd_img)
img = resizeimage.resize_cover(img, [200, 100])
img.save('test-image-cover.jpeg', img.format)
fd_img.close()