This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by xoriuz

hello all..

i just created new plugin for image manipulation, and have a problem to get the image pixels from canvas.

here is my code

getPixels: function(img) {
            var canvas = document.createElement('canvas');
            canvas.width =;
            canvas.height =;
            var context = canvas.getContext('2d');            
            return context.getImageData(0,0,canvas.width,canvas.height);

"img" is instance of ig.Image

the problem is on

it always throw error: "Uncaught TypeError: Type error"

did i do something wrong?
please kindly advice

1 decade ago by monkeyArms

Think you need:

context.drawImage(, 0, 0);
Page 1 of 1
« first « previous next › last »