E
E
Evgeny Nizamiev2014-07-09 11:31:38
JavaScript
Evgeny Nizamiev, 2014-07-09 11:31:38

How to use blur algorithm?

I was looking for an algorithm for fast blurring of an image, I found it here . fourth algorithm.
It seems that the tests are not very bad, but the question arose of how to use it, i.e. what should be done to blur the image (more precisely canvas)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Lesnykh, 2014-07-09
@RadiationX

It also says what the arguments mean - source channel, target channel, width, height, radius. That is, the original pixel array, the resulting pixel array, the width, height, and blur radius. The algorithm is applied pixel by pixel, shifting it to the adjacent color depending on the radius. So, before applying the algorithm, you need to get a pixel map of the image.
And the pixel map can be obtained like this:

canvas.getImageData(0, 0, canvas.width, canvas.height)

I
Ivan, 2014-07-09
@0neS

Try www.quasimondo.com/StackBlurForCanvas/StackBlurDem...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question