2948 explained code solutions for 75 technologies


python-pillowHow to blur an image using Gaussian blur


from PIL import Image, ImageFilter

im = Image.open('/var/www/examples/heroine.png')
im = im.filter(ImageFilter.GaussianBlur(15))

im.show()ctrl + c
PIL

import Pillow package modules

Image.open

open given image with Pillow

/var/www/examples/heroine.png

path to sample image to open

.filter(

add specified filter to an image

ImageFilter.GaussianBlur

blur type we use

15

blur radius (strength of blur, the larger the more blurry image we get)

.show()

displays resulting image