Thursday, October 2, 2025
HomeLanguagesPython PIL | GaussianBlur() method

Python PIL | GaussianBlur() method

PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageFilter module contains definitions for a pre-defined set of filters, which can be used with the Image.filter() method.

PIL.ImageFilter.GaussianBlur() method create Gaussian blur filter.

Syntax: PIL.ImageFilter.GaussianBlur(radius=5)

Parameters:
radius – blur radius. Changing value of radius the different intensity of GaussianBlur image were obtain.

Returns type: An image.

Image Used:




   
  
# Importing Image and ImageFilter module from PIL package 
from PIL import Image, ImageFilter 
  
# creating a image object 
im1 = Image.open(r"C:\Users\System-Pc\Desktop\leave.JPG"
  
# applying the Gaussian Blur filter 
im2 = im1.filter(ImageFilter.GaussianBlur(radius = 5))
  
im2.show() 


Output:

radius:radius value used here is 2.




Importing Image and ImageFilter module from PIL package 
from PIL import Image, ImageFilter 
  
# creating a image object 
im1 = Image.open(r"C:\Users\System-Pc\Desktop\leave.JPG"
  
# applying the Gaussian Blur filter 
im2 = im1.filter(ImageFilter.GaussianBlur(radius = 2))
  
im2.show() 


Output:

RELATED ARTICLES

Most Popular

Dominic
32330 POSTS0 COMMENTS
Milvus
85 POSTS0 COMMENTS
Nango Kala
6703 POSTS0 COMMENTS
Nicole Veronica
11867 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11926 POSTS0 COMMENTS
Shaida Kate Naidoo
6817 POSTS0 COMMENTS
Ted Musemwa
7078 POSTS0 COMMENTS
Thapelo Manthata
6775 POSTS0 COMMENTS
Umr Jansen
6774 POSTS0 COMMENTS