fix: 修复保存路径解析逻辑,统一使用 resolve() 处理 saveto 参数
This commit is contained in:
@@ -116,7 +116,7 @@ def PPT_longPic(
|
|||||||
new_img = img.resize((nwidth, nheight), resample=Image.Resampling.LANCZOS)
|
new_img = img.resize((nwidth, nheight), resample=Image.Resampling.LANCZOS)
|
||||||
canvas.paste(new_img, box=(0, (i - 1) * nheight))
|
canvas.paste(new_img, box=(0, (i - 1) * nheight))
|
||||||
|
|
||||||
filepath = pptFile.parent if Path(saveto) == Path(".") else Path(saveto)
|
filepath = Path(saveto).resolve()
|
||||||
if saveName:
|
if saveName:
|
||||||
if Path(saveName).suffix:
|
if Path(saveName).suffix:
|
||||||
canvas.save(filepath / saveName)
|
canvas.save(filepath / saveName)
|
||||||
|
|||||||
Reference in New Issue
Block a user