diff options
author | Jean-Luc Brouillet <jeanluc@google.com> | 2015-05-04 14:24:48 -0700 |
---|---|---|
committer | Jean-Luc Brouillet <jeanluc@google.com> | 2015-06-13 23:17:55 -0700 |
commit | d48068b090cb7d8dc9daed6a7d17c97f38747021 (patch) | |
tree | 553e5d730ea254a8f49654bea83e002cf3c3adaf | |
parent | 61c124a7be3c8900c34a27a64e84c73c549fa808 (diff) | |
download | rs-d48068b090cb7d8dc9daed6a7d17c97f38747021.tar.gz |
Clarify rsPackColorTo8888 restrictions
b/13186099
Change-Id: Ia5f34d50c0ba6db1f07bee62b50a6a00421a9f74
(cherry picked from commit f1001ad7dea3814e499cf28e6d0d95852244edc6)
-rw-r--r-- | api/rs_convert.spec | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/api/rs_convert.spec b/api/rs_convert.spec index ed531992..fbc2cf3d 100644 --- a/api/rs_convert.spec +++ b/api/rs_convert.spec @@ -81,9 +81,13 @@ arg: float g, "Green component." arg: float b, "Blue component." summary: Create a uchar4 RGBA from floats description: - Packs three or four floating point RGBA values into a uchar4. The RGBA values should be - between 0.0 and 1.0 inclusive. Values outside of this range are clamped to this range. - However numbers greater than INT_MAX or less than INT_MIN can result in undefined behavior. + Packs three or four floating point RGBA values into a uchar4. + + The input values are typically between 0.0 and 1.0 inclusive. For input values outside + of this range, the resulting outputs will be clamped to be between 0 and 255. As this + clamping may be done after the input is multiplied by 255.f and converted to an integer, + input numbers greater than INT_MAX/255.f or less than INT_MIN/255.f can result in + undefined behavior. If the alpha component is not specified, it is assumed to be 1.0, i.e. the result will have an alpha set to 255. |