MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / changeBrightness

Function changeBrightness

examples/image_processing/image_editing.cpp:28–32  ·  view source on GitHub ↗

* brightness value should be in the rnage [0,1] * */

Source from the content-addressed store, hash-verified

26 * brightness value should be in the rnage [0,1]
27 * */
28array changeBrightness(const array &in, const float brightness,
29 const float channelMax = 255.0f) {
30 float factor = brightness * channelMax;
31 return (in + factor);
32}
33
34array clamp(const array &in, float min = 0.0f, float max = 255.0f) {
35 return ((in < min) * 0.0f + (in > max) * 255.0f +

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected