
Fast blurring algorithm written in JavaScript and demoed using YUI - donohoe
http://people.mozilla.org/~shaver/StackBlurDemo.html
======
there
off-topic, but this reminded me of an idea i had for a firefox extension: when
visiting a questionable url, be able to tell firefox to blur the page/image
heavily before rendering it. as you slowly decrease the blur and realize that
it's something obscene/gross, you can close the tab before seeing the gory
details that your eyes cannot unsee.

~~~
coryl
That's actually pretty funny.

But I think you'd get annoyed by blurred pages taking forever to unblur and
then not having anything bad on them. I think most people are desensitized
anyway, and just look off-image until they can close it.

------
RodgerTheGreat
And the important bit of the source:
[http://people.mozilla.org/~shaver/StackBlurDemo_files/StackB...](http://people.mozilla.org/~shaver/StackBlurDemo_files/StackBlur.js)

~~~
mahmud
Useless without the paper, imo. Here is the closest thing I could find:

<http://www.codeproject.com/KB/graphics/blurringwithcuda.aspx>

When I was a much bigger idiot, I used to read C sources for open source audio
codecs, in order to teach myself fixed-point numeric tricks. Turns out, there
are entire handbooks of that stuff, with prose. No need to reverse-engineer
precomputed tables with bleary eyes.

~~~
hurfadurf
Care to share links to any of those handbooks?

~~~
mahmud
The handbooks are at any university library, I use George Mason in U.S., and
UTS in Sydney.

The papers, however, are everywhere. Search for the SIGGRAPH stuff here:

<http://citeseerx.ist.psu.edu/>

Everything's there. See you in about a year :-)

------
shaver
The URL for this item points to my lightly hacked version, but the real thing
is at
[http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.h...](http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html)
. (I just made it update when the slider moved, instead of requiring a button
press, so that I could see how FF4 beta did at maintaining interactive perf
with it.)

~~~
user24
set radius to n where n>0, click render, set radius to 0, click render.

Doesn't unblur.

~~~
eru
Seconded. I am on Chrome (7.0.544.0 dev) on 64-bit Linux.

~~~
user24
Can't believe I forgot to include my platform in a bug report. What an ass.

Firefox 3.6.10 on OSX 10.6.4

------
pmjordan
I wonder what browsers support Canvas but not SVG's gaussian blur filter:

<http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement>

Canvas is of course arguably more flexible.

------
rriepe
Awesome. I tried to write something like this, but it was way out of my
league. Glad to see someone did it. Used correctly, blur can be really neat in
UIs.

------
c23gooey
very interesting indeed, but perhaps still not quite ready for production
systems:

moving the blur control back and forth in a fast motion creates some
interesting effects

~~~
drivebyacct2
Like what? I'm on Chrome 8.0.552.0 dev and can't make it not work perfectly.

~~~
failrate
If I slide it over to the right quickly, sliding back to the left doesn't
unblur it all the way.

~~~
Qz
That seems like more of a problem with the slider control.

