rambo 5 місяців тому
батько
коміт
92b88febf8

+ 2 - 2
python/service/OnePicTest.py

@@ -60,8 +60,8 @@ class OnePicTest():
         remove_pic_ins.get_image_cut(file_path=image_path, out_file_path=cut_image_path)
 
         # ==============生成主图====================
-        main_out_path = r"{}\temp\pic_test\{}-主图.jpg".format(
-            os.getcwd(), os.path.splitext(file)[0]
+        main_out_path = r"{}\temp\pic_test\{}-主图{}".format(
+            os.getcwd(), os.path.splitext(file)[0], settings.OUT_PIC_MODE
         )
         print("image_path", image_path)
         print("cut_image_path", cut_image_path)

+ 4 - 1
python/service/generate_main_image/grenerate_main_image_test.py

@@ -607,7 +607,10 @@ class GeneratePic(object):
         else:
             new_format = settings.OUT_PIC_MODE.split(".")[-1]
             self.saver.save_image(
-                image=image_bg, file_path=out_path, save_mode=new_format
+                image=image_bg,
+                file_path=out_path,
+                save_mode=new_format,
+                _format=new_format,
             )
 
         if output_queue is not None: