Converting png P with alpha -> RGB -> RGBA crashes #514

Closed
e98cuenc opened this Issue Feb 4, 2014 · 2 comments

3 participants

@e98cuenc

If file is the name of a png paletted image with transparency (for example http://static.freepik.com/foto-gratis/circulo-facebook_318-10967.png), this code crashes:

Image.open(file).convert('RGB').convert('RGBA')

with the error:

Traceback (most recent call last):
  File "./test_palette.py", line 6, in <module>
    im = Image.open(file).convert('RGB').convert('RGBA')
  File "/home/vagrant/pillow/Pillow/PIL/Image.py", line 745, in convert
    return self._new(self.im.convert_transparent(mode, self.info['transparency']))
TypeError: an integer is required
@wiredfool
Pillow member

I'm pretty sure that the root cause is the same as #510, first bullet point in this response: #510 (comment) .

@aclark4life
Pillow member

Duplicate of #510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment