Skip to content

Raise ValueError if Dib paste() box does not match image size - #9815

Merged
hugovk merged 1 commit into
python-pillow:mainfrom
radarhere:imagewin_paste
Jul 26, 2026
Merged

Raise ValueError if Dib paste() box does not match image size#9815
hugovk merged 1 commit into
python-pillow:mainfrom
radarhere:imagewin_paste

Conversation

@radarhere

Copy link
Copy Markdown
Member

Pillow/src/PIL/ImageWin.py

Lines 164 to 170 in b741b77

def paste(
self, im: Image.Image, box: tuple[int, int, int, int] | None = None
) -> None:
"""
Paste a PIL image into the bitmap image.
:param im: A PIL image. The size must match the target region.

This PR raises a ValueError if the box size does not match im size.

@hugovk
hugovk merged commit e0a15b6 into python-pillow:main Jul 26, 2026
56 checks passed
@radarhere
radarhere deleted the imagewin_paste branch July 26, 2026 22:44
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.

2 participants