Tried to make an image converter, from PNG to JPEG/JPG
That it converted the image
The error is the following
Traceback (most recent call last):
File "C:/Users/xxx/.PyCharmEdu2018.3/config/scratches/ImageConvertion.py", line 4, in
im = Image.mage.open ("2.png")
AttributeError: module 'PIL.Image' has no attribute 'mage
from PIL import Image
im = Image.mage.open ("2.png")
bg = Image.new ("RGB", im.size, (255,255,255))
bg.paste (im, (0,0), im)
bg.save("file.jpg", quality=95)
Image.mage.open?
It's im = Image.open("2.png")
https://pillow.readthedocs.io/en/stable/handbook/tutorial.html
Most helpful comment
Image.mage.open?