Python 3 Script to Add a Text Watermark to Image File Using Pillow Library Full Project For Beginners

You are currently viewing Python 3 Script to Add a Text Watermark to Image File Using Pillow Library Full Project For Beginners

 

 

Welcome folks today in this blog post we will be adding a text watermark to image in python using pillow library. All the full source code of the application is given below.

 

 

 

Get Started

 

 

 

In order to get started you need to install pillow library inside your python project by executing the pip command which is shown below

 

pip install pillow

 

After installing this library just create an app.py file and copy paste the following code

 

app.py

 

 

 

 

Here in this block of code we are importing the library pillow and then loading the input image path so here you need to replace the path of the image and also the watermark text respectively. After this you just need to run the python application by running the below command

 

python app.py

 

 

 

 

As you can see the image has the watermark text attached to it at the bottom right position of the image.

 

Leave a Reply