Pillow: AttributeError: module 'PIL.Image' has no attribute 'mage'

Created on 18 Feb 2019  路  2Comments  路  Source: python-pillow/Pillow

What did you do?

Tried to make an image converter, from PNG to JPEG/JPG

What did you expect to happen?

That it converted the image

What actually happened?

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

What are your OS, Python and Pillow versions?

  • OS: windows 10
  • Python: 3.7.0
  • Pillow: 5.4.1
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)

Most helpful comment

Image.mage.open?

All 2 comments

Image.mage.open?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edowson picture edowson  路  3Comments

vytisb picture vytisb  路  4Comments

thinrhino picture thinrhino  路  3Comments

SysoevDV picture SysoevDV  路  3Comments

anonymous530 picture anonymous530  路  3Comments