Google Patents an AI Pipeline That Reformats Images by Expanding Then Cropping
Resizing an image to a new aspect ratio usually means ugly letterboxing or painful cropping. Google's patent describes a two-step AI approach: first hallucinate new pixels to make the image bigger, then trim it down to hit the exact target ratio.
What Google's AI aspect-ratio tool actually does
Imagine you have a square photo you want to use in a widescreen banner ad. You can't just stretch it — that looks terrible. And cropping it tightly might cut off the main subject. This is a problem that anyone who's ever run a social media account or made a presentation has bumped into.
Google's patent describes a system that tackles this with a generative AI model. Instead of stretching or blindly cropping, it first expands the image — using AI to invent new pixels that plausibly fill in the edges. Think of it like the "Content-Aware Fill" in Photoshop, but driven by a modern generative model. It also detects the most important part of the image (the "salient region") so the subject stays centered and protected.
Once the expanded image exists, the system prunes it — trimming it down to the exact target dimensions. The expand-then-trim combo gives the AI room to work, and the final crop lands at the right size without sacrificing the subject.
How the expand-then-prune pipeline works
The patent describes a three-stage pipeline for reformatting a source image from one aspect ratio to another.
- Salient region detection: The system first identifies the most visually important part of the image — faces, products, focal objects — so that region is protected during any resizing or cropping operation. A cropped version centered on that region is passed downstream.
- Generative expansion (intermediate image): A generative AI model expands the (possibly cropped) source image in one or more dimensions to create an intermediate image at a second aspect ratio. The system has a shortcut for simple cases: if the image already has a solid background color at its edges, it just extends that color without involving the AI model at all.
- Pruning to final ratio: The intermediate image is then trimmed — "pruned" — in at least one dimension to produce a third image at the final target aspect ratio. This third ratio is different from both the source ratio and the intermediate ratio.
The two-step expand-then-prune approach is deliberate: generating at a slightly larger intermediate size gives the model more flexibility and lets the final crop remove any artifacts or seams at the edges of the AI-generated fill.
What this means for Google's image and ad products
For Google, this is directly applicable to its advertising and content platforms. Google's ad network serves creatives across dozens of placement sizes — square social posts, widescreen display banners, portrait phone screens — and advertisers rarely provide assets in every format. An automated pipeline that intelligently reformats a single source image into multiple ratios would reduce production friction significantly and is the kind of unglamorous infrastructure that saves real money at scale.
For end users, tools like this showing up in Google Photos or Workspace would mean less manual cropping when you want to share an image in a format it wasn't shot in. The salient-region detection is the piece that makes it feel non-destructive — your subject stays in frame even when the dimensions change dramatically.
This is solid, practical engineering aimed squarely at Google's ad-tech and content pipeline problems. The expand-then-prune approach is a genuinely sensible way to use generative AI for a real production constraint — it's not a flashy demo, it's the kind of thing that gets quietly integrated into Google Ads Manager and saves an ops team hundreds of hours. Worth watching, but don't expect a splashy product announcement.
Get one Big Tech patent every Sunday
Plain English, intelligent commentary, no hype. Free.
Editorial commentary on a publicly published patent application. Not legal advice.