How to crop image and save into ImageSource in WPF?
I am new learner to WPF. here I got a question. I have a image, width:360, height:360. Here I want to crop this image like below: ( 0,0 ) to (120,120) save to the first ImageSource object, (120,0 ) to (240,120) save to the second ImageSource object, (240,0 ) to (360,120) save to the third ImageSource object;, …… pls see more details in below picture: My code sample below: private void CutImage(string img) { int iLeft = 0; int iTop = 0; int count = 0; Image thisImg = new Image(); BitmapImage src = new BitmapImage(); src.BeginInit(); src.UriSource = new Uri(img, UriKind.Relative); src