(img)
| 3071 | var LUMINANCE = [0.2125 / 255, 0.7154 / 255, 0.0721 / 255]; |
| 3072 | |
| 3073 | function invert(img) { |
| 3074 | /* Returns an image with inverted colors (e.g. white becomes black). |
| 3075 | */ |
| 3076 | return filter(img, function(p) { |
| 3077 | return [255-p[0], 255-p[1], 255-p[2], p[3]]; |
| 3078 | }); |
| 3079 | } |
| 3080 | |
| 3081 | function colorize(img, color, bias) { |
| 3082 | /* Returns a colorized image. |
nothing calls this directly
no test coverage detected
searching dependent graphs…