Skip to content

PIL.Image.getdata() is deprecated #170

@brianhelba

Description

@brianhelba

As of Pillow 12.1, Image.getdata() is deprecated.

This code is causing a DeprecationWarning:

return [item for sublist in pil_img.convert("RGBA").getdata() for item in sublist]

This outputs with:

Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions