Skip to content

[10.1.0 regression] Palette images save as blank PDFs #7554

@BertrandBordage

Description

@BertrandBordage

Minimal example (you can use this tiny PNG for example):

from PIL import Image

image = Image.open('test.png')
image = image.convert('P')
image.save('test.pdf')

Output PDF with Pillow 10.0.1:
image

Output PDF with Pillow 10.1.0:
image

Issue faced with Python 3.11.6 on Ubuntu 22.04 and Debian 12 (bookworm). I also had the same issue in Docker environments, so I could make a Docker image if needed.

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