detail_zhudi1.py 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. """
  2. 步骤:
  3. 1、整理需要处理的款号图-输出款号图文件夹
  4. 2、整理所有相关的图片作为素材图
  5. 3、按要求进行拼接
  6. """
  7. import os
  8. from PIL import ImageFont
  9. import sys
  10. import settings
  11. # from module.view_control.generate_goods_no_detail_pic.detail_generate_base import DetailBase
  12. # from module.view_control.generate_goods_no_detail_pic.pic_deal import PictureProcessing
  13. is_test_plugins = False
  14. try:
  15. is_test_plugins = settings.is_test_plugins
  16. except:
  17. is_test_plugins = False
  18. if is_test_plugins:
  19. from custom_plugins.plugins_mode.detail_generate_base import DetailBase
  20. from custom_plugins.plugins_mode.pic_deal import PictureProcessing
  21. else:
  22. from plugins_mode.detail_generate_base import DetailBase
  23. from plugins_mode.pic_deal import PictureProcessing
  24. plugins_name = "详情模板"
  25. company_name_list = ["全部"]
  26. template_name = "zhudi-1"
  27. # 乐福鞋 详情页
  28. class DetailPicGet(DetailBase):
  29. need_view = ["俯视", "侧视", "后跟", "鞋底", "内里"]
  30. root = r"{}\resources\detail_temp\zhudi\1".format(os.getcwd())
  31. def __init__(
  32. self,
  33. goods_no,
  34. goods_no_value: dict,
  35. out_put_dir,
  36. windows=None,
  37. test=False,
  38. excel_data=None,
  39. assigned_page_list=None,
  40. output_queue=None,
  41. **kwargs
  42. ):
  43. super().__init__(
  44. goods_no,
  45. goods_no_value,
  46. out_put_dir,
  47. windows=windows,
  48. excel_data=excel_data,
  49. assigned_page_list=assigned_page_list,
  50. output_queue=output_queue,
  51. )
  52. self.template_name = template_name
  53. self.root = r"{}\resources\detail_temp\zhudi\1".format(os.getcwd())
  54. print("run zhudi-1 ")
  55. self.base_bg_color = (255, 255, 255)
  56. self.deal_pic_func_list = [
  57. self.deal_pic_1,
  58. self.deal_pic_2,
  59. self.deal_pic_3,
  60. self.deal_pic_4,
  61. self.deal_pic_5,
  62. self.deal_pic_6,
  63. self.deal_pic_7,
  64. self.deal_pic_8,
  65. ]
  66. if test:
  67. self.run_test()
  68. else:
  69. self.run_all()
  70. def run_test(self):
  71. detailed_images = []
  72. detailed_images.append(self.deal_pic_1())
  73. detailed_images.append(self.deal_pic_2())
  74. detailed_images.append(self.deal_pic_3())
  75. detailed_images.append(self.deal_pic_4())
  76. detailed_images.append(self.deal_pic_5())
  77. detailed_images.append(self.deal_pic_6())
  78. detailed_images.append(self.deal_pic_7())
  79. detailed_images.append(self.deal_pic_8())
  80. img = self.add_pic(detailed_images)
  81. if img:
  82. self.create_folder(r"{}/{}".format(self.out_put_dir, template_name))
  83. img.save(
  84. r"{}/{}/{}.jpg".format(
  85. self.out_put_dir, template_name, self.goods_no, format="JPEG"
  86. )
  87. )
  88. img.show()
  89. #
  90. def deal_pic_1(self):
  91. detailed_images = []
  92. pp_bg_1 = PictureProcessing(r"{}\1.jpg".format(self.root), 1600)
  93. font_main = ImageFont.truetype(r"resources\ttf\puhui\Bold.ttf", 160)
  94. font_sub = ImageFont.truetype(r"resources\ttf\puhui\Medium.ttf", 50)
  95. main_text = self.get_text_value("标题")
  96. sub_text = self.get_text_value("副标题")
  97. _pp = PictureProcessing().get_text_image_advanced(
  98. font=font_main,
  99. text=main_text,
  100. fill=(0, 0, 0),
  101. spacing=20,
  102. return_mode="min_image",
  103. )
  104. _pp_sub = PictureProcessing().get_text_image_advanced(
  105. font=font_sub,
  106. text=sub_text,
  107. fill=(0, 0, 0),
  108. return_mode="min_image",
  109. )
  110. pp_bg_1 = pp_bg_1.paste_img(top_img=_pp, value=(0, 232), base="cs")
  111. pp_bg_1 = pp_bg_1.paste_img(top_img=_pp_sub, value=(0, 446), base="cs")
  112. goods_art_no_list = list(self.data.keys())
  113. pp_jpg_1_list = []
  114. pp_png_1_list = []
  115. pp_jpg, pp_png = self.image_one_pic(
  116. return_orign=True,
  117. goods_art_no=goods_art_no_list[0],
  118. name="组合",
  119. )
  120. # pp_jpg_1_list.append(pp_jpg)
  121. # pp_jpg_1_list.append(pp_jpg)
  122. # pp_png_1_list.append(pp_png)
  123. # pp_png_1_list.append(pp_png)
  124. x, y = 0, 0
  125. pp_bg_jpg = PictureProcessing("RGB", (1600, 1600), (255, 255, 255))
  126. _resize_value = (
  127. pp_bg_1.width/2.5
  128. )
  129. pp_jpg = pp_jpg.resize(value=_resize_value + 100)
  130. pp_png = pp_png.resize(value=_resize_value + 100)
  131. # pp_bg_jpg = pp_bg_jpg.to_overlay_pic_advance(top_img=pp_jpg, value=(x, y))
  132. # for index, pp_jpg in enumerate(pp_jpg_1_list):
  133. # pp_jpg = pp_jpg.resize(value=_resize_value + 100 )
  134. # if index == 0:
  135. # x += pp_bg_1.width / 2
  136. # pp_jpg = pp_jpg.transpose()
  137. # else:
  138. # x -= pp_jpg.width - 100
  139. # pp_bg_jpg = pp_bg_jpg.to_overlay_pic_advance(top_img=pp_jpg, value=(x, y))
  140. # # y += 60
  141. # x, y = 0, 0
  142. # pp_bg_png = PictureProcessing("RGBA", (1600, 1600), (255, 255, 255, 0))
  143. # for index, pp_png in enumerate(pp_png_1_list):
  144. # pp_png = pp_png.resize(value=_resize_value + 100 )
  145. # if index == 0:
  146. # x += pp_bg_1.width / 2
  147. # pp_png = pp_png.transpose()
  148. # else:
  149. # x -= pp_jpg.width-100
  150. # pp_bg_png = pp_bg_png.paste_img(top_img=pp_png, value=(x, y))
  151. # # x -= 380
  152. # # y += 60
  153. # min_bbox = pp_bg_png.getbbox()
  154. # min_bbox = PictureProcessing().expand_bbox(min_bbox)
  155. # pp_bg_jpg = pp_bg_jpg.crop(bbox=min_bbox)
  156. # pp_bg_png = pp_bg_png.crop(bbox=min_bbox)
  157. pp_bg_1 = pp_bg_1.to_overlay_pic_advance(
  158. top_img=pp_jpg, top_png_img=pp_png, base="cc", value=(0, -100)
  159. )
  160. detailed_images.append(pp_bg_1)
  161. # detailed_images.append(pp_bg_2)
  162. return PictureProcessing(im=self.add_pic(detailed_images))
  163. # 展示基础信息
  164. def deal_pic_2(self):
  165. detailed_images = []
  166. pp_bg_2 = PictureProcessing(r"{}\2.jpg".format(self.root))
  167. font_1 = ImageFont.truetype(r"resources\ttf\puhui\Bold.ttf", 130)
  168. font_desc = ImageFont.truetype(r"resources\ttf\puhui\Regular.ttf", 48)
  169. text = self.get_text_value("设计理念-标题")
  170. text_desc = self.get_text_value("设计理念")
  171. _pp = PictureProcessing().get_text_image_advanced(
  172. font=font_1,
  173. text=text,
  174. fill=(0, 0, 0),
  175. return_mode="min_image",
  176. )
  177. _pp_desc = PictureProcessing().get_text_image_advanced(
  178. font=font_desc,
  179. text=text_desc,
  180. fill=(0, 0, 0),
  181. spacing=30,
  182. align="center",
  183. return_mode="min_image",
  184. )
  185. pp_bg_2 = pp_bg_2.paste_img(top_img=_pp, value=(0, 212), base="nc")
  186. pp_bg_2 = pp_bg_2.paste_img(top_img=_pp_desc, value=(0, 533), base="nc")
  187. detailed_images.append(pp_bg_2)
  188. return PictureProcessing(im=self.add_pic(detailed_images))
  189. # 颜色展示
  190. def deal_pic_3(self):
  191. detailed_images = []
  192. pp_bg = PictureProcessing(r"{}\3.jpg".format(self.root))
  193. font_color = ImageFont.truetype(
  194. r"resources\ttf\puhui\Medium.ttf", 34
  195. ) # 颜色名称
  196. color_pic_list_1 = []
  197. for goods_art_no_dict in self.goods_no_value["货号资料"]:
  198. color_name = goods_art_no_dict["颜色名称"]
  199. goods_art_no = goods_art_no_dict["货号"]
  200. pp_jpg = self.get_overlay_pic_from_dict(
  201. goods_art_no=goods_art_no,
  202. color_name="侧视",
  203. bg_color=self.base_bg_color,
  204. )
  205. pp_jpg = pp_jpg.resize(value=pp_bg.width / 2)
  206. pp_jpg = pp_jpg.paste_img_invert(
  207. top_img=PictureProcessing(
  208. "RGBA", (pp_jpg.width, pp_jpg.height + 70), (255, 255, 255, 0)
  209. ),
  210. base="nw",
  211. )
  212. text_image = PictureProcessing().get_text_image_advanced(
  213. font=font_color,
  214. text="{}".format(color_name),
  215. fill=(0, 0, 0),
  216. return_mode="min_image",
  217. )
  218. pp_jpg = pp_jpg.paste_img(top_img=text_image, base="sc", value=(0, 10))
  219. color_pic_list_1.append(pp_jpg)
  220. # 颜色列表进行等分展示
  221. all_color_pp = PictureProcessing().horizontal_distribution(
  222. color_pic_list_1,
  223. bg_width=pp_bg.width - 100,
  224. line_spacing=10,
  225. number_per_row=2,
  226. )
  227. pp_bg.paste_img(top_img=all_color_pp, base="cc", value=(0, -100))
  228. font_category = ImageFont.truetype(r"resources\ttf\puhui\Regular.ttf", 50)
  229. text_xiemian = self.get_text_value("鞋面")
  230. text_xiedi = self.get_text_value("鞋底")
  231. text_neili = self.get_text_value("内里")
  232. text_xiedian = self.get_text_value("鞋垫")
  233. pp_text_xiemian = PictureProcessing().get_text_image_advanced(
  234. font=font_category,
  235. text=text_xiemian,
  236. fill=(0, 0, 0),
  237. return_mode="min_image",
  238. )
  239. pp_text_xiedian = PictureProcessing().get_text_image_advanced(
  240. font=font_category,
  241. text=text_xiedian,
  242. fill=(0, 0, 0),
  243. return_mode="min_image",
  244. )
  245. pp_text_xiedi = PictureProcessing().get_text_image_advanced(
  246. font=font_category,
  247. text=text_xiedi,
  248. fill=(0, 0, 0),
  249. return_mode="min_image",
  250. )
  251. pp_text_neili = PictureProcessing().get_text_image_advanced(
  252. font=font_category,
  253. text=text_neili,
  254. fill=(0, 0, 0),
  255. return_mode="min_image",
  256. )
  257. pp_bg = pp_bg.paste_img(top_img=pp_text_xiemian, value=(416, 960), base="nw")
  258. pp_bg = pp_bg.paste_img(top_img=pp_text_xiedian, value=(416, 1144), base="nw")
  259. pp_bg = pp_bg.paste_img(top_img=pp_text_neili, value=(1157, 960), base="nw")
  260. pp_bg = pp_bg.paste_img(top_img=pp_text_xiedi, value=(1157, 1144), base="nw")
  261. detailed_images.append(pp_bg)
  262. return PictureProcessing(im=self.add_pic(detailed_images))
  263. # 展示细节图
  264. def deal_pic_4(self):
  265. detailed_images = []
  266. bg_image = PictureProcessing(r"{}\4.jpg".format(self.root))
  267. text_fill = (255, 255, 255)
  268. font_title = ImageFont.truetype(r"resources\ttf\puhui\Bold.ttf", 150)
  269. font_sub = ImageFont.truetype(r"resources\ttf\puhui\Regular.ttf", 50)
  270. text_title = self.get_text_value("细节标题-1")
  271. text_sub_title = self.get_text_value("细节副标题-1")
  272. pp_text_title = PictureProcessing().get_text_image_advanced(
  273. font=font_title,
  274. text=text_title,
  275. fill=text_fill,
  276. return_mode="min_image",
  277. )
  278. pp_text_sub_title = PictureProcessing().get_text_image_advanced(
  279. font=font_sub,
  280. text=text_sub_title,
  281. fill=text_fill,
  282. return_mode="min_image",
  283. )
  284. bg_image.paste_img(top_img=pp_text_title, base="en", value=(108, 258))
  285. bg_image.paste_img(top_img=pp_text_sub_title, base="en", value=(108, 578))
  286. goods_art_no_list = list(self.data.keys())
  287. _,pp_png = self.image_one_pic(
  288. return_orign=True,
  289. goods_art_no=goods_art_no_list[0],
  290. name="俯视",
  291. )
  292. pp_png = pp_png.resize(value=bg_image.width * 2)
  293. pp_png = pp_png.transpose()
  294. bg_image.paste_img(top_img=pp_png, base="cs", value=(-pp_png.width/4, -200))
  295. detailed_images.append(bg_image)
  296. return PictureProcessing(im=self.add_pic(detailed_images))
  297. # 场景图--产品展示
  298. def deal_pic_5(self):
  299. detailed_images = []
  300. bg_image = PictureProcessing(r"{}\5.jpg".format(self.root))
  301. text_fill = (255, 255, 255)
  302. font_title = ImageFont.truetype(r"resources\ttf\puhui\Bold.ttf", 150)
  303. font_sub = ImageFont.truetype(r"resources\ttf\puhui\Regular.ttf", 50)
  304. text_title = self.get_text_value("细节标题-2")
  305. text_sub_title = self.get_text_value("细节副标题-2")
  306. pp_text_title = PictureProcessing().get_text_image_advanced(
  307. font=font_title,
  308. text=text_title,
  309. fill=text_fill,
  310. return_mode="min_image",
  311. )
  312. pp_text_sub_title = PictureProcessing().get_text_image_advanced(
  313. font=font_sub,
  314. text=text_sub_title,
  315. fill=text_fill,
  316. return_mode="min_image",
  317. )
  318. bg_image.paste_img(top_img=pp_text_title, base="nw", value=(115, 369))
  319. bg_image.paste_img(top_img=pp_text_sub_title, base="nw", value=(115, 686))
  320. goods_art_no_list = list(self.data.keys())
  321. _, pp_png = self.image_one_pic(
  322. return_orign=True,
  323. goods_art_no=goods_art_no_list[0],
  324. name="俯视",
  325. )
  326. pp_png = pp_png.resize(value=bg_image.width * 2)
  327. pp_png = pp_png.transpose()
  328. bg_image.paste_img(top_img=pp_png, base="cs", value=(pp_png.width / 4, 0))
  329. detailed_images.append(bg_image)
  330. return PictureProcessing(im=self.add_pic(detailed_images))
  331. # 场景图--产品展示
  332. def deal_pic_6(self):
  333. detailed_images = []
  334. bg_image = PictureProcessing(r"{}\6.jpg".format(self.root))
  335. text_fill = (255, 255, 255)
  336. font_title = ImageFont.truetype(r"resources\ttf\puhui\Bold.ttf", 150)
  337. font_sub = ImageFont.truetype(r"resources\ttf\puhui\Regular.ttf", 50)
  338. text_title = self.get_text_value("细节标题-3")
  339. text_sub_title = self.get_text_value("细节副标题-3")
  340. pp_text_title = PictureProcessing().get_text_image_advanced(
  341. font=font_title,
  342. text=text_title,
  343. fill=text_fill,
  344. return_mode="min_image",
  345. )
  346. pp_text_sub_title = PictureProcessing().get_text_image_advanced(
  347. font=font_sub,
  348. text=text_sub_title,
  349. fill=text_fill,
  350. return_mode="min_image",
  351. )
  352. bg_image.paste_img(top_img=pp_text_title, base="en", value=(108, 158))
  353. bg_image.paste_img(top_img=pp_text_sub_title, base="en", value=(108, 578))
  354. goods_art_no_list = list(self.data.keys())
  355. _, pp_png = self.image_one_pic(
  356. return_orign=True,
  357. goods_art_no=goods_art_no_list[0],
  358. name="内里",
  359. )
  360. pp_png = pp_png.resize(value=bg_image.width * 2)
  361. bg_image.paste_img(top_img=pp_png, base="cs", value=(-pp_png.width / 3.5, 100))
  362. detailed_images.append(bg_image)
  363. return PictureProcessing(im=self.add_pic(detailed_images))
  364. # 场景图--产品展示
  365. def deal_pic_7(self):
  366. detailed_images = []
  367. top_image = PictureProcessing(r"{}\7.jpg".format(self.root))
  368. text_fill = (0, 0, 0)
  369. font_title = ImageFont.truetype(r"resources\ttf\puhui\Regular.ttf", 60)
  370. font_sub = ImageFont.truetype(r"resources\ttf\puhui\Regular.ttf", 40)
  371. detailed_images.append(top_image)
  372. goods_art_no_list = list(self.data.keys())
  373. for goods_info in goods_art_no_list:
  374. pp_jpg_1_list = []
  375. pp_png_1_list = []
  376. for goods_item in goods_art_no_list:
  377. pp_jpg, pp_png = self.image_one_pic(
  378. return_orign=True,
  379. goods_art_no=goods_item,
  380. name="俯视",
  381. )
  382. pp_jpg_1_list.append(pp_jpg)
  383. pp_png_1_list.append(pp_png)
  384. x, y = 0, 0
  385. pp_bg_jpg = PictureProcessing("RGB", (1600, 1600), (255, 255, 255))
  386. _resize_value = (
  387. top_image.width if len(pp_jpg_1_list) == 1 else top_image.width - 300
  388. )
  389. for index, pp_jpg in enumerate(pp_jpg_1_list):
  390. pp_jpg = pp_jpg.resize(value=_resize_value + 100 * index)
  391. pp_bg_jpg = pp_bg_jpg.to_overlay_pic_advance(top_img=pp_jpg, value=(x, y))
  392. x += 180
  393. y += 60
  394. x, y = 0, 0
  395. pp_bg_png = PictureProcessing("RGBA", (1600, 1600), (255, 255, 255, 0))
  396. for index, pp_png in enumerate(pp_png_1_list):
  397. pp_png = pp_png.resize(value=_resize_value + 100 * index)
  398. pp_bg_png = pp_bg_png.paste_img(top_img=pp_png, value=(x, y))
  399. x += 180
  400. y += 60
  401. min_bbox = pp_bg_png.getbbox()
  402. min_bbox = PictureProcessing().expand_bbox(min_bbox)
  403. pp_bg_jpg = pp_bg_jpg.crop(bbox=min_bbox)
  404. pp_bg_png = pp_bg_png.crop(bbox=min_bbox)
  405. pp_bg_1 = PictureProcessing(
  406. "RGB", (top_image.width, pp_bg_jpg.height), (255, 255, 255)
  407. )
  408. pp_bg_1 = pp_bg_1.to_overlay_pic_advance(
  409. top_img=pp_bg_jpg, top_png_img=pp_bg_png, base="cc"
  410. )
  411. pp_text_title = PictureProcessing().get_text_image_advanced(
  412. font=font_title,
  413. text="45°侧视/SIDE",
  414. fill=text_fill,
  415. return_mode="min_image",
  416. )
  417. pp_bg_1.paste_img(top_img=pp_text_title, base="cs", value=(0, 0))
  418. color_pic_list_1 = []
  419. pp_jpg_ceshi, pp_png_ceshi = self.image_one_pic(
  420. return_orign=True,
  421. goods_art_no=goods_item,
  422. name="侧视",
  423. )
  424. pp_jpg_hougen, pp_png_hougen = self.image_one_pic(
  425. return_orign=True,
  426. goods_art_no=goods_item,
  427. name="后跟",
  428. )
  429. pp_jpg_neili, pp_png_neili = self.image_one_pic(
  430. return_orign=True,
  431. goods_art_no=goods_item,
  432. name="内里",
  433. )
  434. pp_jpg_xiedi, pp_png_xiedi = self.image_one_pic(
  435. return_orign=True,
  436. goods_art_no=goods_item,
  437. name="鞋底",
  438. )
  439. pp_png_ceshi = pp_png_ceshi.resize(value=pp_bg_jpg.width / 3)
  440. text_image = PictureProcessing().get_text_image_advanced(
  441. font=font_sub,
  442. text="180°侧面/SIDE",
  443. fill=(0, 0, 0),
  444. return_mode="min_image",
  445. )
  446. backImage = PictureProcessing("RGB", (top_image.width/2, 400), (255, 255, 255))
  447. backImage.paste_img(top_img=text_image, base="cs", value=(0, 0))
  448. backImage.paste_img(top_img=pp_png_ceshi, base="cs", value=(0, 30))
  449. color_pic_list_1.append(backImage)
  450. pp_png_hougen = pp_png_hougen.resize(value=pp_bg_jpg.width / 4.5)
  451. text_image = PictureProcessing().get_text_image_advanced(
  452. font=font_sub,
  453. text="背面/BACK",
  454. fill=(0, 0, 0),
  455. return_mode="min_image",
  456. )
  457. backImage = PictureProcessing(
  458. "RGB", (top_image.width / 2, 400), (255, 255, 255)
  459. )
  460. backImage.paste_img(top_img=text_image, base="cs", value=(0, 0))
  461. backImage.paste_img(top_img=pp_png_hougen, base="cs", value=(0, 30))
  462. color_pic_list_1.append(backImage)
  463. pp_png_neili = pp_png_neili.resize(value=pp_bg_jpg.width / 3)
  464. text_image = PictureProcessing().get_text_image_advanced(
  465. font=font_sub,
  466. text="鞋面/VAMP",
  467. fill=(0, 0, 0),
  468. return_mode="min_image",
  469. )
  470. backImage = PictureProcessing(
  471. "RGB", (top_image.width / 2, 400), (255, 255, 255)
  472. )
  473. backImage.paste_img(top_img=text_image, base="cs", value=(-10, 0))
  474. backImage.paste_img(top_img=pp_png_neili, base="cs", value=(-10, 30))
  475. color_pic_list_1.append(backImage)
  476. pp_png_xiedi = pp_png_xiedi.resize(value=pp_bg_jpg.width / 3)
  477. text_image = PictureProcessing().get_text_image_advanced(
  478. font=font_sub,
  479. text="鞋底/BOTTOM",
  480. fill=(0, 0, 0),
  481. return_mode="min_image",
  482. )
  483. backImage = PictureProcessing(
  484. "RGB", (top_image.width / 2, 400), (255, 255, 255)
  485. )
  486. backImage.paste_img(top_img=text_image, base="cs", value=(0, 0))
  487. backImage.paste_img(top_img=pp_png_xiedi, base="cs", value=(0, 30))
  488. color_pic_list_1.append(backImage)
  489. all_color_pp = PictureProcessing(
  490. "RGB", (top_image.width, 1600), (255, 255, 255)
  491. ).horizontal_distribution(
  492. color_pic_list_1,
  493. bg_width=top_image.width,
  494. line_spacing=10,
  495. number_per_row=2,
  496. )
  497. detailed_images.append(pp_bg_1)
  498. detailed_images.append(all_color_pp)
  499. bottomImage = PictureProcessing(
  500. "RGB", (top_image.width, 200), (255, 255, 255)
  501. )
  502. detailed_images.append(bottomImage)
  503. return PictureProcessing(im=self.add_pic(detailed_images))
  504. # # 添加注意事项
  505. def deal_pic_8(self):
  506. detailed_images = []
  507. detailed_images.append(PictureProcessing(r"{}\10.jpg".format(self.root)))
  508. return PictureProcessing(im=self.add_pic(detailed_images))