%ffp // works with tiles, 16 bit images and correct edge handling Title :"Gaussian Blur" Filename :"colorspace.8bf" Description:"Gaussian Blur Example." Copyright :"© 2007 GPL" Author :"Alois Zingl" Version :"1.1 6 Mai 2008" URL :"http://free.pages.at/easyfilter/filtermeister.html" Category :"easyFilter" ctl(0):"Blur (pixels)",divisor=10,range=(1,500) OnFilterStart: { double s = ctl(0)/(zoomFactor*7.4)+0.9; // Photoshop equivalent isTileable = !doingProxy; needPadding = fmin(256.0, s*sqrt(log(256.0)/log(2.0))); // radius bandWidth = 100+needPadding; // calc Gaussian bell shape s = -1.0/(s*s); for (i = 0; i < needPadding; i++) put((int)(32768.0*exp(i*i*s)), i); return false; } ForEveryTile: { int Blur = needPadding-1; // blur box radius int x, y, z; for (z = 0; z < planesWithoutAlpha; ++z) { if (updateProgress((1-doingProxy)*y_start*planesWithoutAlpha*4+(y_end-y_start)*(4*z+1), (doingProxy?y_end-y_start:Y)*planesWithoutAlpha*4)) abort(); // vertical blur... for (x = max(0, x_start-Blur); x