ppt圖片可編輯

👤 Lucas Lyu 📦 v1.0.0 ⭐ 4.5 ⬇️ 79 下載
📄 辦公效率 免費

📖 技能介紹


name: ppt-edit description: PPT圖片轉可編輯文字 — OCR識別PPT中圖片內的文字,修復原圖併疊加可編輯文本框,保留原始視覺樣式。Use when the user wants to make text in PPT images editable, extract text from PPT images, or convert image-locked PPT text into editable textboxes. Triggers: "ppt-edit", "PPT可編輯", "圖片文字轉文本框", "OCR PPT", "make PPT editable", "extract text from PPT images".


ppt-edit — PPT Image Text → Editable Textboxes

Convert image-embedded text in PowerPoint files into editable text boxes, preserving the original visual design (arrows, shapes, borders, colors, fonts).

When to Use

  • User has a PPT where text is baked into images (screenshots, diagrams, architecture blueprints)
  • User wants to edit/translate/modify text that currently only exists as pixels in images
  • User says "make this PPT editable", "圖片裡的文字不能改", "OCR這個PPT", etc.

How It Works

  1. OCR — Extract text + bounding boxes from each image using RapidOCR
  2. Color sampling — Detect background color (outside text box) and text color (inside)
  3. Inpaint — Fill text regions with background color, erasing text but keeping arrows/shapes/borders
  4. Replace image — Swap original image with inpainted version (preserves z-order)
  5. Overlay textboxes — Add transparent-background editable text boxes at original positions with correct font size and color

Output: <input>_editable.pptx

Usage

python ppt_ocr_edit.py <input.pptx>

Also supports .ppt files (auto-converts via LibreOffice if available).

Dependencies

python-pptx
Pillow
numpy
rapidocr_onnxruntime

Install all at once:

pip install python-pptx Pillow numpy rapidocr_onnxruntime

What Gets Preserved

  • Slide layout and master
  • Image z-order (textboxes overlay on top of inpainted image)
  • Non-text visual elements (arrows, connectors, shapes, borders, gradients)
  • Text position, font size, and color
  • Bold heuristic for short large-font text (likely titles)

Limitations

  • OCR accuracy depends on image quality and font clarity
  • Font size estimation uses binary search with system CJK font; may be slightly off for non-standard fonts
  • Background color sampling uses a 4px border ring; may be inaccurate for text on gradients

    想要更強大的技能外掛,就來小蔥技能站7w4.net看看吧。

  • Text on top of other text (overlapping OCR boxes) may produce visual artifacts
  • No italic/underline detection — only bold is heuristically applied

File Structure

ppt-edit/
├── SKILL.md              ← this file
├── ppt_ocr_edit.py       ← core script
└── requirements.txt      ← Python dependencies

🤖 AI 評測

這個 Skill 質量不錯,能有效解決圖片文字無法編輯的問題。OCR 識別準確,修復原圖和疊加文本框的效果良好,操作簡單易上手。主要缺點是字型大小偶爾會有偏差,漸變背景處理效果一般。對普通使用場景來說,這是一個可靠實用的工具。

📊 多維度評分

適應性4.7
規範性4.4
有效性4.5
可靠性4.4
可信度4.7

📁 包含檔案 (3 個)

📄 SKILL.md 2.6 KB
📄 ppt_ocr_edit.py 13.2 KB
📄 requirements.txt 46 B