Skip to content

Do not map buffer for a zero dimension image in frombuffer() - #10237

Open
radarhere wants to merge 1 commit into
python-pillow:mainfrom
radarhere:zero_size
Open

radarhere wants to merge 1 commit into
python-pillow:mainfrom
radarhere:zero_size

Conversation

@radarhere

Copy link
Copy Markdown
Member

#7493 skipped calling im.frombytes() if the width or height was zero.

Let's do a similar thing in Image.frombuffer(), only mapping the buffer if the size is non-zero.

This branch has not been deployed

No deployments
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.

1 participant