diff --git a/assets/批量修改母版.xlsm b/assets/批量修改母版.xlsm index bad2679..5efdfae 100644 Binary files a/assets/批量修改母版.xlsm and b/assets/批量修改母版.xlsm differ diff --git a/config/index.js b/config/index.js index 33f5e0e..eb93b17 100644 --- a/config/index.js +++ b/config/index.js @@ -46,7 +46,7 @@ const config = { //画布背景颜色 bgColor: 'rgb(211, 211, 211)', //画布宽度 - width: 1000, + width: 2000, //画布外边距 margin: 3, //图片间距 diff --git a/py-src/del_copyright_img.py b/py-src/del_copyright_img.py index 4679e6b..8371db1 100644 --- a/py-src/del_copyright_img.py +++ b/py-src/del_copyright_img.py @@ -60,9 +60,16 @@ def remove_copyright_images(pptx_path, copyright_image_paths): # 定义要替换的关键字数组 replace_text_keywords = ["第一PPT"] # 定义要删除的关键字符数组(只删除文本框) - del_text_keywords = ["Speaker name and title", "OfficePLUS", "Presenter name", "www.officeplus.cn", "第一PPT模板网-WWW.1PPT.COM"] + del_text_keywords = [ + "Speaker name and title", + "OfficePLUS", "Presenter name", + "www.officeplus.cn", + "第一PPT模板网-WWW.1PPT.COM", + "标题字体来源于字魂网,未经授权不可商用", + "以上字体来源字魂网,未经授权不得商用" + ] # 定义要删除的关键字符数组(删除整页幻灯片) - del_text_keywords_slide = ["模板中使用的字体为开源字体","一站式办公内容服务平台"] + del_text_keywords_slide = ["模板中使用的字体为开源字体","一站式办公内容服务平台", "欢迎关注OfficePLUS官方渠道"] # 遍历所有幻灯片母版 # for sld_mstr in prs.slide_masters: diff --git a/src/img_merge.js b/src/img_merge.js index b6d040d..a475884 100644 --- a/src/img_merge.js +++ b/src/img_merge.js @@ -49,7 +49,7 @@ async function stitchImages(imagePaths, { row, bgColor, width, margin, padding } create: { width: totalWidth, height: totalHeight, - channels: 3, + channels: 4, background: bgColor, }, }) @@ -96,7 +96,7 @@ fs.readdirSync(merageImgDir, { withFileTypes: true }).forEach((imgDir) => { return numA - numB; // 按数字排序 }); - const outputName = path.join(previewDir, `${imgDir.name}.png`); + const outputName = path.join(previewDir, `${imgDir.name}.jpg`); stitchPromises.push(stitchImages(sortImagePaths, merge, outputName)); } });