If you haven’t already done so, install the PIL package using the command below: pip install Pillow Steps to Convert JPG to PNG using Python Step 1: Install the PIL Package Next, you’ll see the full steps to apply the above syntax in practice. Im1.save(r'path where the PNG will be stored\new file name.png') Im1 = Image.open(r'path where the JPG is stored\file name.jpg') The following syntax can be used to convert JPG to PNG using Python: from PIL import Image