Skip to content

WebNinjaDeveloper.com

Programming Tutorials




Menu
  • Home
  • Youtube Channel
  • Official Blog
  • Nearby Places Finder
  • Direction Route Finder
  • Distance & Time Calculator
Menu

Python 3 Script to Add Blur Effect to an Image File Using Pillow Library Full Project For Beginners

Posted on February 12, 2023

 

 

Welcome folks today in this blog post we will be adding the blur effect to the input image file using pillow library in python. All the full source code of the application is shown below.

 

 

Get Started

 

 

In order to get started you need to make an app.py file and copy paste the following code

 

 

app.py

 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
#Import required Image library
from PIL import Image, ImageFilter
 
#Open existing image
OriImage = Image.open('images/boy.jpg')
OriImage.show()
 
#Applying GaussianBlur filter
gaussImage = OriImage.filter(ImageFilter.GaussianBlur(5))
gaussImage.show()
 
#Save Gaussian Blur Image
gaussImage.save('images/gaussian_blur.jpg')

 

 

As you can see we are importing the pillow library and then we are applying the gaussian blur to the input image and then we are saving the output image file.

 

Recent Posts

  • Android Java Project to Store,Read & Delete Data Using SharedPreferences Example
  • Android Java Project to Download Multiple Images From URL With Progressbar & Save it inside Gallery
  • Android Java Project to Capture Image From Camera & Save it inside Gallery
  • Android Java Project to Crop,Scale & Rotate Images Selected From Gallery and Save it inside SD Card
  • Android Kotlin Project to Load Image From URL into ImageView Widget
  • Angular
  • Bunjs
  • C#
  • Deno
  • django
  • Electronjs
  • java
  • javascript
  • Koajs
  • kotlin
  • Laravel
  • meteorjs
  • Nestjs
  • Nextjs
  • Nodejs
  • PHP
  • Python
  • React
  • ReactNative
  • Svelte
  • Tutorials
  • Vuejs




©2023 WebNinjaDeveloper.com | Design: Newspaperly WordPress Theme