remove extra change

This commit is contained in:
Alex Xu 2022-01-07 19:26:01 -08:00
parent 0d11e6ae5a
commit b70da17f80

View File

@ -191,12 +191,11 @@ def orientImage(image, size):
# by inverting colors, and asking a bounder box ^^
@protect_bad_image
def autoCropImage(image):
w, h = image.size
try:
x0, y0, xend, yend = ImageChops.invert(image).getbbox()
except TypeError: # bad image, specific to chops
return image
image = image.crop((0, y0, w, yend))
image = image.crop((x0, y0, xend, yend))
return image