openai / openai/codex

Codex ImageGen loses PNG transparency whenever a reference image is supplied

Open
#42,743 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

app bug imagen
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:

  1. Editing/regenerating the supplied image.
  2. Requesting a completely new image while using the supplied image only as a visual/compositional reference.

Steps to reproduce

  1. In the Codex desktop app, use the built-in image-generation tool.
  2. Generate a four-frame game sprite strip and explicitly request a genuine transparent RGBA background.
  3. Do not supply a reference image.
  4. Inspect the generated PNG.
  5. Repeat the request while supplying the first transparent PNG as a reference.
  6. 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.
  7. 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:

  • file
  • sips -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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.