Answer the question
In order to leave comments, you need to log in
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
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)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question