feat: 添加图片适配模式支持
- 支持四种图片适配模式:stretch、contain、cover、center - 支持背景色填充功能(contain 和 center 模式) - 支持文档级 DPI 配置(metadata.dpi) - PPTX 渲染器集成 Pillow 实现高质量图片处理 - HTML 渲染器使用 CSS object-fit 实现相同效果 - 添加完整的单元测试、集成测试和端到端测试 - 更新 README 文档和架构文档 - 模块化设计:utils/image_utils.py 图片处理工具模块 - 添加图片配置验证器:validators/image_config.py - 向后兼容:未指定 fit 时默认使用 stretch 模式
This commit is contained in:
@@ -194,7 +194,7 @@ def handle_convert(args):
|
||||
|
||||
# 2. 创建 PPTX 生成器
|
||||
log_info(f"创建演示文稿 ({pres.size})...")
|
||||
generator = PptxGenerator(pres.size)
|
||||
generator = PptxGenerator(pres.size, pres.dpi)
|
||||
|
||||
# 3. 渲染所有幻灯片
|
||||
slides_data = pres.data.get('slides', [])
|
||||
|
||||
Reference in New Issue
Block a user