Not "insert picture into a slide". Image2PPT OCRs your image, then rebuilds it as a real, editable
.pptx— text becomes editable text boxes (original font size & color preserved), and non-text areas (charts, photos, icons, colored blocks) become draggable picture modules. Every block can be moved, resized, and edited in PowerPoint/Keynote/WPS.
Slides are meant to be edited. But when your content lives inside a screenshot, a UI mockup, an infographic, or a scanned page, it's frozen pixels. Image2PPT breaks that frozen image back into real PowerPoint objects:
- 🔤 Real text, not pictures of text — OCR extracts each text line and writes it as a genuine editable text box.
- 🎯 Faithful reconstruction — original font size, color, and position are recovered, so the slide looks like the source.
- 🧩 Draggable picture modules — charts, photos, icons, and color blocks are sliced into independent, movable picture shapes.
- 🧠 Conservative text grouping — only same-size, same-aligned, same-color adjacent lines merge, so you never get one giant mixed blob.
- 🪄 Nothing lost — the whole image is kept as a clean base layer (OCR text is inpainted out), guaranteeing 100% visual fidelity.
- 🌐 High-accuracy OCR — powered by RapidOCR (ONNX), strong on both Chinese and English.
- 🖱️ Zero-friction UX — drag & drop web UI, batch conversion, one-click download. Or use it as a CLI / library.
| OCR engine | RapidOCR (ONNX) — Chinese + English |
| Output | Native .pptx (editable text + pictures) |
| Text fidelity | Font size, color, and position preserved |
| Picture modules | Connected-component slicing → draggable shapes |
| UI | Local web app (Flask + drag & drop), batch mode |
| Library | converter.convert(image, pptx) |
| Packaging | One-click Windows .exe (no Python needed) |
| Platform | Source runs anywhere Python 3.10+ runs |
- Go to Releases and download
Image2PPT-win64.zip. - Unzip anywhere.
- Double-click
image2ppt.exe— a browser tab opens automatically.
git clone https://github.com/dlinjiade-debug/Image2PPT.git
cd Image2PPT
pip install -r requirements.txt
python app.py # opens the web UI at http://127.0.0.1:5000Build a standalone Windows executable (Windows only):
python build_exe.py # produces image2ppt/image2ppt.exeWeb UI — open the app, drag in one or more images (PNG / JPG / BMP / WEBP), click Convert, then download the generated .pptx. Each image becomes its own presentation.
Command line / library
# CLI
python converter.py input.png output.pptx
# Library
from converter import convert
summary = convert("input.png", "output.pptx")
print(summary["text_blocks"], summary["image_modules"])Open the resulting .pptx in PowerPoint, WPS, or Keynote — every text box and picture is a normal, editable object.
- OCR — RapidOCR detects text and returns each line with its polygon and script.
- Inpaint — detected text is removed from the original image, leaving a clean base layer.
- Cluster — text lines are grouped conservatively (same size + alignment + color) into editable text boxes with recovered font size and color.
- Slice — remaining content goes through connected-component analysis; large non-text regions become draggable picture modules.
- Compose — the base image, editable text, and picture modules are layered into a single
.pptx.
See assets/pipeline.svg for the visual flow.
Image2PPT/
├── app.py # Flask web UI (drag & drop, batch, download)
├── converter.py # Core engine: OCR → inpaint → cluster → slice → pptx
├── build_exe.py # One-click Windows executable builder
├── templates/ # Web UI template
├── assets/pipeline.svg # Architecture diagram
├── examples/ # Sample input + generated .pptx
├── requirements.txt
└── LICENSE
- Screenshots, UI mockups, and text-rich infographics convert best.
- Higher resolution + clear contrast = better OCR.
- For a long image that packs many pages, crop it into single pages first.
- Multi-page / long-image auto-split into multiple slides
- Table-structure recovery
- Layout beautification (smart alignment & spacing)
- Prebuilt packages for Linux & macOS
Pull requests and issues are welcome! For large changes, please open an issue first to discuss direction.
Released under the MIT License. OCR models are provided by RapidOCR (Apache-2.0).