Skip to content

Fixed passing zero dimension images into fromarrow() - #10086

Merged
hugovk merged 1 commit into
python-pillow:mainfrom
akx:new-arrow-none
Sep 30, 2026
Merged

hugovk merged 1 commit into
python-pillow:mainfrom
akx:new-arrow-none

Conversation

@akx

@akx akx commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

By virtue of image_length (the len handler for ImagingCores) returning the product of the image's dimensions, if either dimension is zero, the ImagingCore evaluates falsy.

if im isn't then the correct check for None-ness.

Refs, roundaboutly, the #10080 (comment) discussion.

By virtue of `image_length` (the `len` handler for `ImagingCore`s)
returning the product of the image's dimensions, if either dimension is zero,
the `ImagingCore` evaluates falsy.

`if im` isn't then the correct check for `None`-ness.
@radarhere radarhere changed the title fromarrow: Use correct check for ImagingCore falsity Fixed passing zero dimension images into fromarrow() Sep 30, 2026
@hugovk
hugovk merged commit 9d30729 into python-pillow:main Sep 30, 2026
52 checks passed
@akx
akx deleted the new-arrow-none branch September 30, 2026 14:50
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.

3 participants