Pillow
Pillow copied to clipboard
Round box position to integer when pasting embedded color
Resolves #6515
If align="center" is used for multiline_text,
https://github.com/python-pillow/Pillow/blob/4c59f77e37e7333544a5d0910de8148f7972ed06/src/PIL/ImageDraw.py#L562-L570
then coord can be a float for the embedded_color paste. But when pasting one image onto another, the co-ordinates must be integers, and so an error will be raised, as in the issue.
https://github.com/python-pillow/Pillow/blob/4c59f77e37e7333544a5d0910de8148f7972ed06/src/PIL/ImageDraw.py#L486
This PR rounds the co-ordinates to integers in that case.
I've created https://github.com/radarhere/Pillow/pull/18 with a few suggestions.