Ottenere una BitmapSource da una Bitmap

.
   1:  private System.Windows.Media.Imaging.BitmapSource 
   2:          Bitmap2BitmapSource(System.Drawing.Bitmap bitmap)
   3:  {
   4:   System.Windows.Media.Imaging.BitmapSource bitmapSource =
   5:    System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
   6:    bitmap.GetHbitmap(),
   7:    IntPtr.Zero,
   8:    Int32Rect.Empty,
   9:    System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
  10:   
  11:    return bitmapSource;
  12:  }