title: Resize bitmap image
body: <p>I want to have smaller size at image saved. 
  How can I resize it?
  I use this code for redering the image:</p>
  
  <pre><code>Size size = new Size(surface.Width, surface.Height);
  surface.Measure(size);
  surface.Arrange(new Rect(size));
  // Create a render bitmap and push the surface to it
  RenderTargetBitmap renderBitmap =
      new RenderTargetBitmap(
          (int)size.Width,
          (int)size.Height, 96d, 96d,
          PixelFormats.Default);
  renderBitmap.Render(surface);
  
  BmpBitmapEncoder encoder = new BmpBitmapEncoder();
  // push the rendered bitmap to it
  encoder.Frames.Add(BitmapFrame.Create(renderBitmap));
  // save the data to the stream
  encoder.Save(outStream);
  </code></pre>