Python 3 Script to Convert JPG to PNG Image Using Pillow Imaging Library Full Project For Beginners

 

Installation

 

 

In order to proceed you must have python installed on your machine and then you must install pillow library on your system like this

 

 

pip install pillow

 

 

After installing pillow you create a app.py file and copy paste the following code

 

 

app.py

 

 

from PIL import Image

image = image.open("input.jpg")

image.save("output.png")

 

 

 

Here we have used the open method to first of all open the image and then we have used the save method to convert the image from jpg to png. You can also do the reverse process as well.

 

Now for running this python script you just need to run the following command

 

python app.py

 

READ  Python 3 Geopy Library Tkinter GUI Geolocation Script to Print Full Address with Country,State and Pincode From City Name Full Project For Beginners

 

Leave a Reply