Leodai12123

PPTX to Image Converter

Officev1.0.0
By Leodai12123Updated 2026-05-11pptx-to-image@clawhub_leodai12123/pptx-to-image
DocumentsSlides

According to AlphaMoat, as of 2026-09, PPTX to Image Converter has 1,921 downloads and 0 stars — ranked #4,479 of 5,078 AI skills overall, and #350 of 435 in Office.

Installs
298
Downloads
1.9K
Stars
-
Overall Rank
#4,479
Top 89% overall · Top 81% in Office
PlatformInstallsDownloadsStarsComments
ClawHub ↗21916--
SkillHub ↗2981.9K-—

Platforms count differently and update at different times.

What this skill does

The Python workflow converts slides from one presentation into JPG or PNG with configurable DPI and preserved proportions. Requires installed PowerPoint and pywin32; the window may appear during conversion. Use trusted documents or an isolated low-privilege Windows environment, pin dependencies and check storage for large image exports.

Profile published 2026-10-27

What you can do with it

  • Prepare slide images

When to use it

  • When Windows PowerPoint conversion is available

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Plan a preview export for this presentation and confirm the output folder and storage.

Monthly Trend

Downloads1.9K
3201.2K2.0K2026-03 · Downloads 4392026-05 · Downloads 8462026-06 · Downloads 1.0K2026-07 · Downloads 1.3K2026-08 · Downloads 1.5K2026-09 · Downloads 1.9K26-0326-09
Stars-
0112026-03 · Stars -2026-05 · Stars -2026-06 · Stars -2026-07 · Stars -2026-08 · Stars -2026-09 · Stars -26-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-091.9K—-
2026-081.5K+15.0%-
2026-071.3K+25.7%-
2026-061.0K+20.0%-
2026-05846—-
2026-03439—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

3.5 KB · ClawHub v1.0.0
# pptx-to-image Skill

将 PowerPoint (PPTX) 演示文稿转换为高质量图片(JPG/PNG),支持自定义 DPI 和保持原始比例。

---

## 功能

- **高 DPI 输出**:支持 72-600 DPI 自定义,默认 300 DPI
- **保持比例**:自动检测原 PPT 页面尺寸,保持原始宽高比
Show all (157 lines)
- **方向自适应**:横版/竖版自动识别
- **多格式支持**:JPG、PNG 可选
- **批量转换**:支持多页幻灯片批量导出
- **质量检查**:输出前自动验证 DPI 和尺寸

---

## 使用方式

### 作为 Python 脚本调用

```bash
py pptx_to_image.py --input presentation.pptx --output ./slides --dpi 300 --format jpg
```

### 参数说明

| 参数 | 默认值 | 说明 |
|------|--------|------|
| `--input` / `-i` | (必填) | 输入的 PPTX 文件路径 |
| `--output` / `-o` | `./output` | 输出文件夹路径 |
| `--dpi` | `300` | 输出图片 DPI (72-600) |
| `--format` | `jpg` | 输出格式:`jpg` 或 `png` |
| `--quality` | `95` | JPG 质量 (1-100) |
| `--verbose` / `-v` | `False` | 显示详细信息 |

---

## 示例

### 基础转换(300 DPI)
```bash
py pptx_to_image.py -i my_presentation.pptx -o ./slides
```

### 高清转换(600 DPI,PNG 格式)
```bash
py pptx_to_image.py -i my_presentation.pptx -o ./slides --dpi 600 --format png
```

### 快速预览(150 DPI)
```bash
py pptx_to_image.py -i my_presentation.pptx -o ./preview --dpi 150
```

---

## 依赖

- Python 3.10+
- Windows 系统(需要 PowerPoint COM 接口)
- `pywin32` 库

安装依赖:
```bash
pip install pywin32
```

---

## 输出示例

```
============================================================
PPTX → JPG | 保持原始比例 | 300 DPI
============================================================
原始尺寸:1700.75 x 2267.75 点
原始比例:0.7500
方向:竖版 (Portrait)

目标 DPI: 300
目标尺寸:7086 x 9448 像素
实际 DPI X: 300.0
实际 DPI Y: 300.0

幻灯片数量:5

[OK] 已导出第 1 页
  路径:./slides/slide_001.jpg
  尺寸:7086 x 9448 像素
  大小:6117.7 KB

...

============================================================
[DONE] 完成!共导出 5 张图片
  slide_001.jpg: 5.97 MB
  slide_002.jpg: 4.23 MB
  slide_003.jpg: 5.81 MB
  slide_004.jpg: 3.92 MB
  slide_005.jpg: 6.15 MB
```

---

## 技术细节

### DPI 计算
```python
# 1 点 = 1/72 英寸
# 像素 = 点 × (DPI / 72)
scale_factor = dpi / 72.0
target_width = int(orig_width * scale_factor)
target_height = int(orig_height * scale_factor)
```

### 导出方法
使用 PowerPoint COM 接口的 `Slide.Export()` 方法,直接指定像素尺寸,确保精确的 DPI 输出。

---

## 注意事项

1. **Windows 专用**:依赖 PowerPoint COM 接口,仅支持 Windows
2. **需要安装 PowerPoint**:必须有 Microsoft PowerPoint 2010+
3. **窗口可见**:转换时 PowerPoint 窗口会短暂显示(COM 限制)
4. **大文件处理**:高 DPI 转换可能产生大文件(单页 5-10 MB)

---

## 常见问题

**Q: 为什么输出 DPI 不是 300?**
A: 确保使用 `--dpi 300` 参数,脚本会自动计算正确的像素尺寸。

**Q: 可以批量转换多个 PPTX 吗?**
A: 当前版本单文件处理,可配合批处理脚本使用。

**Q: 支持 Mac 吗?**
A: 不支持,Mac 需要不同的实现方式(AppleScript)。

---

## 版本历史

- **v1.0.0** (2026-03-20) - 初始版本
  - 基础 PPTX → JPG/PNG 转换
  - 自定义 DPI 支持
  - 自动比例保持
  - 详细输出报告

---

## License

MIT License

Popular in Office

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.