title: How to store image locally from image URL by using jquery?
body: <p>I want to store image locally and use it to anywhere in tizen application.</p>
  
  <p>I tried by using canvas but canvas data uri not showing exact image which have in URL.</p>
  
  <p>The snippet of code who I am using.</p>
  
  <pre><code>var img = new Image();
  img.src = imageURL;
  
  var canvas = document.createElement('canvas');
  
  document.body.appendChild(canvas);
  
  var context = canvas.getContext('2d');
  
  context.drawImage(img, 0, 0);
  
  var data = context.getImageData(x, y, img.width, img.height).data;
  
  localStorage.setItem('image', data);
  </code></pre>