Skip to content Skip to sidebar Skip to footer

Getimagedata() Returning All 0's

So, I have a function like this: var getRGBArray = function (img) { // create the canvas we need to work with var canvas = document.createElement('canvas'); // get th

Solution 1:

I found the issue. In context.drawImage() I wasn't passing in the start position. The fix is to change it so it's like: context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight). Thank you for your help!


Post a Comment for "Getimagedata() Returning All 0's"