diff --git a/mangle/image.py b/mangle/image.py index 3b91425..0b5ea36 100644 --- a/mangle/image.py +++ b/mangle/image.py @@ -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