2948 explained code solutions for 75 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
PIL

import Pillow package modules

Image.open

open given image with Pillow

.resize(

resizes given image to the specified size

(150, 150)

width and height to enlarge our image to

.show()

displays resulting image