SuperAPI AI Directory

bggg-creator-image2ppt

Design & creation

View repository

Updated 10-15 20:06

About this skill

BGGG Creator Image2PPT

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 imagegen skill 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:

  1. 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.
  2. For editable text, write it directly into the manifest's text elements; do not make the text only into an image.
  3. For backgrounds, photos, icons, complex illustrations, charts, textures, and backgrounds that need to be completed after occlusion, use the imagegen skill to generate, clean or rebuild independent component images.
  4. Copy the images generated by imagegen into the current project directory's imagegen_assets/ or component_images/; do not let the project depend on $CODEX_HOME 's temporary output.
  5. Write manifest.json, and use scripts/image2pptx.py build to generate the PPTX.
  6. 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

  1. Initialize the project, copy the source image to original_inputs/。

  2. 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.
  3. By default use imagegen to 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.
  4. Place the component images into component_images/ or imagegen_assets/。

  5. Write the manifest, with elements sorted from bottom to top.

  6. 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
    
  7. 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/body elements 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 build to 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: fill solid color or file background image.
  • image: file/path/src、x、y、w、h、fit。fit supports stretch、contain、cover。
  • text: text、x、y、w、h、font_size_px or font_size_pt、font_family、color、bold、italic、align。
  • shape: shape is rect、roundRect、ellipse or line; supports fill、stroke、stroke_width_px。
  • table: simple table fallback, using rows array to generate a native PPT table.

Editability priority

  1. Text boxes: titles, body text, page numbers, labels, and button text are all prioritized for conversion to native PPT text.
  2. Basic shapes: rectangles, rounded rectangles, circles, and lines are prioritized for conversion to PPT shapes.
  3. Image components: photos, illustrations, icons, textures, and complex charts as independent image layers.
  4. 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.