Use this skill to convert flat visual drafts into editable .pptx. The core design is "first form a structured manifest, then generate the PPTX with a script."
- Binary image input: Codex is responsible for recognizing the layout, text and components; by default it calls the
imagegenskill to generate or clean component images such as backgrounds, decorations, products, charts; text should be restored as PowerPoint text boxes as much as possible. - HTML/SVG input: prioritize parsing the code structure into native PPT elements; complex nodes are then downgraded to image components.
- All intermediate images, manifests, diagnostics and outputs must be placed in this skill's
projects/YYYYMMDD_slug/directory.
Codex default strategy
When processing binary images such as PNG/JPEG/WebP in Codex, follow this order by default:
- Use Codex visual capabilities to observe the source image, and list the slide size, background, title, body text, icons, photos, charts, decorations, shadows, masks and other objects.
- For editable text, write it directly into the manifest's
textelements; do not make the text only into an image. - For backgrounds, photos, icons, complex illustrations, charts, textures, and backgrounds that need to be completed after occlusion, use the
imagegenskill to generate, clean or rebuild independent component images. - Copy the images generated by
imagegeninto the current project directory'simagegen_assets/orcomponent_images/; do not let the project depend on$CODEX_HOME's temporary output. - Write
manifest.json, and usescripts/image2pptx.py buildto generate the PPTX. - Verify that the PPTX can be reopened with
python-pptx, and record the number of layers/text/images and known limitations.
If the user explicitly requests "no redrawing" or "keep the original image pixels", you can use the original image crop or a full-canvas transparent PNG as the component image; but by default you should still use Codex imagegen capabilities to assist with background cleanup, filling in missing areas, and component cleanup.
Project directory conventions
Create a separate project directory for each conversion:
bggg-creator-image2ppt/
└── projects/
└── YYYYMMDD_slug/
├── original_inputs/
├── component_images/
├── imagegen_assets/
├── diagnostics/
├── manifest.json
├── output.pptx
├── summary.json
└── process_notes.md
Initialization:
python3 bggg-creator-image2ppt/scripts/init_project.py pitch_deck \
--source /path/to/reference.png \
--date 20260504
Binary image to PPTX workflow
-
Initialize the project, copy the source image to
original_inputs/。 -
Recognize the page structure:
- Canvas aspect ratio and approximate size.
- Whether the background is solid color, gradient, photo or a complex illustration.
- The content, position, font size, color, weight, and alignment of each text segment.
- The boundaries, hierarchy, and whether a transparent background is needed for component images.
-
By default use
imagegento generate or edit components:- Background: full canvas, no text, no foreground components.
- Photos/products/people/icons/complex decorations: clean edges, transparent background when necessary.
- Charts: if they can be rebuilt natively, use shapes and text; complex charts can first be made into image components.
-
Place the component images into
component_images/orimagegen_assets/。 -
Write the manifest, with elements sorted from bottom to top.
-
Run:
python3 bggg-creator-image2ppt/scripts/image2pptx.py build \ --manifest bggg-creator-image2ppt/projects/YYYYMMDD_slug/manifest.json \ --output bggg-creator-image2ppt/projects/YYYYMMDD_slug/output.pptx \ --summary bggg-creator-image2ppt/projects/YYYYMMDD_slug/summary.json -
Write
process_notes.md, explaining whether imagegen is used, which objects are editable text, and which objects are image fallbacks.
HTML/SVG to PPTX workflow
When HTML/SVG is a PPT in code form, prioritize the parser:
python3 bggg-creator-image2ppt/scripts/html_svg_to_manifest.py input.svg \
--output bggg-creator-image2ppt/projects/YYYYMMDD_slug/manifest.json
python3 bggg-creator-image2ppt/scripts/html_svg_to_manifest.py input.html \
--output bggg-creator-image2ppt/projects/YYYYMMDD_slug/manifest.json
Parsing principles:
- Native restoration
text、rect、ellipse、line, simple images. - In HTML, absolutely positioned
.slide/bodyelements are the easiest to convert accurately. - SVG's complex
path, filters, gradients, mask, clip-path, foreignObject can be written to diagnostics and use imagegen or externally rendered results as image component fallback. - After the parsing script generates the manifest, still use
image2pptx.py buildto generate the final PPTX.
Manifest format
The manifest is a cross-source intermediate layer. Coordinates default to source canvas pixels, and the script maps them to PowerPoint dimensions.
{
"deck": {
"canvas_width": 1600,
"canvas_height": 900,
"slide_width_in": 13.333,
"name": "Example Deck"
},
"slides": [
{
"name": "Cover",
"elements": [
{
"kind": "background",
"fill": "#f7f4ec"
},
{
"kind": "image",
"name": "Hero Product",
"file": "component_images/product.png",
"x": 910,
"y": 170,
"w": 520,
"h": 520,
"fit": "contain"
},
{
"kind": "text",
"name": "Title",
"text": "Walk With Intention",
"x": 120,
"y": 180,
"w": 680,
"h": 150,
"font_size_px": 68,
"font_family": "Arial",
"bold": true,
"color": "#17120d",
"align": "left"
}
]
}
]
}
Common elements:
background:fillsolid color orfilebackground image.image:file/path/src、x、y、w、h、fit。fitsupportsstretch、contain、cover。text:text、x、y、w、h、font_size_pxorfont_size_pt、font_family、color、bold、italic、align。shape:shapeisrect、roundRect、ellipseorline; supportsfill、stroke、stroke_width_px。table: simple table fallback, usingrowsarray to generate a native PPT table.
Editability priority
- Text boxes: titles, body text, page numbers, labels, and button text are all prioritized for conversion to native PPT text.
- Basic shapes: rectangles, rounded rectangles, circles, and lines are prioritized for conversion to PPT shapes.
- Image components: photos, illustrations, icons, textures, and complex charts as independent image layers.
- Full-page background fallback: when it cannot be cleanly split, a base image can be retained, then key text and components can be overlaid as editable objects, and the limitations clearly stated.
Output requirements
When delivering, at least explain:
- Project directory path.
- PPTX path.
- manifest and summary paths.
- Number of editable text boxes, number of image components, number of shapes.
- Which components were generated or cleaned up by Codex imagegen.
- Which complex objects were downgraded to image fallbacks.