You can convert JPG to PNG in Python using the PIL library. If you want to learn about computer vision, I strongly advise you to read This book.
Install the Pillow library.
pip install Pillow
Convert JPG to PNG in Python
# Import the required module from PIL import Image # Load the JPG image img = Image.open("baby.jpg") # Convert into RGBA img = img.convert("RGBA") # Save the baby image as a PNG img.save("baby.png")