title: Store image taken with getPicture directly into sqlite database phonegap
body: <p>Hey everyone I know that its a controversial topic about storing either the image or the path to the image in the database however for this particular application when the user takes the picture I do not want them to be able to access it and with the way I transmit data to the server I need to send the blob. </p>
  
  <p>Does anyone have a function that will take a picture and save it straight into a column in the sqlite database as a blob? </p>
  
  <p>Thanks,
  Currently I only have the following functions to handle images: </p>
  
  <pre><code>var pictureSource;  
  var destinationType;
  
  function onPhotoDataSuccess(imageData) {
      console.log("* * * onPhotoDataSuccess");
      var cameraImage = document.getElementById('cameraImage');
      cameraImage.style.visibility = 'visible';
      cameraImage.src = "data:image/jpeg;base64," + imageData;
  }
  
  function take_pic() {
      navigator.camera.getPicture(onPhotoDataSuccess, function(ex) {
          alert("Camera Error!");
      }, { quality : 30, destinationType: Camera.DestinationType.DATA_URL });
  }
  </code></pre>
  
  <p>Thanks again everyone! </p>