var imageData = context.getImageData(0, 0, canvas.width, canvas.height);
var data = imageData.data;
and
var data = context.getImageData(0, 0, canvas.width, canvas.height).data;
they both have different effect, why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’ve changed the code per your comments, i.e. you now have:
then your problem is probably that you’ve now got two separate copies of the image’s pixel data, and the one you’re modifying isn’t then the one that’s copied back.