I have a table in which one particular column consists of images. On click of any of those images, a popup is opened in which the complete image can be viewed. I am using a canvas to paint the image within the popup as its saving me 30s in IE while opening the popup(for a very large image)
However, there is one particular image which is really big (Width 8386, Height-2229) and I sometimes get the error in IE "Not enough storage is available to complete this operation." against the line ctx.drawImage().It works sometimes but fails the rest of the times. Below is a code snippet.
_paintImage: function(base64Value){
var canvas = $(".image-measure-canvas")[0];
var ctx = canvas.getContext("2d");
var img = new Image();
img.onload = function(){
var width = this.width;
var height = this.height;
canvas.width = width;
canvas.height = height;
ctx.beginPath();
ctx.drawImage(this, 0, 0,width, height);
};
img.src = imageValue;
}