mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-15 03:46:28 +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))
|
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:
|
if x1 < x0:
|
||||||
x1 = x0
|
x1 = x0
|
||||||
if y1 < y0:
|
if y1 < y0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user