D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
sethkontny
Full window
Github gist
A Pen by Nathan Hackley.
<h1>Dynamic Image Blurring with JS</h1> <p>This is a demo of dynamic (in the sense that it works with any image, and processing is performed on the user's browser) image blurring with vanilla JavaScript.</p> <p>I saw this effect used beautifully on <A href="https://rdio.com">Rdio</a>, where they have (low res) track/album artwork form part of the page's background (100% width; ~1440px wide!)</p> <p>My implementation achieves that effect using a JavaScript image processing library called <a href="https://www.pixastic.com/">Pixastic</a>. The only disadvantage is it doesn't offer any callback functions, so you can't hide the image 'til it's processed... Or maybe you can, and I just don't know how. I am definitely going to play with this more.</p> <h2>Try it!</h2> <p>Replace the <code>src</code> attribute of the <code><img></code>, and see it blur.</p> <p>Modify the blur amount (between 0 and 5, float) in the JS to the far right.</p> <img id="blur-me" src="https://upload.wikimedia.org/wikipedia/en/thumb/f/fe/Audiovideodisco.jpg/220px-Audiovideodisco.jpg" />