title: How do I Convert a canvas into an image
body: <p>I am looking to convert a canvas to image in WPF. I am using RenderTargetBitMap for exporting and it is works great. </p>
  
  <p>My problem is if canvas's height is more than max integer value, getting an exception in below code. </p>
  
  <pre><code>RenderTargetBitmap renderBitmap =new RenderTargetBitmap((int)canvas.Width,(int)canvas.Height,96d,96d,PixelFormats.Pbgra32);
  </code></pre>
  
  <p>The error message is </p>
  
  <blockquote>
    <p>"Value does not fall within the expected range"</p>
  </blockquote>
  
  <p>So how can I export a canvas with height more than 39,000 px to image ?</p>