title: Signature pad saving image
body: <p>I am trying out signature pad and set up one of the examples fine. But i can't figure out how to save the image to jpeg or something like that.</p>
  
  <p>I am trying to save the image and then display it in the placeholder so i can see that it works.</p>
  
  <p>Below is my code:</p>
  
  <h1>Default.aspx</h1>
  
  <pre><code>&lt;head runat="server"&gt;
  &lt;script src="scripts/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/jquery.signaturepad.min.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/json2.min.js"&gt;&lt;/script&gt;
  
   &lt;link rel="stylesheet" href="scripts/jquery.signaturepad.css"/&gt;
     &lt;script type="text/javascript"&gt; 
         $(document).ready(function () {
             $('.sigPad').signaturePad({ drawOnly: true });
  
         });
  
  
  &lt;/script&gt;
       &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server" class="sigPad"&gt;
   &lt;label for="name"&gt;Print your name&lt;/label&gt;
    &lt;input type="text" name="name" id="name" class="name"/&gt;
    &lt;p class="drawItDesc"&gt;Draw your signature&lt;/p&gt;
    &lt;ul class="sigNav"&gt;
      &lt;li class="drawIt"&gt;&lt;a href="#draw-it"&gt;Draw It&lt;/a&gt;&lt;/li&gt;
      &lt;li class="clearButton"&gt;&lt;a href="#clear"&gt;Clear&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;div class="sig sigWrapper"&gt;
      &lt;div class="typed"&gt;&lt;/div&gt;
      &lt;canvas class="pad" width="198" height="55"&gt;&lt;/canvas&gt;
      &lt;input type="hidden" name="output" class="output"/&gt;
    &lt;/div&gt;
    &lt;button type="submit"&gt;I accept the terms of this agreement.&lt;/button&gt;
  
          &lt;asp:PlaceHolder ID="PlaceHolder1" runat="server"&gt;&lt;/asp:PlaceHolder&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h1>Default.aspx.cs</h1>
  
  <pre><code>  protected void Page_Load(object sender, EventArgs e)
      {
          if (IsPostBack)
          {
              var sigToImg = new SignatureToImage();
              var signatureImage = sigToImg.SigJsonToImage(signatureJson);
  
              // I want to be able to add the image to Placeholder1 after the post back
          }
      }
  </code></pre>