Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #7492

The issue found that calling Image.frombytes for an image with zero size and no data - e.g. Image.frombytes("L", (0, 0), b"") - raises an error.

This fixes that, and the corresponding situation for im.frombytes().

This is the inverse of #5938

@radarhere radarhere merged commit a5a6ca1 into python-pillow:main Nov 3, 2023
@radarhere radarhere deleted the frombytes branch November 3, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image.frombytes throws on empty image

2 participants