To any canvas pros out there–I need help.
I'm using node-canvas and I'm trying to get imageData
using it's getImageData
method.
Unfortunately it returns:
interface ImageData {
readonly attribute unsigned long width;
readonly attribute unsigned long height;
readonly attribute CanvasPixelArray data;
}
CanvasPixelArray
is deprecated in favor of Uint8ClampedArray
.
My question is:
Is there a way for getImageData
to return Uint8ClampedArray
or to convert CanvasPixelArray
to Uint8ClampedArray
?
If that's not the case, maybe someone can point me to some other implementation of canvas in node?
Any help would be greatly appreciated, thank you in advance!