Function tryToSRgb8
Tries to quantize normalized encoded sRGB into SRgb8.
All three source components must be finite values in inclusive [0, 1].
Values outside that domain, NaN, and infinities are rejected. No clipping
or gamut mapping occurs.
Quantization rounds to the nearest byte; exact half steps choose the larger byte. The endpoints map exactly: 0 maps to 0 and 1 maps to 255.
Parameters
| Name | Description |
|---|---|
| value | Normalized computational encoded-sRGB value. |
| output | Destination storage value. It is unchanged on failure. |
Returns
true when all components were stored; otherwise false.