I am trying to use Pixastic JavaScript library for image manipulation in Windows 8 Metry Style app using JavaScript as language. I am passing canvas as input parameter and trying to get image and binging again to canvas but the image value that i am getting all the time is FALSE. CODE:
// First, draw it into the backing canvas
context.drawImage(video, 0, 0, width, height);
// change brightness and contrast
Pixastic.Client.isIE = false;
Pixastic.process(canvas, 'brightness',
{
'brightness': 2,
'contrast': 0.0,
'leaveDOM': true
},
function (img) {
if (img) {
context.putImageData(img, 0, 0);
}
}
);
I tried to find the reason and its said that this class returns false only if there is an internal error or some other problem occurs. when i debugged the code its runs fine no issue with my written code. But when i check inside Pixastic library i found that on one condition check its returning false
if(imageIsCanvas&&Pixastic.Client.isIE()){if(Pixastic.debug)writeDebug("Tried to process a canvas element but browser is IE.");return false;
I don't know how can i use Pixastic in my Windows 8 app. Can anyone suggest a way to use pixastic library in Windows 8 app?