From bc6a1177eeb8a76c57196e906418e30806c8b665 Mon Sep 17 00:00:00 2001 From: Abhilash Date: Thu, 29 May 2025 19:30:23 +0530 Subject: [PATCH] added a simple python script for converting JPG image into PNG --- JPG_to_PNG.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 JPG_to_PNG.py diff --git a/JPG_to_PNG.py b/JPG_to_PNG.py new file mode 100644 index 0000000..f803453 --- /dev/null +++ b/JPG_to_PNG.py @@ -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}") \ No newline at end of file