I’d like to be able to make an empty PixelArray to compare with output from node-canvas from within JavaScript.
For example:
var cleanData = new PixelArray ( 20 );
Is this possible? Am I on the wrong version of Node.js? (0.8.3)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Uint8ClampedArray works.
Some background:
http://www.khronos.org/registry/typedarray/specs/latest/#7.1 Uint8ClampedArray is defined in order to replace CanvasPixelArray. It behaves identically to the other typed array views, except that the setters and constructor use clamping [WEBIDL] rather than modulo arithmetic when converting incoming number values.