Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions JPG_to_PNG.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from PIL import Image

# open JPG image

try :

image = Image.open(r"C:\Users\ABHILASH\OneDrive\Desktop\iron man_jpg.jpeg") # Repalce path with our own image path

# You can also provide an absolute path if you want to save it elsewhere
image.save("iron man.png") # image is saved in the same dir

except Exception as e :

print(f" Error occurred: {e}")