9951 explained code solutions for 126 technologies

python-pillowHow to enlarge (scale up) an image

from PIL import Image

im = Image.open('/var/www/examples/small.png')
im = im.resize((150, 150))

im.show()ctrl + c

import Pillow package modules


open given image with Pillow


resizes given image to the specified size

(150, 150)

width and height to enlarge our image to


displays resulting image