Function tryToSRgba8
Tries to quantize normalized straight-alpha encoded sRGB into SRgba8.
RGB and alpha must all be finite values in inclusive [0, 1]. Failure
does not clip, premultiply, repair special values, or modify the destination.
RGB is quantized independently from straight alpha.
Quantization rounds to the nearest byte; exact half steps choose the larger byte.
Parameters
| Name | Description |
|---|---|
| value | Normalized straight-alpha encoded-sRGB computational value. |
| output | Destination storage value. It is unchanged on failure. |
Returns
true when RGB and alpha were stored; otherwise false.