4 ms·
The naive method is slow because it repaints the image several times. A faster way is a sort of double buffering: copy the image to an array, perform the fill o
by occamrazor 3y ago
The naive method is slow because it repaints the image several times. A faster way is a sort of double buffering: copy the image to an array, perform the fill on the array, copy the array to the canvas image data.
The method in TFA is however faster for static images, after the preprocessing.
- shaneos 3y agoThere’s a trade off between speed and showing progress to the user. I find it better to show slow progress rather than wait 500 - 1000ms to do it faster, but it depends on the use case