Hello Google AI Team,
I am writing to report a persistent and increasingly critical issue related to image generation when transparency is requested.
Summary of the Issue:
When an image with a transparent background is requested—whether through the standard user interface or the Gemini 2.0 Flash Experimental API—the resulting file does not preserve the expected transparency. Instead, the generated image either arrives as a JPEG (which does not support transparency) or as a PNG that visually lacks transparency due to a missing or misapplied alpha channel.
Issue #1 – Standard User Interface (UI):
When using the UI to request an image with a transparent background (e.g., “a frog on a transparent background”), the system appears to generate the correct image internally. However, the version delivered to the user is often automatically converted to a JPEG, which replaces transparent areas with a solid white background.
Steps to Reproduce (UI):
- Request an image with a transparent background.
- Receive the image and inspect its format and background.
- The image is typically delivered as a
.jpeg
, and the transparent regions appear solid white.
Expected Behavior:
- The system should preserve the PNG format when transparency is requested.
- Alternatively, provide an option to download the original PNG.
- If a conversion occurs, clearly indicate this and the resulting loss of transparency.
Issue #2 – Gemini 2.0 Flash Experimental API:
Testing with the Gemini 2.0 Flash Experimental API reveals that, while the response is in .png
format, the images still have a solid white background. The alpha channel is either missing or incorrectly applied, resulting in the same visual outcome as with JPEGs.
Steps to Reproduce (API):
- Use the Gemini 2.0 Flash Experimental API to request an image with a transparent background.
- Receive a
.png
file. - Open the file in an image editor that supports alpha channels.
- Note the background is white, not transparent.
Impact:
This issue significantly limits the usefulness of generated images in workflows that depend on compositing, graphic design, and layering. Users must resort to manually removing backgrounds, which is inefficient and imprecise—especially when transparency was explicitly requested.
Request:
We kindly urge the team to:
- Ensure that when transparency is requested, the alpha channel is correctly implemented and preserved in all generated images.
- Avoid automatic conversion to JPEG for transparent image requests, or clearly communicate any such conversion and its consequences.
- Correct the PNG output of the Gemini 2.0 Flash Experimental API so it includes valid transparency when specified.
Resolving this issue would greatly enhance the usability and reliability of your image generation tools for a wide range of creative and technical applications.
Thank you for your attention and continued innovation.
Sincerely,
Greg