Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing array reference

  • Loading branch information...
commit ea0af97204cb62432257c01940edb261ca057373 1 parent 0043591
Dave Shea authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 demo/script/paintbrush-0.2.js
8 demo/script/paintbrush-0.2.js
View
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.