增加图片损坏的判断
This commit is contained in:
@@ -199,6 +199,8 @@ def mask_photo(img_url, name, id_card_num, color=(255, 255, 255)):
|
||||
|
||||
# 打开图片
|
||||
image = image_util.read(img_url)
|
||||
if not image:
|
||||
return False, image
|
||||
original_image = image
|
||||
is_masked, image = _mask(image, name, id_card_num, color)
|
||||
if not is_masked:
|
||||
|
||||
Reference in New Issue
Block a user