title: Change html canvas black background to white background when creating jpg image from png image
body: <p>I have a <code>canvas</code> which is loaded with a <code>png</code> image. I get its <code>jpg</code> base64 string by <code>.toDataURL()</code> method like this:</p>
  
  <pre><code> $('#base64str').val(canvas.toDataURL("image/jpeg"));
  </code></pre>
  
  <p>But the transparent parts of the <code>png</code> image are shown black in the new <code>jpg</code> image.</p>
  
  <p>Any solutions to change this color to white? Thanks in advance.</p>