diff --git a/py-src/ad_ppt_to_img.py b/py-src/ad_ppt_to_img.py index 7fd0b54..860f2d2 100644 --- a/py-src/ad_ppt_to_img.py +++ b/py-src/ad_ppt_to_img.py @@ -33,7 +33,7 @@ def ppt_to_png(filename, ad_img_path): powerpoint = init_powerpoint() if filename.endswith(".ppt") or filename.endswith(".pptx"): - downLoad_path = os.path.join(ad_img_path, os.path.splitext(os.path.basename(filename))[0]) + downLoad_path = os.path.join(ad_img_path) ppt2png(filename, downLoad_path, powerpoint) powerpoint.Quit() # 退出PowerPoint diff --git a/src/ad_img_merge.js b/src/ad_img_merge.js index e5d546d..9a2acf2 100644 --- a/src/ad_img_merge.js +++ b/src/ad_img_merge.js @@ -9,6 +9,12 @@ if (!exportAdImg.pptPath) { return; } +//解压后输出文件夹 +const desktopPath = `${getDesktopPath()}/adImg`; +if (!fs.existsSync(desktopPath)) { + fs.mkdirSync(desktopPath); +} + async function stitchImages(imagePaths, outputName) { // 处理剩余的图片 const imagesInfo = await Promise.all(