WPF图片剪切

Image croppedImage = new Image();
            croppedImage.Width = 200;
            croppedImage.Margin = new Thickness(5);

            CroppedBitmap cb = new CroppedBitmap((BitmapSource)this.Resources["masterImage"], new Int32Rect(30, 20, 105, 50));       //select region rect
            croppedImage.Source = cb;
 

你可能感兴趣的:(WPF)