Open In App
Related Articles

Python PIL | GaussianBlur() method

Improve Article
Improve
Save Article
Save
Like Article
Like

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:


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 14 Jul, 2019
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials