Codex image generation saves transparent-background requests as opaque RGB PNGs
What version of the Codex App are you using (From “About Codex” dialog)?
26.417.41555 (1858)
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
Codex built-in image generation appears unable to emit or preserve real transparent PNG alpha for transparent-background asset requests.
I was testing the built-in image_gen tool for a standalone apparel-artwork workflow. The desired output was the design only, with no shirt/mockup/background, as a transparent PNG suitable for downstream upscaling and print preparation.
I tried multiple generation prompts that explicitly requested real PNG alpha transparency, then tried an edit/background-extraction pass using a transparent-looking apparel design as the edit target. In every case, Codex saved an opaque RGB PNG with no alpha channel.
The output can visually look like isolated artwork, but local inspection shows that the file itself is opaque RGB rather than transparent.
What steps can reproduce the bug?
Uploaded thread: 019db213-5186-75c1-b7b2-f1040a7b7fc5
Repro steps:
- In Codex, use the built-in
image_gentool with a prompt that asks for an isolated design asset with real PNG transparency. Example prompt language:
Create a complex t-shirt print design only, not a mockup.
The output must be a PNG with real transparency.
The area outside the artwork must be actual transparent alpha pixels, not white, black, gray, checkerboard, paper, fabric, or a simulated background.
No t-shirt, no model, no background, no frame, no poster, no canvas border.
- Generate the image and inspect the saved PNG.
- Repeat with a stricter prompt requiring a "real PNG alpha channel" and actual transparent pixels outside the artwork.
- Try an edit/background-extraction pass using a transparent-looking apparel design as the visible edit target, asking Codex to preserve the artwork and remove only the background into real alpha.
- Inspect the resulting PNGs with commands such as:
sips -g pixelWidth -g pixelHeight -g hasAlpha -g space <generated-file>.png
file <generated-file>.png
xxd -l 29 <generated-file>.png
Observed result:
hasAlpha: no
space: RGB
PNG image data ... 8-bit/color RGB
PNG IHDR color type: 2
PNG color type 2 is RGB. A true transparent PNG would normally be RGBA/color type 6, or otherwise include transparency data.
What is the expected behavior?
When a prompt requests a transparent-background PNG, Codex image generation should emit or preserve real alpha transparency in the saved PNG.
For this workflow, expected output would be a PNG with transparent pixels outside the generated artwork, such as RGBA/color type 6 or otherwise valid PNG transparency data.
If the current Codex image-generation integration does not support transparency, the app should either expose the equivalent background: transparent capability when available, or report that transparency is unsupported rather than returning an opaque RGB PNG that only appears visually isolated.
Additional information
The same general prompt produced a usable transparent-background image in ChatGPT.com, so this may be a Codex wrapper/output serialization limitation rather than a model capability limitation.
The Codex built-in image tool exposed only a prompt field in this session; there was no visible way to request or preserve transparent output through an explicit image-generation option.
This report intentionally omits local file paths, account names, product names, and other personal identifiers. Current Codex session logs are included via the uploaded thread link in the repro section.
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Same problem here in Codex Desktop on Windows while generating game UI assets for a Ren'Py project.
In ChatGPT web, the image model can produce/export a usable transparent PNG for this kind of asset. In Codex, the built-in
image_genpath only exposes a prompt, so even when I explicitly ask for things like:Output as PNG with transparencyfully transparent backgroundfully transparent inner opening…the saved file still comes back opaque or with a fake checkerboard/matte instead of real alpha.
From the outside, this looks less like a model-capability problem and more like a Codex wrapper / tool-surface problem. If Codex already fixes
output_format=png, it also needs to either:background=transparent(and ideally the other basic image controls), orRight now the web product and Codex behave differently for what appears to be the same underlying image capability, and that is especially painful for game/UI asset workflows where transparency is not optional.
This seems closely related to #18944 as well.
Additional detail from my case:
In the web product, for the same kind of image-generation task, it is often enough to explicitly state in the prompt/instruction that the output format must be PNG, and the result comes back with usable transparency.
In Codex, that same practical approach does not seem to work. Even when the prompt explicitly says the output must be PNG with transparency, the saved result still behaves like an opaque PNG or a fake transparency/checkerboard result.
So from a user perspective, the web flow and the Codex flow are not behaving the same way, even though they appear to be backed by the same image-generation capability.
Not working with gpt-image-2 https://github.com/openai/codex/issues/18636#issuecomment-4347947995
Does ChatGPT use a fallback to the old model?
I was looking back at the day or the day after OAI release imagen v2 and I have a chatgpt session where the background transparency worked and at this point I'm assuming it was likely a fallback to gpt-image-1.5.
Now that I have thoroughly tested in the api playground, codex, and chatgpt, it's clear that OAI's imagen v2 doesn't support transparency and the worst part is I haven't see any official comms on the reason or if they plan to support this in the future.
I am also pretty sure this worked at one point because I have a few transparent images in my project same as @tkozzer, and I'm pretty sure I'd generated them via Codex.
Simple solution here would seem to be installation of a router / model selector wherein if the user is asking for a transparent background then use gpt-image-1.5.
I am also pretty sure this worked at one point because I have a few transparent images in my project same as @tkozzer, and I'm pretty sure I'd generated them via Codex.
Simple solution here would seem to be installation of a router / model selector wherein if the user is asking for a transparent background then use gpt-image-1.5.