From 46f295d4221a83484ace63455b85377ff38668d6 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Thu, 17 Oct 2024 15:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=BE=E7=89=87=E5=88=86?= =?UTF-8?q?=E5=89=B2=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_mask/auto_photo_mask.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/photo_mask/auto_photo_mask.py b/photo_mask/auto_photo_mask.py index e4d92c0..8d2720b 100644 --- a/photo_mask/auto_photo_mask.py +++ b/photo_mask/auto_photo_mask.py @@ -178,6 +178,8 @@ def mask_photo(img_path, name, id_card_num, color=(255, 255, 255)): do_mask = False split_results = image_util.split(ip) for split_result in split_results: + if not split_result['img']: + continue to_mask_img, x_offset, y_offset = handle_image_for_mask(split_result) results = get_mask_layout(to_mask_img, n, icn)