function tintshift(ImgElement)
{
var canvas = document.createElement("canvas");
canvas.width = ImgElement.width;
canvas.height = ImgElement.height;
var ctx = canvas.getContext("2d");
ctx.drawImage(ImgElement,0,0);
var im = ctx.getImageData(0,0,2600,1600);
var data = im.data;
for(var i = 0, len = data.length; i < len; i+=4)
{
data[i] = 255;
data[i+1] = 0;
data[i+2] = 0;
}
ctx.putImageData(im,0,0);
ImgElement.src = canvas.toDataURL();
}
This code is meant to take the image data and shift the hue to a different color, then replace the image with the newly colorized version. It works fine in Internet Explorer, however in chrome it hangs up on the "getImageData" method. I tested around with some alert calls, and nothing after that method will run.
Following somewhat this example http://jsfiddle.net/pHwmL/1/