mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 02:46:18 +03:00
Return copy on Image crop if crop dimensions match Image dimensions
This commit is contained in:
parent
2152b26515
commit
4dd7b94338
|
@ -1032,6 +1032,9 @@ class Image(object):
|
|||
|
||||
x0, y0, x1, y1 = map(int, map(round, box))
|
||||
|
||||
if x0 == 0 and y0 == 0 and (x1, y1) == self.size:
|
||||
return self.copy()
|
||||
|
||||
if x1 < x0:
|
||||
x1 = x0
|
||||
if y1 < y0:
|
||||
|
|
Loading…
Reference in New Issue
Block a user