Python 3 Pillow Script to Build Canva & Photoshop Advanced Image Editor App in Terminal
306 views
Jun 3, 2025
Get the full source code of application here:
View Video Transcript
0:00
uh hello guys uh welcome to this video
0:02
so in this video I'll show you a Python
0:04
script which will use a open-source
0:06
image processing library called as
0:08
pillow which will actually convert your
0:12
images into various filters you can
0:15
rotate your image you can blur your
0:17
image so this is actually the script
0:20
here we are taking this example of this
0:24
image so we will need to edit this image
0:27
so this Python script will create a
0:29
series of images uh so just wait let me
0:32
execute this Python script so see on the
0:35
left hand side it will create a series
0:37
of images with different filters so this
0:41
is actually the blur image it will blur
0:44
the
0:45
image then it will actually create a
0:48
pencil sketch of this image as you can
0:50
see
0:52
then it will enhance this image by
0:55
putting these on
0:58
edges so it has various filters right
1:01
here it's Photoshop or Canva
1:04
filter so you can do this right in the
1:06
terminal itself for completely free so
1:09
this is actually the package search for
1:12
this package which is pillow the command
1:15
is simple simply install this command by
1:17
executing this and uh I've already
1:20
installed it let me just show you let me
1:23
delete
1:26
everything so first of all you just need
1:29
to
1:30
import
1:32
this package
1:36
uh from pil we need to import this uh
1:41
image module and the image filter module
1:43
as
1:45
well after that here we just need to
1:47
load the input image so for loading this
1:50
we use the open method of this below
1:52
library and here we specify the input
1:55
image which is located in the images
1:58
directory and after that we will apply
2:01
various filters one by one so now to
2:03
rotate the image we
2:06
simply use the rotate function and here
2:10
we specify a angle so now we can save
2:12
this
2:17
image like this then if you want to blur
2:20
the image we can directly apply the
2:23
gshian blur there is a function right
2:26
here filter and then we can apply this
2:28
gshian blur and save this as a blurred
2:31
image same we have the another filter
2:34
right here which will be the contour
2:38
filter it will save this image then if
2:41
you want to enhance the image we have
2:43
another function right here another
2:45
filter which edge
2:48
enhance then if you want to emboss the
2:50
image we have another filter this is
2:54
image filter
2:56
emboss and then if you want to draw the
2:59
pencil sketch of the image then we have
3:01
another filter right here find edges so
3:04
these are a series of filters which
3:06
Photoshop on Canva has which you can
3:10
directly use in a Python script so if I
3:12
execute this now you will see it will
3:14
create these five
3:15
images so this simple level of image
3:19
editing you can perform using this
3:21
Python script so this payroll library is
3:24
great for editing your images directly
3:26
in the terminal like this so thank you
3:29
very much guys for watching this video
3:31
and also check out my website
3:33
freemediattools.com
3:34
uh which contains thousands of tools
#Clip Art & Animated GIFs
#Programming
#Scripting Languages