You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matt Ellen edited this page Oct 28, 2015
·
4 revisions
Takes an ImageData and a boolean to determine if the alpha values should be inverted.
Returns a new ImageData object with the colour channels inverted from the original, and the alpha channel, too, if the boolean passed in was true.
var imageData = jsia.getImageDataFromImg(document.getElementById('jsiaImg'));
var invertedData = jsia.imageDataInvertedColour(imageData, false);
//ImageData { width=640, height=480, data=Uint8ClampedArray}