Permalink
Browse files

Fixed bug 1392 - canvas shifting on using blur filter

  • Loading branch information...
anuragbhatnagar committed Nov 14, 2011
1 parent 5c7bcea commit 4a3eb5b28a8b4f384fb0319646057bd003988ea2
Showing with 4 additions and 4 deletions.
  1. +4 −4 processing.js
View
@@ -15481,7 +15481,7 @@
var sharedBlurRadius = p.shared.blurRadius;
var sharedBlurKernal = p.shared.blurKernel;
var pix = aImg.imageData.data;
-
+
for (y = 0; y < aImgHeight; y++) {
for (x = 0; x < aImgWidth; x++) {
cb = cg = cr = ca = sum = 0;
@@ -15499,7 +15499,7 @@
if (read >= aImgWidth) {
break;
}
- offset = (read + yi) *4;
+ offset = (read + yi) * 4;
m = sharedBlurKernal[i];
ca += m * pix[offset + 3];
cr += m * pix[offset];
@@ -15554,8 +15554,8 @@
pix[offset + 2] = cb / sum;
pix[offset + 3] = ca / sum;
}
- yi += aImgWidth;
- ymi += aImgWidth;
+ yi += aImgWidth-p.externals.canvas.width;
+ ymi += aImgWidth-p.externals.canvas.width;
ym++;
}
};

0 comments on commit 4a3eb5b

Please sign in to comment.