How channel variants get made
A clean cutout on transparency is not a catalogue. Each sales channel wants its own size, its own background, and its own rules about what’s allowed in the frame. This post is about turning one cutout into the full set: the deterministic Pillow steps that crop, pad, resize, and compose every variant — and the watermark rule that exists because marketplaces reject images that carry one.
Key takeaways
- One trusted cutout fans out into a full set of channel variants — web store, marketplace square, and social.
- Every step is plain deterministic Pillow arithmetic: trim to the product, pad to the safe area, resize, composite, watermark.
- Cropping is driven by the alpha channel — the tight bounding box of the actual product, not the original frame.
- The marketplace variant carries no watermark on purpose, because the big marketplaces reject main images that do.
- Same cutout, same config, same output every time — no model decides a crop, a size, or where the logo goes.
From one cutout to many
The cutout that arrives from Part 3 is a single transparent PNG: the product floating on nothing, at whatever size and position it happened to sit in the original photo. That’s not a catalogue, because no two channels want the same thing. A web store wants a roomy image with breathing space around the product. A marketplace wants a tight square on pure white with the product filling most of the frame and absolutely no logo. Social wants a square that looks good in a grid, branded with a faint watermark. The variant step takes the one cutout and produces all of them, and it does so with no model at all — every decision is fixed arithmetic against the config you set once.
That determinism is the whole point. The hard, uncertain judgement — what’s product and what’s background — was made and checked in the cutout step. Everything here is mechanical: given this cutout and this channel spec, there is exactly one correct output, and the same inputs always produce it. Run the same candle through twice and you get byte-for-byte the same web image, which is what makes a catalogue look like a catalogue instead of a scrapbook.
Crop, pad, resize
The first move is the same for every channel and it’s why the cutout had to come first: trim to the product. The alpha channel tells you exactly which pixels are product, so the function computes the tight bounding box of everything non-transparent and discards the empty margins. Now the product is the image, regardless of where it sat in the original snap or how much counter was around it. This is the step that makes a phone photo taken from across the room and one taken up close come out looking identical.
From that trimmed product, each channel applies its own spec, all of it deterministic:
- Pad to the safe area. Each channel sets how much breathing space to leave — the product is scaled to fill a target fraction of the frame and centred. The web store leaves a generous margin (the product fills about 80% of the frame); the marketplace square fills more tightly (around 90%, because marketplaces want the product big); social sits in between.
- Resize to the exact pixels. The padded canvas is resized to the channel’s precise dimensions with a high-quality filter — 1600×1600 for the web store, 2000×2000 for the marketplace, 1080×1080 for social — so every image in a listing is pixel-identical in size and the channel never has to re-scale it.
- Composite the background. Where the channel wants white, the product is laid over a pure
#ffffffcanvas and flattened to a JPEG; where it wants transparency, it’s kept as a PNG with the alpha intact. White for the marketplace (they require it), transparency offered for the web store so it sits on any page colour.
The watermark rule
The watermark is the one place where a small rule prevents a real, recurring mistake. Where it’s allowed, it’s applied the dull, deterministic way: the logo PNG is scaled to a fixed fraction of the frame, dropped into a chosen corner at low opacity — faint enough to deter casual reuse, light enough not to fight the product — and composited over the finished image. Same logo, same corner, same opacity, every time.
The rule that matters is where it isn’t applied. The big marketplaces — Amazon in particular — explicitly forbid watermarks, logos, and promotional text on a product’s main image, and an image that breaks that rule gets the listing suppressed. So the marketplace variant is configured with watermarking off, full stop, and that isn’t a toggle the system is allowed to get wrong: it’s baked into the channel spec, not decided per image. The web and social variants carry the mark; the marketplace one never does. It’s the same kind of guardrail as the rest of the series — the expensive mistake (a suppressed listing) is made structurally impossible, rather than left to whoever’s paying attention that day.
Why keep it deterministic
It would be tempting to let a model “make it look nice” — pick a flattering crop, choose a background, place the logo where it looks best. The cost of that is consistency: a catalogue where every image was composed slightly differently looks amateurish in a grid, and a process you can’t predict is one you can’t trust to run unattended. By making every step here pure arithmetic against a fixed config, the output is uniform across a hundred products and reproducible if you ever change a spec and want to re-run the lot. The model already did the one job only a model can do; this stage is deliberately boring, and boring is what scales.
Design rules for the variants
- Crop from the alpha, not the frame. The product’s bounding box is the image; the original margins are discarded.
- One spec per channel, set once. Fill fraction, pixel size, background, and watermark are config, not per-image choices.
- White when the channel demands white. Marketplace images are flattened onto pure
#ffffff; the web store can keep transparency. - No watermark on marketplace mains. The rule is structural, so a suppressed listing can’t happen by accident.
- Deterministic on purpose. Same cutout and config always yield the same set, so a catalogue stays uniform and re-runnable.