| name | image-to-editable-ppt |
| description | Convert screenshots, imagegen storyboard slides, raster diagrams, posters, UI mockups, or other bitmap layouts into element-level editable PowerPoint decks. Use when Codex must decompose an image into separate PPT elements: editable text/numbers/simple shapes where practical, complete crop-safe picture objects for stylized icons/figures/photos/logos, preserved relative positions, rendered preview comparison, and retry fixes. |
Image To Editable PPT
Core Contract
Convert a raster image into an element-level editable PowerPoint slide. Element-level editable means the final PPT is not a full-slide screenshot and not a few broad crops. It is made from separate logical elements that can be edited, moved, resized, reordered, replaced, or cropped independently.
Preferred pattern for imagegen storyboard slides: keep ordinary text and simple geometry native, crop only meaningful visual assets as named objects, and record every crop in an inventory with source_bbox, display_bbox, role, padding, and cleanup notes. Do not use dense anonymous segmentation that turns one slide into hundreds of tiny picture fragments.
Use the best representation for each element:
- Rebuild only the simplest ordinary elements as native PPT: text/numbers, simple straight lines, and simple boxes/rounded boxes.
- Crop everything else as independent picture objects: stylized icons, pictograms, robots, illustrations, logos, decorative marks, styled arrows, badges, complex panels, figures, charts, plots, tables, screenshots, photos, dense diagrams, heatmaps, trajectory maps, and 3D scenes.
- Keep each meaningful element separate. Do not merge neighboring text, icons, cards, arrows, or figures into a large section crop unless they are genuinely inseparable.
Default to one one-slide .pptx per input image. Do not place the whole source image as a flattened slide background unless the user explicitly asks for a temporary trace or comparison slide.
The first generated PPTX is only a draft. Final delivery requires rendered preview comparison, object audit, and fixes for clipping, missing elements, OCR errors, broad crops, generic icon substitutions, or visible drift.
Workflow
- Create an output folder beside the input images, with one subfolder per source image for cropped picture assets and a manifest.
- Measure the source image at original pixel size. Use its aspect ratio as the slide aspect ratio unless the user provides a target size.
- Inventory every visible element in reading/z-order:
- editable text candidates: titles, numbers, labels, body text, captions, legends, footers, callouts, and annotations;
- editable shape candidates: only simple non-stylized straight lines, simple dividers, simple boxes, and simple rounded boxes;
- picture crop candidates: all icons, pictograms, robots, logos, illustrations, styled arrows, badges, complex cards/panels, charts, plots, tables, screenshots, photos, source figures, dense diagrams, trajectory maps, heatmaps, 3D scenes, and visually rich marks.
- For picture crops, write a crop inventory before building the PPTX. Use names such as
model_brain, tools, road_rocket, not generic segment_042. Record file, source_bbox, display_bbox, role, padding, and cleanup needs.
- Prepare a conversion manifest using
references/reconstruction-manifest.md and pixel coordinates from the source image.
- Build the PPTX with
scripts/build_editable_pptx.py when possible.
- Render or inspect the PPTX with available PowerPoint, LibreOffice, Presentations, or equivalent tooling. Compare the rendered preview against the source image.
- Fix the crop inventory and manifest, then rerun until blocking defects are gone.
Manifest Method
Use references/reconstruction-manifest.md when preparing a manifest or using the helper script. The file name is historical; in this workflow it is a conversion manifest.
Minimal run pattern:
python scripts/build_editable_pptx.py path/to/manifest.json
The manifest uses pixel coordinates from the source image. The script maps them to slide coordinates, creates native shapes/text where specified, crops image/icon assets from the source image, and emits a one-slide .pptx.
Element Conversion Rules
- Preserve relative positions first, then visual styling. Pixel-accurate geometry matters more than choosing the exact original font.
- Keep ordinary text and numbers native when practical. Proofread OCR against the image and fix line breaks, wrapping, font size, and alignment.
- Rebuild only plain boxes, rounded boxes, simple straight lines, and simple dividers as editable shapes.
- Crop arrows/connectors by default unless they are extremely simple plain lines that can be reproduced without visible drift.
- Preserve stylized icons as picture objects cropped from the original image. Do not substitute them with generic icon libraries or redraw approximations unless the user explicitly asks.
- Crop charts, plots, and tables by default as independent complete figure objects. Only rebuild them as editable objects when the user explicitly asks for native chart/table editability.
- Use meaningful named crops for visual assets. Avoid anonymous dense fragment sets unless the user explicitly asks for pure raster slicing.
- Maintain z-order by appending background shapes first, then figure/icon crops, then native text and any overlays.
- Use the original image only as source material and QA reference. The final slide must not depend on a full-slide screenshot layer.
Crop Rules
Crop completeness is mandatory:
- Crop priority is completeness first, cleanliness second, tightness third.
- No visible content may be cut off: letters, icons, strokes, arrows, shadows, glows, antialiasing, circular outlines, borders, legends, axes, labels, figure edges, and colorbars must all remain complete.
- Use one crop per separable icon, logo, robot, pictogram, photo, screenshot, source figure, dense plot, or stylized mark.
- Add safety padding for soft shadows, antennae, arrows, circular badges, antialiased strokes, glow, and nearby figure labels. Typical padding is 4-12 px, but use more when needed.
- Use asymmetric padding when an icon sits next to a text block or another visual element.
- If padding captures neighboring content, use
source_bbox for the crop and bbox for the display footprint, split the objects, or adjust crop bounds. Do not accept clipped crops.
- Crops must not visually overlap unrelated neighboring content in the final preview. Overlap is allowed only when the source image itself has intentional layering, shadow, or glow overlap.
- Text should not remain inside an icon crop unless it is part of a logo, screenshot, source figure, plot axis, legend, or inseparable visual mark.
- Do not use a large picture object to replace a slide panel, card group, flowchart section, or diagram region when that region contains separable text, icons, arrows, labels, cards, or simple shapes.
Mandatory QA And Retry Gate
Do not treat the first manifest or first .pptx as final. For each input image:
- Generate the manifest and PPTX.
- Render a full-size preview.
- Compare preview against the original image.
- Audit the element model: text count, shape count, picture count, largest picture crops, and whether any crop is acting like a slide background.
- Fix the manifest and rerun when there is a blocking defect.
Blocking defects:
- full-slide or broad screenshot crop used as the slide structure;
- missing ordinary text, number, label, card, callout, arrow, divider, icon, figure, or visible visual element;
- clipped icon, logo, robot, arrow, circular outline, shadow, glow, antialiasing, text, legend, axis label, colorbar, border, or figure edge;
- unrelated crop overlap, duplicated crop residue, or crop padding that visibly covers neighboring elements;
- stylized icon redrawn, replaced with a generic symbol, or simplified;
- multiple separable icons bundled into one crop;
- hundreds of anonymous tiny crop fragments used instead of meaningful named crops;
- ordinary text trapped inside a broad crop when it can be native editable text;
- OCR text visibly wrong or line breaks causing unwanted overflow when native text is used;
- chart/table/figure cropped too tightly and cuts internal labels, axes, legends, title, caption, annotations, or colorbar;
- chart/table/figure rebuilt natively when the user did not explicitly request native chart/table editability;
- layout, scale, z-order, spacing, color, or density visibly drifts from the source image.
When a blocking defect appears, adjust bbox, source_bbox, crop padding, text boxes, shape geometry, z-order, or element splitting and rerun the build. Do not solve failures by inserting the whole image or a larger section crop.
Verification Checklist
- One
.pptx exists for each input image.
- The slide size matches the source aspect ratio or requested target.
- The deck is element-level editable: text and only the simplest line/box shapes may be native objects; all other visual elements are independent picture objects.
- A crop inventory exists when the slide uses picture crops, and crop filenames/roles describe their meaning.
- No full-slide image or broad crop acts as the slide structure.
- Each separable icon/logo/photo/source figure is its own picture object unless explicitly rebuilt.
- Cropped icons are not clipped at edges; shadows, antennae, arrows, circular outlines, and antialiased strokes remain intact.
- Cropped charts/figures/screenshots are not clipped; internal text, axis labels, tick labels, legends, annotations, colorbars, titles, borders, and shadows remain intact.
- Ordinary slide titles, explanations, numbers, labels, card text, and callouts are editable text where practical. They must not be hidden in broad image crops.
- Crops do not unintentionally overlap, cover, duplicate, or clip neighboring elements.
- Relative positions and z-order match the original image.
- Rendered preview has no clipped text, unexpected wrapping, missing crops, shifted elements, or generic icon substitutions.