From b70da17f806c23327561c2a06abe7be070191a3f Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Fri, 7 Jan 2022 19:26:01 -0800 Subject: [PATCH] remove extra change --- mangle/image.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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