将图像裁剪成正方形 Xamarin.Forms

Cropping images to square in Xamarin.Forms

我正在尝试让用户查看 select/take 一张照片,然后查看裁剪图。我已经设法使用这个库来做到这一点: https://github.com/XAM-Consulting/Xam.Plugins.ImageCropper

但我想强制图像为正方形,而不是用户喜欢的任何纵横比。有谁知道怎么做吗?

还有其他 library/plugin 可以用来做这个吗?

你可以检查这个 repo,顺便说一句,它很棒,可以做你想做的事(而且还有图像缓存......) https://github.com/luberda-molinet/FFImageLoading

你可以使用这个:https://github.com/daniel-luberda/DLToolkit.Forms.Controls/tree/master/ImageCropView

<imgcrop:ImageCropView HeightRequest="300" WidthRequest="300" x:Name="cropView"
    Source="http://photos2.insidercdn.com/iphone4scamera-111004-full.JPG">
</imgcrop:ImageCropView>