title: Save inline SVG as JPEG/PNG/SVG
body: <p>I have an inline SVG in my html, and I need to be able to save this as either a JPEG, PNG or SVG.</p>
  
  <p>I have tried a few different methods with converting the SVG to canvas and then converting to JPEG, but I haven't been able to get these working.</p>
  
  <p>Here is an example of my inline SVG.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.font {
   color: #ffffff;
   font-family: Roboto;
   font-weight: bold;
   text-transform: uppercase;
  }
  .name {
   font-size: 64pt;
  }
  .top-bar-text {
   font-size: 32pt;
  }
  .font tspan {
   dominant-baseline: middle;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href='http://fonts.googleapis.com/css?family=Roboto:700' rel='stylesheet' type='text/css'&gt;
  
  &lt;svg width="256" height="256" id="icon"&gt;
    &lt;rect class="bg1" id="bg_color_1" x="0" y="0" width="256" height="256" fill="#4cbc5a" /&gt;
    &lt;path class="bg2" id="bg_color_2" d="M 0 96 L0,256 L256,256 L256,96 s -128 96 -256 0" fill="#08a21c" /&gt;
    &lt;text id="left_corner_text" x="24" y="36" width="48" height="64" class="top_bar lct font top-bar-text" text-anchor="middle" fill="#ffffff"&gt;&lt;tspan&gt;1&lt;/tspan&gt;&lt;/text&gt;
    &lt;text id="right_corner_text" x="232" y="36" width="48" height="64" class="top_bar rct font top-bar-text" text-anchor="middle" fill="#ffffff"&gt;&lt;tspan&gt;2&lt;/tspan&gt;&lt;/text&gt;
    &lt;text id="line_1_text" transform="scale(1,2)" x="128" y="90" width="256" height="192" class="l1t font name" text-anchor="middle" fill="#ffffff"&gt;&lt;tspan&gt;ABC&lt;/tspan&gt;&lt;/text&gt;
  &lt;/svg&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Also, not all the elements need to be exported, as some of the options the user has is to remove the top corner numbers.</p>
  
  <p>I would like for when it's been converted to download straight to the browser.</p>