9951 explained code solutions for 126 technologies


python-pillowHow to convert JPG to PNG


from PIL import Image

im = Image.open('image.jpg')
im.save('image.png')ctrl + c
PIL

import Pillow package modules

Image.open

open given image with Pillow

.save(

saves image under given path (format is automatically picked based on file extension)