A dark selfie is not the same thing as a crushed one. If the platinum hair, or the collar of the shirt, has already piled up in bin 0 of the luma histogram, those pixels are a hard black patch. A later still 3:4 portrait will keep them.
I run the studio at Malfoid AI. It makes a still Female Malfoy / Fem Draco portrait, from a photo of an adult or without a photo, for $4.99 / 2 credits. The resolution setting is 1K. There is no video and no prompt box. Credit packs, if you want them, are one-time purchases after sign-in: $13.99 for 30, $35.99 for 100, $59.99 for 200. Prices are from the pricing page, re-checked 28 November 2026, 18:25:24–18:25:56 Asia/Shanghai, and they have not changed since 31 October 2026. The photos in this article are synthetic construction drawings — shapes only — not studio outputs and not anyone's picture.
This check is a histogram-floor test. It is not a mean-exposure test, not a backlight silhouette (face versus field), and not a highlight-ceiling remake. Those are useful, and they answer different questions. It asks a narrower one: has the left edge of the Rec.709 luma histogram, in the hair or in the collar, already piled up in bin 0, and is that pile a real island of crushed pixels?
Two ROIs, one 256-bin histogram
The boxes come from the construction drawing (the same oval and hair ellipse the other pre-upload scripts already use). Inside that geometry:
- the hair is the platinum-hair ellipse minus the face oval, cut off at the chin so hair that falls over the shoulders cannot leak into the collar
- the collar is the neck band under the chin — shirt, tie knot, lapels — with the hair ellipse removed
For each ROI the script builds a 256-bin Rec.709 histogram. A true (0, 0, 0) has luma 0 after rounding, so it lands in bin 0. The script also labels the largest 4-connected island of pixels at or below luma 3.
FLOOR_CEILING = 3 BIN0_FRAC_T = 0.020 ISLAND_PX_T = 400 luma = np.clip(np.rint(0.2126 * r + 0.7152 * g + 0.0722 * b), 0, 255) hist, _ = np.histogram(luma[mask], bins=256, range=(0, 256)) bin0_frac = hist[0] / n island_px = largest_4connected(mask & (luma <= 3)) A compact pinpoint of black ink and a crushed patch can share a floor bin of 0 and still differ by three orders of magnitude in island size. The fail rule uses that:
crushed = bin0_frac >= 0.020 or island_px >= 400 A low 5th-percentile without a bin-0 pile-up is just a dimmer collar or a darker exposure. It is reported (p5 is in the bench) but it is not treated as crushed blacks.
The bench
Eight sitters × even / crushed_hair / crushed_collar / pinpoint / underexposed × PNG + JPEG q95 = 80 files, 80/80. Median analyse 16.61 ms. Seed 1, PNG:
- even: hair bin 0 share 0.0, island 0, p5 222.0; collar bin 0 share 0.0, island 0, p5 24.0 (the green tie is already a dark garment, but it is not on the floor)
- crushed hair: bin 0 share 0.3186268941545312, island 85528, p5 0.0, floor mass 0.9715450848535793; the collar stays at p5 24.0
- crushed collar: bin 0 share 0.26730937773882557, island 1033, p5 0.0; the hair stays at p5 222.0
- pinpoint: island 21, bin 0 share 0.00023854419883226935 (that is 21 of 88,034 hair pixels). It stays
ok - underexposed: hair p5 93.0, collar p5 10.0, bin 0 share 0.0, island 0. Dark, but the floor is still open
The official photo-requirements guide already asks for even front light. This script does not replace that advice. It only tells you, before you spend $4.99 / 2 credits, whether the hair or the collar has already hit the floor.