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 9Generate 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.