renderToImage (scale = 2) {
    // Get the SVG in string-form
    const string = this.renderToString();

    // Encode the string into a data URI
    const uri = helpers.svgToBase64(string, btoa);

    // Convert to png and fulfill promise
    return svg2png(uri, {
      width: this.computeConfiguration().card.width * scale,
      height: this.computeConfiguration().card.height * scale
    })
    .then((buffer) => {
      return buffer.toString('base64');
    });
  }
/**
   * Renders the current configuration to an image
   *
   * @param {number} scale - The scale to output at
   */
Renders the current configuration to an image
@param {number} scale - The scale to output at
Renders the current configuration to an image @param { number } scale - The scale to output at
renderToImage (scale = 2) {
    const string = this.renderToString();
    const uri = helpers.svgToBase64(string, btoa);
    return svg2png(uri, {
      width: this.computeConfiguration().card.width * scale,
      height: this.computeConfiguration().card.height * scale
    })
    .then((buffer) => {
      return buffer.toString('base64');
    });
  }
renderToImage ( scale = 2 ) { const string = this . renderToString ( ) ; const uri = helpers . svgToBase64 ( string , btoa ) ; return svg2png ( uri , { width : this . computeConfiguration ( ) . card . width * scale , height : this . computeConfiguration ( ) . card . height * scale } ) . then ( ( buffer ) => { return buffer . toString ( 'base64' ) ; } ) ; }
Renders the current configuration to an image
 @param {number} scale - The scale to output at
Renders the current configuration to an image @param { number } scale - The scale to output at
// Get the SVG in string-form // Encode the string into a data URI // Convert to png and fulfill promise