= xyzcnv =
== Syntax == :int xyzcnv(int x, int y, int z, int m11, int m12, int m13, int m21, int m22, int m23, int m31, int m32, int m33,int d) == Arguments == :x, y, z ::x, y and z coordinates of the image :m11 - m33 ::Weights of the 3x3 pixel matix :d ::Division value which usually should be m11+m12+m13+m21+m22+m23+m31+m32+m33. If you set d to zero this sum will be used automatically. == Return == :Returns the convoluted value from the 3x3 matrix at the coordinates (x,y,z) == Description == :Calculates a 3x3 convolution kernal. This is a substitute for the cnv() function which can't be used in the ForEveryTile handler. Currently works only with 8-bit images. == Example == <code> %ffp //Produces a Blur effect ForEveryTile: {int calc; for (y=y_start; y<y_end; y++){ updateProgress(y,y_end); for (x=x_start; x<x_end; x++){ for (z=0; z<Z; z++){ calc = xyzcnv (x,y,z, 4,4,4, 4,16,4, 4,4,4, 0); pset(x, y, z, calc ); }}} return true; }</code> == Also see == :cnv == Comments == :Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too. |