+ 1
PIL
How we can resize an image without using functions in python3???
1 Answer
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')