MCPcopy Index your code
hub / github.com/clips/pattern / adjust_brightness

Function adjust_brightness

pattern/canvas.js:3120–3124  ·  view source on GitHub ↗
(pixels, m)

Source from the content-addressed store, hash-verified

3118 });
3119 }
3120 var adjust_brightness = function(pixels, m) {
3121 pixels.map(function(p) {
3122 return [p[0] + m, p[1] + m, p[2] + m, p[3]];
3123 });
3124 }
3125 var adjust_contrast = function(pixels, m) {
3126 pixels.map(function(p) {
3127 return [(p[0]-128)*m + 128, (p[1]-128)*m + 128, (p[2]-128)*m + 128, p[3]];

Callers 1

adjustFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…