Skip to content

Releases: Syh1906/openai-compatible-imagegen

v0.1.1

18 Jun 13:11

Choose a tag to compare

PNG Post-Processing

Use PNG post-processing when the image API returns a source file that is larger or differently arranged than the final asset you want to deliver. A common workflow is to generate a 1024x1024 source image, then deliver a 128x128 icon.

How To Ask Your Agent

After installing the skill and configuring auth.json, describe the final image you want in normal language. Include the subject, style, final size, transparency, count, and post-processing result when those details matter.

Examples:

  • "Use the OpenAI-compatible image generation skill to create a 1024x1024 Warcraft 3 style frost skill icon, no text. Save the final PNG under outputs/."
  • "Create a transparent-background item asset for a centered fire orb. I need a PNG with real alpha if the backend supports it."
  • "Generate a 3x3 sheet of game item candidates, then split it into 9 separate 128x128 PNG files."
  • "Use this reference image and convert it to a dark magic UI style. Keep the result as a PNG."
  • "Inspect this PNG, report whether it has alpha, then resize it to 128x128."

Configuration

auth.json supports:

{
  "postprocess": {
    "enabled": false
  }
}

postprocess.enabled enables generated-output post-processing. The final delivery size is not stored in auth.json; include the final size in your request or pass --delivery-size when running commands manually.

Manual Commands

Resize an existing PNG:

python "$SkillDir/scripts/imagegen.py" normalize "raw.png" `
  --delivery-size 128x128 `
  --out "icon.png"

Split a 3x3 candidate sheet:

python "$SkillDir/scripts/imagegen.py" split-grid "grid.png" `
  --grid 3x3 `
  --delivery-size 128x128 `
  --out-dir "candidates" `
  --expected-count 9

Generate and write a resized output:

python "$SkillDir/scripts/imagegen.py" generate `
  -p "single centered game icon" `
  -f "raw.png" `
  --delivery-size 128x128 `
  --postprocess-out-dir "final"

Package Notes

The attached zip contains one top-level openai-compatible-imagegen/ folder. Local auth.json, .local/, and dist/ files are not included.

v0.1.0

17 Jun 14:57

Choose a tag to compare

v0.1.0

Initial public release of openai-compatible-imagegen.

Included

  • English-first SKILL.md for Agent Skills-compatible clients
  • README.md with centered title, language switch, release/license/CI badges, and compatibility notes
  • README.zh-CN.md for Chinese installation and usage guidance
  • OpenAI-compatible image API support for /v1/images/generations and /v1/images/edits
  • Local auth initialization with auth.json, direct api_key, and api_key_env support
  • Text-to-image, image edit, transparent asset intent, and JSONL batch workflows
  • CI validation and MIT license

Validation

  • python -m unittest discover -s tests
  • python -m py_compile scripts/imagegen.py