Answers for "how to convert jpg to png using python"

0

python convert png to jpg

from PIL import Image

img = Image.open('image.png')
rgb_img = img.convert('RGB')
rgb_img.save('image.jpg')
Posted by: Guest on February-24-2021
4

python pillow convert jpg to png

from PIL import Image

im1 = Image.open(r'C:UsersRonDesktopTestautumn.jpg')
im1.save(r'C:UsersRonDesktopTestnew_autumn.png')
Posted by: Guest on May-11-2020
3

python pillow convert jpg to png

from PIL import Image

im1 = Image.open(r'path where the JPG is storedfile name.jpg')
im1.save(r'path where the PNG will be storednew file name.png')
Posted by: Guest on May-11-2020

Code answers related to "how to convert jpg to png using python"

Python Answers by Framework

Browse Popular Code Answers by Language