1
0
Files
PPTX/tests/e2e/test_invalid_params.yaml
lanyuanxiaoyao 19d6661381 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 模式
2026-03-04 10:29:21 +08:00

20 lines
413 B
YAML

metadata:
title: "无效参数测试"
size: "16:9"
dpi: 96
slides:
- elements:
# 无效的 fit 值
- type: image
src: "../fixtures/images/test_image.png"
box: [1, 1, 3, 2]
fit: invalid_mode
# 无效的背景色
- type: image
src: "../fixtures/images/test_image.png"
box: [5, 1, 3, 2]
fit: contain
background: "not-a-color"