GrepBoard/Manuals
84 manuals ·

AI banner image with negative space for text, cropped to 3:1

·Gemini API image generation docs · 2026-10 · ImageMagick 6.9.12 · Ubuntu 24.04·4 steps

Place the subject where a 3:1 crop of a 16:9 image keeps it, write that into the prompt, then check that the copy area is flat by its standard deviation.

Ask for "a small tent in the bottom left, wide sky on the right", crop the 16:9 result to a 3:1 banner, and only the tip of the tent survives. Cropping 1920×1080 to 1920×640 removes 440 rows; with a center crop that is 220 from the top and 220 from the bottom, leaving the band from y=220 to y=860.

The model cannot produce 3:1 directly. The Vertex AI Imagen guide lists five supported ratios (1:1, 4:3, 3:4, 16:9, 9:16) and describes 16:9 as the one for capturing more background. So generate 16:9 and decide on the crop band first.

Crop results by subject position

A sky gradient with a green triangle (321×181px) standing in for the tent was drawn at two positions and cropped with the same command. These are ImageMagick test images, not AI output.

Position phrase in the promptSubject rows (y) in the test imageAfter the 3:1 crop
"left third, near the bottom"780–961bottom 101px cut, only the tip left
"left third, vertically centered"440–621fully kept

The subject rows come from turning everything except the subject color black and reading the trim box with %@.

console
$ for f in banner_low banner_mid; do convert $f.png -fuzz 8% -fill black +opaque "#2f5d3a" -fill white -opaque "#2f5d3a" -format "$f subject=%@\n" info:; donebanner_low subject=321x181+260+780banner_mid subject=321x181+260+440

If your model offers 21:9, use it. Going from 16:9 to 3:1 keeps 59% of the height; from 21:9 it keeps 78%. The Gemini API docs list 21:9 as a supported ratio for some image models.

Prompt

The Gemini API image generation docs include a minimalist, negative-space template: one subject placed at a stated spot, a vast empty background, meant for website and marketing backgrounds where text will be overlaid. The crop band from above is added to it.

text
Minimalist composition. A single {subject}, inside the left third of the frame, exactly centered vertically.Keep the subject small, about one sixth of the frame height.Leave the top fifth and the bottom fifth of the frame completely empty (they will be cropped).Everything else is {background description} only: no clouds, birds, mountains, text or logos.Soft, even lighting. Landscape 16:9.

"Centered vertically" replaces "near the bottom", and the bands that will be cropped are named as empty. Position words still drift often, so crop and check every result.

Check what you get

[1] Confirm the source size. The crop math assumes 16:9.

console
$ identify -format "%f %wx%h\n" banner_mid.pngbanner_mid.png 1920x1080

[2] Center-crop to 3:1 and confirm the ratio. Without +repage the crop offset stays in the file and the coordinates in the next step shift.

console
$ convert banner_mid.png -gravity center -crop 1920x640+0+0 +repage banner_mid_3x1.png$ identify -format "%f %wx%h ratio=%[fx:w/h]\n" banner_mid_3x1.pngbanner_mid_3x1.png 1920x640 ratio=3

[3] Cut out the right two thirds (1280×640) where the copy goes and read its grayscale standard deviation. Lower means flatter. A third test image with a plasma:fractal pattern over the same area is included for comparison.

console
$ for f in banner_low banner_mid banner_busy; do convert ${f}_3x1.png -crop 1280x640+640+0 +repage -colorspace Gray -format "${f}_3x1 copy-area stddev=%[fx:standard_deviation]\n" info:; donebanner_low_3x1 copy-area stddev=0.0434805banner_mid_3x1 copy-area stddev=0.0434805banner_busy_3x1 copy-area stddev=0.133172

The gradient sky reads 0.043 and the pattern 0.133. There is no standard threshold: note the values of a few banners where your copy actually looked fine and treat anything in that range as a pass.

[4] Check the subject by eye. The number only covers the copy area, so banner_low, with its tent cut off, scored the same 0.043.

Where it goes wrongOne-line prompt fix
Subject comes out large and crosses the bandMove about one sixth of the frame height to the front
Clouds or birds appear and the number rises{background description} only, no other objects
Subject drifts to the centerReplace left third with a number, such as 15% of the frame width from the left edge
Square outputUse the ratio menu or the aspect_ratio setting

#web-banner#negative-space#gemini#image-prompt#imagemagick