May 2026 — ChatGPT / API Image Gallery, Prompt Tips, and Help: Generative Art Theme: Science
OpenAI Developer Community
May 2, 2026
I did a little experiment, starting with a normal prompt and then alpha transparency for the background, using ChatGPT. I also share the actual process ChatGPT did, so gpt-image-2 could generate transparent background. Since gpt-image-2 is by default not generating transparent background.
Prompt 1 (click for more details)
Prompt 2 (click for more details)
Prompt 3 (click for more details)
ChatGPT 5.5 thinking (click for more details)
Python
from PIL import Image
import numpy as np
infile = "input_checkerboard_image.png"
outfile = "cleaned_scientist_rgba.png"
img = np.array(Image.open(infile).convert("RGB")).astype(np.float32)
h, w, _ = img.shape
Y, X = np.mgrid[0:h, 0:w]
# Reconstruct checkerboard pattern.
# Detected approximate repeat size: 57 px, alternating 28/29 px regions.
parity = (
(X % 57 >= 29).astype(np.int32)
+ (Y % 57 >= 29).astype(np.int32)
) % 2
# Estimated checkerboard colors.
bg = np.where(
parity[..., None] == 0,
np.array([254, 254, 254], dtype=np.float32),
np.array([243, 243, 243], dtype=np.float32),
)
# Difference from expected checkerboard background.
diff = np.mean(np.abs(img - bg), axis=2)
# Convert difference into alpha.
alpha = (diff - 3.0) / 62.0
alpha = np.clip(alpha, 0, 1)
# Preserve softer semi-transparent areas.
alpha = np.power(alpha, 0.9)
# Remove tiny residual checkerboard noise.
alpha[alpha < 0.035] = 0.0
# Decontaminate foreground RGB from checkerboard contribution.
a = alpha[..., None]
fg = (img - (1 - a) * bg) / np.maximum(a, 1e-6)
fg = np.clip(fg, 0, 255)
fg = np.where(a > 0, fg, 0)
# Save as real RGBA PNG.
rgba = np.dstack([
fg.astype(np.uint8),
np.round(alpha * 255).astype(np.uint8)
])
Image.fromarray(rgba, "RGBA").save(outfile)
print(outfile)
Maybe this could be of help for some.
Discussion in the ATmosphere