Files
arisingmedia-web-sops/image-gen-workflow/archive/02-generation-log.md
T
2026-06-09 18:31:59 +02:00

3.3 KiB

Image Generation Log — CobhamTech.com

Date: 2026-05-10 Model: imagen-4.0-generate-001 (Gemini Imagen 4) SDK: google-genai (Python) API Key: AIzaSyD-njx1-hyqnazckGTJ6SnMJ8o_B2C0UsI Script: generate_images.py (deleted after run)


Images Generated

hero-bg.jpg

  • Prompt: Professional enterprise server room, long corridor of dark rack servers with blue LED ambient lighting, deep perspective, dark navy background, cinematic shallow depth of field, no people, photorealistic, ultra detailed
  • Aspect ratio: 16:9
  • File size: 395,927 bytes
  • Placement: .ct-hero background-image in assets/css/page-home.css — overlay gradient rgba(12,15,24,0.82) to rgba(12,15,24,0.92), background-size cover
  • Status: OK

about-visual.jpg

  • Prompt: Professional IT consultant at a clean modern workstation, dual monitors displaying network diagrams and dashboards, dark office with subtle blue ambient lighting, business attire, confident expression, photorealistic
  • Aspect ratio: 4:3
  • File size: 426,565 bytes
  • Placement: about.html ct-about-story section — third column, grid-template-columns updated to 1fr 1fr 420px, img tag with border-radius 4px
  • Status: OK

services-bg.jpg

  • Prompt: Abstract enterprise technology network, dark background, glowing blue interconnected nodes and data pathways, minimal high-tech aesthetic, no text, no people, cinematic, photorealistic render
  • Aspect ratio: 16:9
  • File size: 403,142 bytes
  • Placement: .ct-svc-idx-hero background-image in assets/css/page-services-index.css — same overlay pattern as hero-bg
  • Status: OK

intro-visual.jpg

  • Prompt: Business professional and IT consultant collaborating at a modern conference table with laptops and tablets, professional corporate office, clean neutral dark background, photorealistic, teamwork and trust
  • Aspect ratio: 4:3 (retried — original 3:2 not supported)
  • File size: 373,852 bytes
  • Placement: index.html — div.container block between ct-intro section and ct-home-sec-services, max-height 400px object-fit cover
  • Status: OK

API Errors / Retries

  • intro-visual.jpg failed on first attempt with aspect ratio 3:2: aspectRatio 3:2 is not supported. Supported values are 1:1, 9:16, 16:9, 4:3, 3:4.
  • Retried with 4:3. Succeeded.

Supported Aspect Ratios (Imagen 4)

1:1, 9:16, 16:9, 4:3, 3:4

3:2 is NOT supported. Use 4:3 as the closest substitute for landscape-medium compositions.


Docker

  • Rebuilt cobhamtech-static image from scratch after HTML/CSS changes
  • Container running on port 8010
  • All 4 images confirmed HTTP 200 at runtime
  • Homepage HTTP 200

Lessons Learned

  1. Imagen 4 does not support 3:2 aspect ratio. The supported set is: 1:1, 9:16, 16:9, 4:3, 3:4. Always validate aspect ratios before scripting a batch.
  2. Generation of 4 images (3 x 16:9, 1 x 4:3) completed in under 90 seconds total.
  3. Dark overlay gradients (rgba at 0.82-0.92 opacity) are necessary on these photorealistic images to maintain text legibility against white hero text.
  4. File sizes ranged 374KB-427KB for JPEG output at these aspect ratios — appropriate for web use without additional compression.
  5. The google-genai SDK uses client.models.generate_images() with a GenerateImagesConfig object — not the generate_content() path.