Skip to content

Add capability to process CMYK palettes #7309

@pubpub-zz

Description

@pubpub-zz

What did you do?

I'm using Pillow to add image extraction capability in pypdf. I'm facing some issues with images using some CMYK palettes.
However Pillow is currently not able to process them.

What did you expect to happen?

Accept CMYK indexed images.

What actually happened?

Exception ValueError: unrecognized raw mode is raised.

What are your OS, Python and Pillow versions?

  • OS: windows
  • Python: 3.10.4
  • Pillow: 10.0.0

test file:
test.png

from PIL using Image

img = Image.open("test.png")
img2.putpalette(b"\x00\x00\x00\xFB\x00\x00\x00\x00","CMYK")

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