Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed frombytes() for images with a zero dimension #7493

Merged
merged 2 commits into from
Nov 3, 2023

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
50 checks passed
@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