7 ms·
> Chances are if you are calling getImageData regularly, you are doing something wrong and inefficient. I would love to see stats on the use cases. Personally
by throwaway_bad 7y ago
> Chances are if you are calling getImageData regularly, you are doing something wrong and inefficient.
I would love to see stats on the use cases. Personally I have never used canvas other than to getImageData in a loop!
If I only needed to draw primitives, SVG is often a better choice.
If I needed something GPU accelerated, I would switch to webgl and write shaders.
So the only thing left 2D canvas is good for is to get the pixel data to do image processing on (e.g., flood fill connected components, color histograms, etc).