public BitmapSource ConvertToSource(Bitmap map) { IntPtr ip = map.GetHbitmap(); BitmapSource bs; try { bs = Imaging.CreateBitmapSourceFromHBitmap(ip, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); } finally { SpriteView.DeleteObject(ip); } return(bs); }
public AnimationSelectWindow(SpriteView spriteView) { SpriteView = spriteView; InitializeComponent(); }