updated Filter comments

This commit is contained in:
Eric Rowell
2012-11-04 11:35:17 -08:00
parent 656a7a63e4
commit 2e31d9f2b6
2 changed files with 6 additions and 4 deletions

View File

@@ -9,8 +9,11 @@
var brightness = config.val || 0;
var data = imageData.data;
for(var i = 0; i < data.length; i += 4) {
// red
data[i] += brightness;
// green
data[i + 1] += brightness;
// blue
data[i + 2] += brightness;
}
};

View File

@@ -13,6 +13,5 @@ Kinetic.Filters.Grayscale = function(imageData, config) {
data[i + 1] = brightness;
// blue
data[i + 2] = brightness;
// i+3 is alpha (the fourth element)
}
};