int cnvX(int k, int off, int d, function* pGetf, int x, int y, int z)
The integer result obtained by summing the products of the n kernel coefficients with n image pixels in the X or Y direction, and dividing the sum by 'd'.
Applies a 1-D convolution to the image in the horizontal / x direction. That is, cnvX convolves pixels at co-these ordinates:
(x-k,y), (x-k+1,y), ... (x-1,y), (x,y), (x+1,y), ... (x+k-1,y), (x+k,y)
%fml // 3-pixel radius blur in the x-direction ForEveryTile: { // Convolution co-efficients // in first 7 cells put(1, 0); put(2, 1); put(3, 2); put(4, 3); put(3, 4); put(2, 5); put(1, 6); int val; for (z = 0; z < 3; z++) { for (y = y_start; y < y_end; y++) { for (x = x_start; x < x_end; x++) { val = cnvX(3, 0, 16, src, x, y, z); pset(x, y, z, val); } } } return true; }