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

Function adjust_contrast

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

Source from the content-addressed store, hash-verified

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]];
3128 });
3129 }
3130 var o = options || {};
3131 if (o.hue !== undefined)
3132 adjust_hue(pixels, o.hue);

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…