FA-10551 / Raster compositing / Open access
Unpremultiply transparent color · case 01
Premultiplied channels are exposed as straight channels and darken translucent pixels.
ROOT CAUSE
Premultiplied channels are exposed as straight channels and darken translucent pixels.
VERIFIED REPAIR
Use the stage contract: Input is valid premultiplied normalized RGBA. Divide RGB by nonzero alpha; represent fully transparent output as transparent black.
Unsuccessful approach: Clamping the divisor to at least one prevents recovery of every translucent color.
Case contract
Input is valid premultiplied normalized RGBA. Divide RGB by nonzero alpha; represent fully transparent output as transparent black.
Why this case matters
A deterministic software graphics stage with explicit channel and coordinate conventions; no hardware, device profile or API behavior is inferred.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(rgba):
return list(rgba)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0.5, 0.25, 0.125, 0.5],)), [1, 0.5, 0.25, 0.5])
check('fixture 2', solve(*([0, 0, 0, 0],)), [0, 0, 0, 0])
check('fixture 3', solve(*([0.25, 0.5, 1, 1],)), [0.25, 0.5, 1, 1])
check('fixture 4', solve(*([0, 0.125, 0, 0.25],)), [0, 0.5, 0, 0.25])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [0.5, 0.25, 0.125, 0.5] | [1, 0.5, 0.25, 0.5] | Failed |
| fixture 2 | [0, 0, 0, 0] | [0, 0, 0, 0] | Passed |
| fixture 3 | [0.25, 0.5, 1, 1] | [0.25, 0.5, 1, 1] | Passed |
| fixture 4 | [0, 0.125, 0, 0.25] | [0, 0.5, 0, 0.25] | Failed |
SHA-256 / c8cc2b137706f9ba920ae8bbac41bac2edc3aa0a0eb69149fa89d457144a2c07
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(rgba):
return [x/max(rgba[3],1) for x in rgba[:3]]+[rgba[3]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0.5, 0.25, 0.125, 0.5],)), [1, 0.5, 0.25, 0.5])
check('fixture 2', solve(*([0, 0, 0, 0],)), [0, 0, 0, 0])
check('fixture 3', solve(*([0.25, 0.5, 1, 1],)), [0.25, 0.5, 1, 1])
check('fixture 4', solve(*([0, 0.125, 0, 0.25],)), [0, 0.5, 0, 0.25])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [0.5, 0.25, 0.125, 0.5] | [1, 0.5, 0.25, 0.5] | Failed |
| fixture 2 | [0.0, 0.0, 0.0, 0] | [0, 0, 0, 0] | Passed |
| fixture 3 | [0.25, 0.5, 1.0, 1] | [0.25, 0.5, 1, 1] | Passed |
| fixture 4 | [0.0, 0.125, 0.0, 0.25] | [0, 0.5, 0, 0.25] | Failed |
SHA-256 / a81736c896c2763ce8b16b4ddf5a999bef199bceb1efcc9c21aac45ae437e6a0
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(rgba):
return [x/rgba[3] for x in rgba[:3]]+[rgba[3]] if rgba[3] else [0,0,0,0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([0.5, 0.25, 0.125, 0.5],)), [1, 0.5, 0.25, 0.5])
check('fixture 2', solve(*([0, 0, 0, 0],)), [0, 0, 0, 0])
check('fixture 3', solve(*([0.25, 0.5, 1, 1],)), [0.25, 0.5, 1, 1])
check('fixture 4', solve(*([0, 0.125, 0, 0.25],)), [0, 0.5, 0, 0.25])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [1.0, 0.5, 0.25, 0.5] | [1, 0.5, 0.25, 0.5] | Passed |
| fixture 2 | [0, 0, 0, 0] | [0, 0, 0, 0] | Passed |
| fixture 3 | [0.25, 0.5, 1.0, 1] | [0.25, 0.5, 1, 1] | Passed |
| fixture 4 | [0.0, 0.5, 0.0, 0.25] | [0, 0.5, 0, 0.25] | Passed |
SHA-256 / 9dc451a49115751130e4e202a1b3cd340f49d1bfa33be38650252427db1f37e7
Verification & scope
This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:39.947725+00:00.
Case digest / ef173c845c78137cbd55764e61e6cc5738cec818e18e5e53246f3672992912cd