2

Is there any way to blur images with JavaScript/jQuery so that when they are blured I can sharpen them by hovering them with the mouse?

Anders
  • 8,307
  • 9
  • 56
  • 88
  • possible duplicate of http://stackoverflow.com/questions/1966949/gaussian-blur-onhover-using-jquery – g_thom Aug 11 '11 at 08:04

2 Answers2

1

Pixastic can do that for you. Here's the relevant doc: http://www.pixastic.com/lib/docs/actions/blur/

To blur:

Pixastic.process(document.getElementById('demoimage'), 'blur');

To revert:

Pixastic.revert(document.getElementById('demoimage'));

The entire solution with jQuery:

var blur = function () {
    Pixastic.process(this, 'blur');
};

var unblur = function () {
    Pixastic.revert(this);
};

$('img').each(blur).hover(unblur, blur);
katspaugh
  • 17,449
  • 11
  • 66
  • 103
1

There is a plugin for jQuery called blur.js http://blurjs.com which uses my very fast Stack Blur algorithm: http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html

Quasimondo
  • 2,485
  • 1
  • 22
  • 30