text: /**
   * http://stackoverflow.com/questions/6150289/how-to-convert-image-into-base64-string-using-javascript
   * Convert an image
   * to a base64 url
   * @param  {String}   url
   * @param  {Function} callback
   * @param  {String}   [outputFormat=image/png]
   */
  
  (function () {
      function convertImgToBase64URL(url, callback, outputFormat){
          var img = new Image();
          img.crossOrigin = 'Anonymous';
          img.onload = function(){
              var canvas = document.createElement('CANVAS'),
              ctx = canvas.getContext('2d'), dataURL;
              canvas.height = this.height;
              canvas.width = this.width;
              ctx.drawImage(this, 0, 0);
              dataURL = canvas.toDataURL(outputFormat);
              callback(dataURL);
              canvas = null;
          };
          img.src = url;
      }
  
      window['convertImgToBase64URL'] = convertImgToBase64URL;
  })();
  