Unable to create Transparent PNGs

when you ask the AI to make you a PNG with a transparent background, it puts the checkered background as if it was transparent, but it’s not. which is sometimes very obvious. Gemini called it “Truly transparent” but you can see the distortion in the transparent. I’ve included both the chat and the generated image.

additionally I asked for a 16:9 image and it gave me a 2048 Square.


blocks

Hi @Enki , Welcome to the forum.

Which model are you using to generate the image? If you are using imagen-3.0-generate-002, there is no need to specify the aspect ratio or output_mime_type in the prompt itself, you can pass those as parameters instead.
I was able to generate an image with what I consider a transparent background (i.e: completely white background) by explicitly specifying it in the prompt.

Neither Imagen3 or 4 can generate transparent images, i.e. images with an alpha channel. You’ll need to post-process them to get this effect. You can tweak the prompt to ensure it gives you an image with a plain background, which will make post-processing easier, but that’s all for now.

You’ll need to pass 16:9 as the aspectRatio API parameter, it shouldn’t go in the prompt.