Skip to content

P to PA conversion loses color #6496

@Yay295

Description

@Yay295

What did you do?

using https://github.com/python-pillow/Pillow/blob/main/Tests/images/hopper.jpg

h = Image.open('hopper.jpg')
h.convert('P').show()
h.convert('PA').show()
h.convert('P').convert('PA').show()
h.convert('PA').convert('P').show()

What did you expect to happen?

I expected all of the images to look essentially the same.

What actually happened?

The image converted to P then to PA has no color.

What are your OS, Python, and Pillow versions?

  • OS: Windows 10
  • Python: 3.9.6
  • Pillow: 9.2.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions