mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-25 08:10:33 +03:00
Changed behaviour of default box argument for paste method to match docs
This commit is contained in:
parent
28fdac2c1d
commit
c3fe5d4313
|
@ -1307,8 +1307,7 @@ class Image(object):
|
||||||
box = None
|
box = None
|
||||||
|
|
||||||
if box is None:
|
if box is None:
|
||||||
# cover all of self
|
box = (0, 0)
|
||||||
box = (0, 0) + self.size
|
|
||||||
|
|
||||||
if len(box) == 2:
|
if len(box) == 2:
|
||||||
# upper left corner given; get size from image or mask
|
# upper left corner given; get size from image or mask
|
||||||
|
@ -1321,7 +1320,7 @@ class Image(object):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"cannot determine region size; use 4-item box"
|
"cannot determine region size; use 4-item box"
|
||||||
)
|
)
|
||||||
box = box + (box[0]+size[0], box[1]+size[1])
|
box += (box[0]+size[0], box[1]+size[1])
|
||||||
|
|
||||||
if isStringType(im):
|
if isStringType(im):
|
||||||
from PIL import ImageColor
|
from PIL import ImageColor
|
||||||
|
|
Loading…
Reference in New Issue
Block a user