2
有没有人知道如何在没有任何图书馆的情况下在silverlight中裁剪图像。Silverlight图像裁剪
我有孩子窗口和子窗口里面我有一个图像和这个图像中心一个rectange在那里,所以我可以平移图像到周围的直肠,并选择图像的特定部分,这个选定的部分我想裁剪。
此外,我正在使用WriteableBitmap,并尝试裁剪,如果我错了,如果正确的话,这将无法正常工作。
sheetRectangle.Children是图像。
foreach (ucPicRect item in sheetRectangle.Children)
{
WriteableBitmap obj = new WriteableBitmap(item.imgCell.Source as BitmapSource);
obj.Crop(0,0,400,400);
obj.Invalidate();
item.imgCell.Effect = dlgcwEditPhoto.imgEdit.Effect;
item.imgCell.Source = obj;// dlgcwEditPhoto.imgEdit.Source;
}
谢谢...!