A packshot is not usually shot on pure white. It is shot on a sweep that reads 240 at the bottom and 252 at the top, or exported with a background at 254 because someone picked the swatch from a screenshot, or flattened from a PNG whose "white" was never 255.

One level below white is invisible to you. It is not invisible to a compliance check, and the size of the error is not proportional to how far off the background is. It is a step.

There is a sibling case that gets more attention: the sweep that is uneven, 160 at one corner and 244 at another, where a single multiplier either clips the bright end or leaves a grey wedge behind. That one is a lighting problem, and the answer there is to estimate the field and divide it out. This is the other case, and it is the one that gets missed: the sweep is perfectly smooth, it is one level short of white, and nothing about the picture looks wrong. The number is.

Reported ink for one 1200 px packshot on flat backgrounds from 235 to 255, at three thresholds; each curve drops at background = threshold minus 1. On the right, two 250 px crops one level apart that read 38.4% and 99.9%

The readout is a white-pixel counter

A fill check has to decide which pixels are product, and without a model the only definition available is a threshold: product is min(R,G,B) < t. Set t to 255 — the literal reading of a pure-white requirement — and the definition becomes "anything that is not exactly 255,255,255".

At that point the readout stops being a measurement of the product. It is

ink = 1 − (#pixels exactly 255) / N 

which is the share of the frame that is not white. On a 1200 px composite with a true 255 background, that is 38.44%: the product plus its fringe, as the compliance piece found. Put the same product on a background of 254 and it is 99.97%.

background level ink at < 255 box / frame longest side / frame
255 38.435% 51.21% 85.00%
254 99.966% 100.00% 100.00%
250 99.966% 100.00% 100.00%
245 99.966% 100.00% 100.00%

Nothing in between. The table has no 60% row and no 80% row because they do not exist: one level of background, 61.5 points of fill. And it is not just the ink reading — the support box goes from 51.21% to 100%, the longest side from 85% to 100%. Every number the checker has collapses at once, so the file reports "product fills the whole frame" and there is no second opinion available.

That is the same product, the same 1020 × 723 box, the same pixels. A background at 254 is a background a viewer cannot distinguish from white. I checked that in the obvious way: fix the two files side by side and look.

Every threshold has its own cliff

The interesting part is that this is not a property of 255. The mask compares each pixel against t, so the background counts as product the moment the background is below t. The cliff for threshold t sits at background level t − 1, exactly.

threshold background 255 background t background t − 1
< 255 38.435% 38.435% 99.966%
< 250 31.948% 32.597% 94.128%
< 245 27.559% 28.315% 89.846%

For t = 255 the first two columns are the same column, because there is no background level above the cliff to stand on.

So a tolerant threshold does not save you, it only moves the cliff. A checker using < 250 reads 32.6% on a background of 250 and 94.1% on a background of 249. The whole family of thresholds has the same failure, at different places, and the failure is always a step rather than a slope. Which is why "use a tolerance of 250 instead of 255" is not a fix: it is a fix for one specific background level, chosen blind.

The plateau heights differ because at each threshold the plateau is 1 − #{min(R,G,B) ≥ t}/N: whatever cannot dip below t is never counted as product, so the reading reports the rest of the frame instead. For this product that is 99.97%, 94.13% and 89.85%. Three different wrong answers, all of them "the frame".

The fix costs the product's highlights

So the background has to actually be 255. That is a per-pixel operation, and the white point is forced: to make a sweep from 240 to 252 uniformly white, the point where the curve reaches 255 has to be 240, the darkest level in the background. Anything darker than 240 would survive the lift as a grey rim.

Any pixel at or above 240 flatlines, and that is already decided before the shape of the map is chosen — a level cut, a straight scale, or a knee all send the same set of pixels to 255, because the set is #{max channel ≥ white point}. What the map choice changes is only what happens below 240. Here is the cost at 240, and what it buys as the white point loosens:

white point product pixels flatlined share of product background pixels still below 255
240 191,826 34.6% 0
242 174,840 31.5% 240,000
245 155,114 27.9% 422,901
248 117,160 21.1% 525,177
250 85,651 15.4% 644,879
252 59,841 10.8% 883,679

The exchange rate averages out to one level of white point for two points of product, and only the first row leaves a background that is actually uniform. Every looser setting leaves 240 sitting at 240 somewhere in the frame — a gradient, not a background.

Product pixels flatlined at each white point on the left axis, against the background pixels still below 255 on the right; 240 is the only white point that leaves no background behind

A third of a white mug has a channel above 240. That is not a coincidence of this file: a white product on a white sweep occupies the same levels as the sweep, which is exactly why the sweep was chosen. The overlap is the problem, and it is not small.

It does, however, depend steeply on the product's own brightness, which is worth knowing before generalising. Darkening this product by 15% and re-running:

product scaling mean product level share flatlined at white point 240
1.00 214.9 34.56%
0.85 183.7 1.89%
0.70 153.1 1.88%
0.55 122.9 1.87%

A 15% darker product costs eighteen times less, and below that it barely moves, because the product has dropped out of the background's range entirely. So the cost is not a smooth function of anything — it is near zero until the product is bright enough to overlap the sweep, and then it is a third of the product. The files that get hurt are white, cream, chrome and glass, which is to say the ones a studio shoots on white in the first place.

A tone curve does not help

The intuitive fix is a curve instead of a scale: leave the mid-tones alone, and only lift the top. Set a knee so that 240 becomes 255 while everything below, say, 232 is untouched.

That produces exactly the same clipping. The reason is one line of arithmetic: a monotone per-pixel map that sends 240 to 255 must send everything above 240 to 255 as well, because those values are all above it. There is no map that compresses [240, 255] into [240, 255] and ends with 240 at 255 — the interval has nowhere to go.

Measured, all three tonal versions at white point 240 land on the same three numbers: 191,826 product pixels with a channel at 255, 186,776 pixels gone exactly white, and an ink readout of 25.58%. Even the most conservative one — a hard cut at 240, which leaves every pixel below it byte-identical — costs exactly the same. What moves between them is only the material underneath:

path px with a channel at 255 px exactly 255 ink readout product mean distinct levels
as shot 672 492 99.97% 214.9 189
hard cut at 240 191,826 186,776 25.58% 217.2 174
knee curve, width 8 191,826 186,776 25.58% 217.7 174
scale to 255/240 191,826 186,776 25.58% 224.9 174
matte on white 1,907 1,660 38.43% 215.3 189

The first two columns are two different tests, and worth keeping apart: a pixel reaches 255 as soon as one channel does, but it only counts as white when all three do. 186,776 of the 191,826 go all the way; the remaining 5,050 are a channel or two short and still register as ink. And the level count drops from 189 to 174 in all three, which is just the fifteen levels from 240 to 254 merging into one.

So the ordering among the three fixes is about nothing but how much of the range below 240 gets dragged along with it — and even the hard cut, which drags none of it, moves the product mean from 214.9 to 217.2 purely because a third of the product now reads 255. The knee adds a little (217.7), the scale more (224.9). The third of the product above 240 is lost in every case, and it cannot be rescued by any function of a pixel's value, because the background and the product's highlights are the same value. Distinguishing them requires knowing where they are.

The product's luminance histogram from 120 to 255 with the background's 240 to 252 band shaded, and a table of what each path leaves behind: pixels at 255, ink readout and distinct levels for as shot, hard cut, knee, scale and matte

What actually fixes it

A matte does, because it is spatial rather than tonal. Drop the background and composite the product onto a clean 255 field, and nothing is rescaled: the background is exactly 255 because it was written that way, and the product keeps its 189 levels. Its 1,660 white pixels break down cleanly — 492 that the original exposure had already blown out, and 1,168 on the outermost edge, at an alpha of about 0.01, which are white because 99% of them is background. No curve pressed anything against the ceiling.

The readout on the matte path is 38.43%, against a true coverage of 36.79%. That is the 4.5% over-read that the compliance piece traced to the matte's mean alpha, and it is a different error in a different direction: one point and a half, from the mask, versus sixty-one points from the background. Not the same problem, and not the same order of magnitude.

There is a second reason to prefer it. Flattening to white creates 16,363 pure-white 8×8 blocks, up from zero, because the flattening wrote them. 2,865 of the 9,002 blocks that contain product become pure white — a third of the product's own blocks are now indistinguishable from background by any block test you could run. The matte path also ends up with 13,499 pure-white blocks, since a white field is white, but exactly one of them contains product. That is the whole difference between the two approaches in a single number: one is white where it should be, the other is white where the product used to be. And it is not reversible — the pixels are the same value, and no later step can tell which were product.

The encoder sees it too

Since the flattening manufactures pure-white blocks, it also manufactures the conditions for chroma bleed: those blocks are exactly the constant blocks that 4:2:0 smears with a neighbouring chroma sample. Re-encoding at quality 90:

path pure-white blocks dirty pixels at 4:4:4 at 4:2:0
as shot 0 0 0
scale to 255/240 16,363 0 607
knee curve, width 8 16,363 0 648
matte on white 13,499 0 111

The swept-background file is cleaner under JPEG than any forced-white version of itself, because it has no pure white to dirty — it is uniformly slightly grey, and grey survives. Scale it to white and the bleed goes from nothing to 607 dirty pixels; write the white in with a matte and it stays at 111.

The instrument

The readout is three lines. The reason to write them out is that the closed form makes the cliff obvious in a way the number itself does not:

import numpy as np from PIL import Image def ink_readout(path, t=255): """What a fill check reports, and the count it is actually built from.""" a = np.asarray(Image.open(path).convert("RGB")) exact_white = (a == 255).all(axis=2) return dict(readout=1 - exact_white.mean(), # what a mask below t returns n255=int(exact_white.sum()), frame=a.shape[0] * a.shape[1]) 

On a true-white composite it prints readout 0.38435, n255 886539; on the same file with a background of 254, readout 0.99966, n255 492. The second number is the whole story: the file has 492 white pixels, out of 1.44 million, and every one of them is a blown highlight on the product rather than background. Those are the same 492 as the top row of the path table, which is the self-check — if n255 on the 254 file were anything other than the product's own white pixels, one of the two counts would be wrong.

The lift, with its cost, is one line each:

def flatten(img, white_point=240): """Scale so `white_point` becomes 255, and report what that costs.""" a = np.asarray(img.convert("RGB"), dtype=np.float64) k = 255.0 / white_point out = np.clip(a * k, 0, 255) clipped = a.max(axis=2) * k >= 255 # pixels, not channels return out, k, int(clipped.sum()) 

a.max(axis=2) * k >= 255 is the histogram tail above the white point, so the clipped count can be predicted without running the lift at all: it is #{max channel ≥ 240}, and for this product that is 191,826. That figure is the product's own pixels, alpha > 0; the same test over the whole frame returns 1,076,705, because the background sits at 240 to 252 and clips too, which is the point of the lift. The max is the whole subtlety. Sum the comparison over the raw array and you are counting channels instead of pixels — on this 1200 px frame that returns 3,223,910 where the pixel count is 1,076,705, because a near-white pixel usually clips in all three channels at once.

The reason this one is worth writing down is that the failure is silent in the direction that matters. A file with a 254 background does not look wrong, does not fail an eyeball check, and does not report an error — it reports 99.97%, which is 100% for any report that rounds, and on a marketplace that wants 85% that reads as a good result. The measurement that is supposed to catch a badly framed shot instead confirms that the frame is entirely product.

I work on PicViva, where this is the first thing the compliance check has to get right before any of its other numbers mean anything: if the background is not exactly white, the fill reading is not a fill reading. The test above — 1 − (pixels exactly 255)/N — is how I tell the two apart, and it is one line.