src/utils/convert.js
/**
* Rendering image element (with resizing) and get its data URL
*/
Rendering image element (with resizing) and get its data URL
Rendering image element ( with resizing ) and get its data URL
function renderImageToDataURL(img, options, doSquash) {
  var canvas = document.createElement('canvas');
  renderImageToCanvas(img, canvas, options, doSquash);
  return canvas.toDataURL("image/jpeg", options.quality || 0.8);
}
function renderImageToDataURL ( img , options , doSquash ) { var canvas = document . createElement ( 'canvas' ) ; renderImageToCanvas ( img , canvas , options , doSquash ) ; return canvas . toDataURL ( "image/jpeg" , options . quality || 0.8 ) ; }
Rendering image element (with resizing) and get its data URL
Rendering image element ( with resizing ) and get its data URL