Codex ImageGen loses PNG transparency whenever a reference image is supplied
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.825.51511
What subscription do you have?
Pro
What platform is your computer?
macOS 26.6.2 (Build 25G83) Darwin 25.6.0 arm64 arm
What issue are you seeing?
Summary
Transparent PNG generation works correctly when no reference image is supplied. However, whenever a reference image is included, the generated result has no alpha channel and contains a white/gray checkerboard baked into the image.
This occurs both when:
- Editing/regenerating the supplied image.
- Requesting a completely new image while using the supplied image only as a visual/compositional reference.
Steps to reproduce
- In the Codex desktop app, use the built-in image-generation tool.
- Generate a four-frame game sprite strip and explicitly request a genuine transparent RGBA background.
- Do not supply a reference image.
- Inspect the generated PNG.
- Repeat the request while supplying the first transparent PNG as a reference.
- Explicitly state that this is a brand-new generation, not an edit, and that transparency must use alpha-zero pixels rather than a painted checkerboard.
- Inspect the new PNG.
Expected result
The reference-guided output should be an RGBA PNG with genuine transparent pixels outside the sprites. Providing a reference image should not disable transparent output.
Actual result
Without a reference:
- PNG mode: RGBA
- Alpha channel: present
- Alpha range: 0–255
- Approximately 50.6% of pixels fully transparent
With a reference:
- PNG mode: RGB
- Alpha channel: absent
- The transparency checkerboard is baked into the image pixels
A follow-up request specifically asking ImageGen to remove the checkerboard and produce actual transparency also returned an RGB PNG with no alpha channel.
Reproducibility
- Reference-free generation: 1/1 produced correct RGBA transparency
- Reference-based attempts: 3/3 produced opaque RGB images with a baked checkerboard
The issue therefore appears specific to generation/editing workflows that include a reference image.
Technical verification
The files were checked using:
filesips -g hasAlpha- Pillow alpha-channel inspection
What steps can reproduce the bug?
Feedback ID: 01a06c25-e19b-7881-abc1-d08ee18aefb7
What is the expected behavior?
No response
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the Codex desktop app using a transparent PNG as a reference, then inspect both outputs with file, sips -g hasAlpha, and Pillow alpha-channel inspection. The fix is complete when reference-guided generation preserves an RGBA PNG with alpha-zero transparent pixels instead of baking in a checkerboard, while reference-free generation continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- computer-graphics, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100