Permalink
Browse files

Fixing array reference

  • Loading branch information...
1 parent 0043591 commit ea0af97204cb62432257c01940edb261ca057373 @mezzoblue committed Aug 30, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 demo/script/paintbrush-0.2.js
@@ -397,11 +397,13 @@ function addFilter(filterType) {
};
// apply the value from the current matrix position
- sumR += currentPixel.r * matrix[w + h];
- sumG += currentPixel.g * matrix[w + h];
- sumB += currentPixel.b * matrix[w + h];
+ sumR += currentPixel.r * matrix[w + h * matrixSize];
+ sumG += currentPixel.g * matrix[w + h * matrixSize];
+ sumB += currentPixel.b * matrix[w + h * matrixSize];
}
}
+
+
// get a reference for the final pixel
var ref = convertCoordinates(i, j, imgWidth) << 2;

0 comments on commit ea0af97

Please sign in to comment.