Return copy on Image crop if crop dimensions match Image dimensions

This commit is contained in:
Andrew Murray 2017-03-31 13:02:56 +11:00
parent 2152b26515
commit 4dd7b94338

View File

@ -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: