|
|
@@ -25,13 +25,15 @@ else:
|
|
|
from plugins_mode.pic_deal import PictureProcessing
|
|
|
|
|
|
plugins_name = "详情模板"
|
|
|
-company_name_list = ["红蜻蜓",]
|
|
|
-template_name = "hongqingt-2"
|
|
|
+company_name_list = [
|
|
|
+ "惠利玛",
|
|
|
+]
|
|
|
+template_name = "hongqingting-2"
|
|
|
|
|
|
|
|
|
class DetailPicGet(DetailBase):
|
|
|
- need_view = ["俯视", "侧视", "后跟", "鞋底", "内里", "组合"]
|
|
|
- root = r"{}\resources\detail_temp\hongqingting\2".format(os.getcwd())
|
|
|
+ need_view = ["俯视", "侧视", "后跟", "鞋底", "内里"]
|
|
|
+ root = r"{}\resources\detail_temp\hongqingting-show\2".format(os.getcwd())
|
|
|
|
|
|
def __init__(self, goods_no, goods_no_value: dict, out_put_dir, windows=None, test=False, excel_data=None,
|
|
|
assigned_page_list=None):
|
|
|
@@ -39,7 +41,7 @@ class DetailPicGet(DetailBase):
|
|
|
super().__init__(goods_no, goods_no_value, out_put_dir, windows=windows, excel_data=excel_data,
|
|
|
assigned_page_list=assigned_page_list)
|
|
|
self.template_name = template_name
|
|
|
- self.root = r"{}\resources\detail_temp\hongqingting\2".format(os.getcwd())
|
|
|
+ self.root = r"{}\resources\detail_temp\hongqingting-show\2".format(os.getcwd())
|
|
|
print("run hongqingt-2 ")
|
|
|
self.base_bg_color = (228, 196, 147)
|
|
|
bg_color = (246, 246, 246)
|
|
|
@@ -119,7 +121,6 @@ class DetailPicGet(DetailBase):
|
|
|
margins=(0, 0, 0, 0),
|
|
|
)
|
|
|
|
|
|
-
|
|
|
return bg_img
|
|
|
def deal_pic_3(self):
|
|
|
|
|
|
@@ -128,7 +129,6 @@ class DetailPicGet(DetailBase):
|
|
|
# 背景图
|
|
|
bg_img = PictureProcessing(r"{}\3.jpg".format(self.root))
|
|
|
|
|
|
-
|
|
|
font_gg = ImageFont.truetype(r"resources\ttf\simhei.ttf", 50) # 商品名
|
|
|
yanseming = self.get_text_value("颜色名")
|
|
|
shangpinming = self.get_text_value("商品名")
|
|
|
@@ -145,7 +145,6 @@ class DetailPicGet(DetailBase):
|
|
|
margins=(0, 0, 0, 0),
|
|
|
)
|
|
|
|
|
|
-
|
|
|
pp_jpg_1, pp_png_1 = self.image_one_pic(return_orign=True,
|
|
|
goods_art_no=goods_art_no_list[0],
|
|
|
name="俯视",
|
|
|
@@ -159,7 +158,6 @@ class DetailPicGet(DetailBase):
|
|
|
pp_png_1=pp_png_1.rotate_advance(doge=15,is_crop=False)
|
|
|
bg_img = bg_img.to_overlay_pic_advance(top_img=pp_jpg_1, top_png_img=pp_png_1, base="cs",value=(50, 1420))
|
|
|
|
|
|
-
|
|
|
pp_jpg_1, pp_png_1 = self.image_one_pic(return_orign=True,
|
|
|
goods_art_no=goods_art_no_list[0],
|
|
|
name="俯视",
|
|
|
@@ -173,7 +171,6 @@ class DetailPicGet(DetailBase):
|
|
|
pp_png_1=pp_png_1.rotate_advance(doge=-8,is_crop=False)
|
|
|
bg_img = bg_img.to_overlay_pic_advance(top_img=pp_jpg_1, top_png_img=pp_png_1, base="cs",value=(-100, 950))
|
|
|
|
|
|
-
|
|
|
# pp_jpg_1, pp_png_1 = self.image_one_pic(
|
|
|
# return_orign=True,
|
|
|
# goods_art_no=goods_art_no_list[0],
|
|
|
@@ -316,7 +313,6 @@ class DetailPicGet(DetailBase):
|
|
|
top_png_img=pp_png_1,
|
|
|
)
|
|
|
|
|
|
-
|
|
|
if self.check_shoe_is_right_by_pixel(im=pp_png_1.im)== True:
|
|
|
pp_png_1 = pp_png_1.transpose()
|
|
|
pp_jpg_1 = pp_jpg_1.transpose()
|
|
|
@@ -336,7 +332,6 @@ class DetailPicGet(DetailBase):
|
|
|
top_png_img=pp_png_1,
|
|
|
)
|
|
|
|
|
|
-
|
|
|
pp_jpg_1, pp_png_1 = self.image_one_pic(
|
|
|
return_orign=True,
|
|
|
goods_art_no=goods_art_no_list[0],
|
|
|
@@ -412,10 +407,6 @@ class DetailPicGet(DetailBase):
|
|
|
top_png_img=pp_png_1,
|
|
|
)
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
return bg_img
|
|
|
|
|
|
def deal_pic_10(self):
|
|
|
@@ -507,7 +498,6 @@ class DetailPicGet(DetailBase):
|
|
|
margins=(0, 0, 0, 0),
|
|
|
)
|
|
|
|
|
|
-
|
|
|
xiekuan = self.get_text_value("鞋宽")
|
|
|
xiechang = self.get_text_value("鞋长")
|
|
|
tonggao = self.get_text_value("筒高")
|
|
|
@@ -570,7 +560,6 @@ class DetailPicGet(DetailBase):
|
|
|
margins=(0, 0, 0, 0),
|
|
|
)
|
|
|
|
|
|
-
|
|
|
# 底部三连鞋子带文字
|
|
|
|
|
|
font_main = ImageFont.truetype(
|
|
|
@@ -760,7 +749,6 @@ class DetailPicGet(DetailBase):
|
|
|
# margins=(0, 0, 0, 0),
|
|
|
# )
|
|
|
|
|
|
-
|
|
|
font_2 = ImageFont.truetype(r"resources\ttf\puhui\Medium.ttf", 34) # 颜色名称
|
|
|
color_pic_list_1 = []
|
|
|
for goods_art_no_dict in self.goods_no_value["货号资料"]:
|
|
|
@@ -803,10 +791,8 @@ class DetailPicGet(DetailBase):
|
|
|
# 背景图
|
|
|
header_img = PictureProcessing(r"{}\11-1.jpg".format(self.root))
|
|
|
|
|
|
-
|
|
|
bg_img = PictureProcessing("RGBA", (header_img.width, 3440), (255,255,255))
|
|
|
|
|
|
-
|
|
|
# 贴顶部
|
|
|
bg_img = bg_img.to_overlay_pic_advance(
|
|
|
mode="pixel",
|
|
|
@@ -970,7 +956,6 @@ class DetailPicGet(DetailBase):
|
|
|
top_png_img=item_img,
|
|
|
)
|
|
|
|
|
|
-
|
|
|
# item4
|
|
|
item_img = PictureProcessing("RGBA", (header_img.width, 760), (255,255,255))
|
|
|
pp_jpg_1, pp_png_1 = self.image_one_pic(
|
|
|
@@ -1000,7 +985,6 @@ class DetailPicGet(DetailBase):
|
|
|
top_png_img=pp_png_1,
|
|
|
)
|
|
|
|
|
|
-
|
|
|
font_hei = ImageFont.truetype(r"resources\ttf\simhei.ttf", 24)
|
|
|
item_img.get_text_image_advanced(
|
|
|
value=(500, 600),
|
|
|
@@ -1021,7 +1005,6 @@ class DetailPicGet(DetailBase):
|
|
|
top_png_img=item_img,
|
|
|
)
|
|
|
|
|
|
-
|
|
|
return bg_img
|
|
|
|
|
|
def deal_pic_12(self):
|