ChangeBgPhotoA PictureEditor.com tool

Why a swapped background looks fake

Nobody looks at a photograph and thinks the background was replaced. They think something is off and cannot say what. It is almost always one of four things, and three of them have a control on the page in front of you.

One: a fringe of the room that used to be there

This is the giveaway, and it is the one people notice first without naming it. Along the whole outline of the subject there is a band one to three pixels wide where a single pixel contains both the person and the wall behind them — not because anything was done badly, but because a pixel is an area and the boundary between a shoulder and a wall does not fall neatly between two of them. A camera records the average.

Lay that band on a new ground untouched and it brings the old ground’s colour with it. Against white it reads as a dirty outline; against a colour it reads as a coloured rim. If the original room was strongly coloured — a green sofa, a red wall, grass — it is unmistakable, and it is why a cheap background swap of somebody standing in a garden has a faint green edge on every strand of hair.

The fix is subtraction, not blurring. For each pixel in the band, the page measures what is there, works out how much of it the old wall contributed, subtracts that, and keeps the remainder as the subject’s own colour. The control is called unmixing the old ground and it is on by default. Blurring the edge instead — which is what a feather control does — hides the fringe by spreading it, and on close inspection a spread fringe looks worse than a sharp one.

Two: a subject standing on nothing

A person photographed in a room is connected to it. Light bounces up off the floor, there is a darker band where their feet or the base of the object meets the ground, and the eye reads that connection long before it reads anything else. Cut the room away and put a flat colour behind them and the connection goes with it: the subject floats, very slightly, and the photograph acquires the quality of a sticker.

The contact shadow control puts the connection back. It reads the lowest eight per cent of the rows the subject occupies, finds how wide the subject is across that band, and darkens an ellipse of the new ground under it. Depth controls how dark; spread controls how far it reaches.

Why it is off until you turn it on

Because a shadow in the wrong place is far more obviously wrong than no shadow at all. A head-and-shoulders portrait cropped at the chest is not standing on anything inside the frame, and a shadow under the chest is a mistake that every viewer will catch. Turn it on when the subject’s base is visible — a full-length figure, a product on a surface, a pet on a floor — and leave it off otherwise.

Three: light that disagrees with the ground

Photograph someone in a room lit by a tungsten bulb and the light on their face is warm: the reds and greens run ahead of the blues by a noticeable margin. Put them on a neutral studio grey and the disagreement is visible even to somebody who could not name a colour temperature. The subject looks slightly orange, or the ground looks slightly blue, depending on which one the eye takes as the reference.

The two grounds this page offers are chosen partly for that reason. A flat colour you picked cannot disagree with the light, because a reviewer reads it as paper rather than as a place — nobody asks what time of day the white behind a passport photograph was taken. A blur of the photograph’s own background cannot disagree either, because it is the same light, softened.

Bringing your own backdrop

The moment a ground is a photograph of somewhere, it starts making claims. It has a time of day, a direction of light and a colour temperature, and all three have to agree with the subject or the composite reads as two photographs rather than one. The practical rule is to match the direction first: find which side of the face the light is on, and choose a backdrop whose brightest region is on the same side. Temperature can be nudged afterwards; direction cannot.

That is also why it is worth using a made backdrop rather than a found one. A gradient, a sweep or an abstract field has no direction to contradict and no scene to date it, which removes the hardest of the three problems entirely. If you need one built to a particular size, bgimage.com generates background images from nothing — gradients, meshes and plain fields at named dimensions — which is a different job from this one and a good companion to it.

Four: an edge sharper than the photograph it belongs to

Every photograph has a characteristic softness. The lens has one, the sensor’s filter adds another, and the result is that no real edge in a real photograph is perfectly crisp — a shoulder against a wall transitions over a pixel or two even in good light. A selection boundary, by contrast, can be exactly one pixel wide, and when it is, it is sharper than anything else in the frame. The eye reads that as cut out, without being able to say why.

Feather is the answer and the amount is smaller than people expect. Under a pixel is usually right for a phone photograph; two or more starts to look like a soft selection rather than a soft lens. The one case that genuinely wants more is a photograph that was slightly out of focus to begin with, where a crisp outline against a flat ground makes the softness of the face obvious by comparison.

Sharpness cuts the other way with the blur ground. Blur the room heavily behind a subject that was photographed with everything in focus and you have created a depth-of-field effect the lens never had — which looks convincing at moderate settings and synthetic past about forty pixels, because a real lens would have softened the subject’s own edges too.

The order to work in

Get the selection right before touching anything else. A fringe caused by a selection that is a few pixels too generous cannot be unmixed away, because the pixels being unmixed are wall rather than boundary, and no amount of feathering rescues an outline that is in the wrong place. Look at the red overlay first, fix it with the brushes, and only then choose a ground.

Then work outward: unmixing on, feather to taste, ground, shadow last. The shadow is last because it is the only one of the four that is a judgement about the scene rather than a correction to the edge, and it is the easiest to overdo. If you cannot decide whether it is helping, it is too strong.

Back to the working surface

Cutout and composite run here. No upload.