CropCommand command = new CropCommand();
command.Rectangle = new LeadRect()
{
Left = 100,
Top = 200,
Width = 100,
Height = 100
};
using (RasterImage image = RasterImageConverter.ConvertFromSource(img.Source, ConvertFromSourceOptions.None))
{
command.Run(image);
imgCrop.Source = RasterImageConverter.ConvertToSource(image, ConvertToSourceOptions.None);
}
imgCrop显示图片比例不对,图片变模糊
|
|