title: Reducing base64 image memory size using Javascript
body: <p>I am using canvas.toDataURL() and getting the image in base64 format. But before uploading it to the server can I reduce the image's memory size say to 10KB? How can I do this using JavaScript or jquery?Code I am using is:</p>
  
  <pre><code>var context = canvas.getContext("2d");
  context.drawImage(imageObj, c.x, c.y, c.w, c.h, 0, 0, canvas.width, canvas.height);
  var vData = canvas.toDataURL();
  </code></pre>