From 3fa90735d500cb2576ca36f61a0daeb40987abdf Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Tue, 30 Sep 2025 10:27:52 -0700 Subject: [PATCH] fix interpanel crop with color images with black borders; (#1094) --- kindlecomicconverter/inter_panel_crop_alg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kindlecomicconverter/inter_panel_crop_alg.py b/kindlecomicconverter/inter_panel_crop_alg.py index cf8211e..cbfd7a8 100644 --- a/kindlecomicconverter/inter_panel_crop_alg.py +++ b/kindlecomicconverter/inter_panel_crop_alg.py @@ -19,10 +19,10 @@ def crop_empty_inter_panel(img, direction: Literal["horizontal", "vertical", "bo img_temp = img if img.mode != 'L': - img_temp = ImageOps.grayscale(img) + img_temp = ImageOps.grayscale(img_temp) if background_color != 'white': - img_temp = ImageOps.invert(img) + img_temp = ImageOps.invert(img_temp) img_mat = np.array(img)