Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
LenaJS.grayscale = function(pixels, args) {
for (var i = 0; i <; i += 4) {
var r =[i],
g =[i+1],
b =[i+2];[i] =[i+1] =[i+2] = 0.2126*r + 0.7152*g + 0.0722*b;
return pixels;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.