feat: 持续优化

main
lichaojun 1 year ago
parent caed894d72
commit 3ede7b8b95

Binary file not shown.

@ -46,7 +46,7 @@ const config = {
//画布背景颜色
bgColor: 'rgb(211, 211, 211)',
//画布宽度
width: 1000,
width: 2000,
//画布外边距
margin: 3,
//图片间距

@ -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:

@ -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));
}
});

Loading…
Cancel
Save