{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreic3oudg4huxyi4s3jazsavrkhvliqn4fhnhpwvinnu2iwyflwqctq",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mkv3zag2tgm2"
  },
  "path": "/t/may-2026-chatgpt-api-image-gallery-prompt-tips-and-help-generative-art-theme-science/1378298?page=44#post_903",
  "publishedAt": "2026-05-02T16:31:28.000Z",
  "site": "https://community.openai.com",
  "tags": [
    "(click for more details)"
  ],
  "textContent": "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.\n\nPrompt 1 (click for more details)\n\nPrompt 2 (click for more details)\n\nPrompt 3 (click for more details)\n\nChatGPT 5.5 thinking (click for more details)\n\n\n    Python\n\n    from PIL import Image\n    import numpy as np\n\n    infile = \"input_checkerboard_image.png\"\n    outfile = \"cleaned_scientist_rgba.png\"\n\n    img = np.array(Image.open(infile).convert(\"RGB\")).astype(np.float32)\n    h, w, _ = img.shape\n\n    Y, X = np.mgrid[0:h, 0:w]\n\n    # Reconstruct checkerboard pattern.\n    # Detected approximate repeat size: 57 px, alternating 28/29 px regions.\n    parity = (\n        (X % 57 >= 29).astype(np.int32)\n        + (Y % 57 >= 29).astype(np.int32)\n    ) % 2\n\n    # Estimated checkerboard colors.\n    bg = np.where(\n        parity[..., None] == 0,\n        np.array([254, 254, 254], dtype=np.float32),\n        np.array([243, 243, 243], dtype=np.float32),\n    )\n\n    # Difference from expected checkerboard background.\n    diff = np.mean(np.abs(img - bg), axis=2)\n\n    # Convert difference into alpha.\n    alpha = (diff - 3.0) / 62.0\n    alpha = np.clip(alpha, 0, 1)\n\n    # Preserve softer semi-transparent areas.\n    alpha = np.power(alpha, 0.9)\n\n    # Remove tiny residual checkerboard noise.\n    alpha[alpha < 0.035] = 0.0\n\n    # Decontaminate foreground RGB from checkerboard contribution.\n    a = alpha[..., None]\n    fg = (img - (1 - a) * bg) / np.maximum(a, 1e-6)\n    fg = np.clip(fg, 0, 255)\n    fg = np.where(a > 0, fg, 0)\n\n    # Save as real RGBA PNG.\n    rgba = np.dstack([\n        fg.astype(np.uint8),\n        np.round(alpha * 255).astype(np.uint8)\n    ])\n\n    Image.fromarray(rgba, \"RGBA\").save(outfile)\n    print(outfile)\n\n\nMaybe this could be of help for some.",
  "title": "May 2026 — ChatGPT / API Image Gallery, Prompt Tips, and Help: Generative Art Theme: Science"
}