Skip to content

Converting "I" image to RGB issue #5642

Description

@Lucuz91

Hi all,

I am trying to convert a png image to a jpeg.
The image is opened in "I" mode, but when I convert to RGB and save it in jpeg the image is very different from the original.

  • OS: Ubuntu 20.04
  • Python: 3.8.5
  • Pillow: 8.3.1
from PIL import Image
img = Image.open('black_bands.png')
img2 = img.convert('RGB')
img2.save('black_bands_out.jpg')

Original image
black_bands

Converted image
black_bands_out

Activity

  1. radarhere commented on Jul 29, 2021

    @radarhere
    Member

    This is something of a known issue. #4044 found this converting to RGBA, and #3159 talks about this problem more generally.

  2. radarhere commented on Aug 1, 2021

    @radarhere
    Member

    Closing as part of #3159

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

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