remove extra change
This commit is contained in:
parent
0d11e6ae5a
commit
b70da17f80
@ -191,12 +191,11 @@ def orientImage(image, size):
|
|||||||
# by inverting colors, and asking a bounder box ^^
|
# by inverting colors, and asking a bounder box ^^
|
||||||
@protect_bad_image
|
@protect_bad_image
|
||||||
def autoCropImage(image):
|
def autoCropImage(image):
|
||||||
w, h = image.size
|
|
||||||
try:
|
try:
|
||||||
x0, y0, xend, yend = ImageChops.invert(image).getbbox()
|
x0, y0, xend, yend = ImageChops.invert(image).getbbox()
|
||||||
except TypeError: # bad image, specific to chops
|
except TypeError: # bad image, specific to chops
|
||||||
return image
|
return image
|
||||||
image = image.crop((0, y0, w, yend))
|
image = image.crop((x0, y0, xend, yend))
|
||||||
|
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user