locked
HTML5/JS 'getImageData' unsupported?

    Question

  • Hi, I am trying to get pixel rgb information from canvas using 'getImageData', but when I execute this, I get an error "JavaScript runtime error: Object doesn't support property or method 'getImageData' ". Am I missing something to use this method? I tried using this in a blank app template, and it did not work. I am able to draw on canvas fine, but I can't use this method or 'putImageData'. Heres my sample code in javascript: 

    var ctx = document.getElementById('canvas1');
            var data = ctx.getImageData(0, 0, 1, 1);
    
            console.log(data[0]);
    Thanks in advance for any responses

    Friday, September 6, 2013 6:19 PM

Answers