private BitmapSource CombineImage(BitmapSource img1,BitmapSource img2) { var composeImg = new RenderTargetBitmap(img1.PixelWidth, img1.PixelHeight+img2.PixelHeight, img1.DpiX, img1.DpiY, PixelFormat.Default ); var dv = new DrawingVisual(); using(var dc = dv.RenderOpen()) { dc.DrawImage(img1,new Rect(0,0,img1.PixelWidth,img1.PixelHeight)); dc.DrawImage(img1,new Rect(0,0,img2.PixelWidth,img2.PixelHeight)); composeImg.Render(dv); } return composeImg; }
,