0
的圖片給圖片:作物WPF
Image tileSet = new Image();
tileSet.Source = new BitmapImage(new Uri(@".."));
我怎麼能cropt它,定義一個矩形區域?
的圖片給圖片:作物WPF
Image tileSet = new Image();
tileSet.Source = new BitmapImage(new Uri(@".."));
我怎麼能cropt它,定義一個矩形區域?
可以使用CroppedBitmap
用於該
var fullBitmap = new BitmapImage(new Uri(@".."));
tileSet.Source = new CroppedBitmap(fullBitmap, new Int32Rect(0, 0, 100, 100));
可能的複製[圖像的WPF操縱](http://stackoverflow.com/questions/438769/image-manipulating-with-wpf) –