|
@@ -66,19 +66,19 @@ class OnePicTest():
|
|
|
print("image_path", image_path)
|
|
print("image_path", image_path)
|
|
|
print("cut_image_path", cut_image_path)
|
|
print("cut_image_path", cut_image_path)
|
|
|
print("main_out_path", main_out_path)
|
|
print("main_out_path", main_out_path)
|
|
|
- # try:
|
|
|
|
|
- GeneratePic().run(
|
|
|
|
|
- image_path=image_path,
|
|
|
|
|
- cut_image_path=cut_image_path,
|
|
|
|
|
- out_path=main_out_path,
|
|
|
|
|
- image_deal_mode=1,
|
|
|
|
|
- resize_mode=1,
|
|
|
|
|
- out_pic_size=1024,
|
|
|
|
|
- is_logo=False,
|
|
|
|
|
|
|
+ try:
|
|
|
|
|
+ GeneratePic().run(
|
|
|
|
|
+ image_path=image_path,
|
|
|
|
|
+ cut_image_path=cut_image_path,
|
|
|
|
|
+ out_path=main_out_path,
|
|
|
|
|
+ image_deal_mode=1,
|
|
|
|
|
+ resize_mode=1,
|
|
|
|
|
+ out_pic_size=1024,
|
|
|
|
|
+ is_logo=False,
|
|
|
)
|
|
)
|
|
|
- # except Exception as e:
|
|
|
|
|
- # print(e)
|
|
|
|
|
- # raise UnicornException("处理失败,请重试")
|
|
|
|
|
|
|
+ except Exception as e:
|
|
|
|
|
+ print(e)
|
|
|
|
|
+ raise UnicornException("处理失败,请重试")
|
|
|
|
|
|
|
|
# return_data["code"] = 0
|
|
# return_data["code"] = 0
|
|
|
# return_data["data"]["image_path"] = image_path
|
|
# return_data["data"]["image_path"] = image_path
|