+ 1
PIL
How we can resize an image without using functions in python3???
1 ответ
0
basewidth = 300 #width, subject to change
img = Image.open(‘fullsized_image.jpg')
wpercent = (basewidth / float(img.size[0]))
hsize = int((float(img.size[1]) * float(wpercent)))
img = img.resize((basewidth, hsize), PIL.Image.ANTIALIAS)
img.save(‘resized_image.jpg')