mjatfw
Last Updated: February 25, 2016
·
535
· rbgrouleff
187b362638009f68639af8485c5971b3

context.putImageData darkening semi transparent pixels

Updating a canvas repeatedly using context.getImageData/putImageData will result in darkening of semi transparent pixels.

Instead of reading the image data from the context again and again, keep the original image data and do the transformation on that and draw it on the canvas with putImageData.

Say Thanks
Respond