feat design 结果新增一个没有贴single print的中间图片的url

fix
This commit is contained in:
zhouchengrong
2024-07-05 14:04:19 +08:00
parent cc69ff7872
commit bc1c903d38
3 changed files with 13 additions and 4 deletions

View File

@@ -71,6 +71,11 @@ class Split(object):
result["back_image_url"] = None
result["back_mask_url"] = None
result['back_mask_image'] = None
# 创建中间图层
result_pattern_image_rgba = rgb_to_rgba((result['pattern_image'].shape[0], result['pattern_image'].shape[1]), result['pattern_image'], result['mask'])
result_pattern_image_pil = Image.fromarray(cvtColor(result_pattern_image_rgba, COLOR_BGR2RGBA))
_, result['pattern_image_url'], _ = upload_png_mask(result_pattern_image_pil, f'{generate_uuid()}')
return result
except Exception as e:
logging.warning(f"split runtime exception : {e} image_id : {result['image_id']}")