Merge pull request #2471 from radarhere/crop

Return copy on Image crop if crop dimensions match the image
This commit is contained in:
wiredfool 2017-04-19 11:46:07 +01:00 committed by GitHub
commit df616d2b16

View File

@ -1044,6 +1044,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: