简体   繁体   中英

Cropping images to square in Xamarin.Forms

I'm trying to get a user to select/take a picture and then getting a crop view up. I have managed to do this using this library: https://github.com/XAM-Consulting/Xam.Plugins.ImageCropper

But I want to force the image to be a square, not any aspect ratio the user pleases. Is there anyone who knows how to do this?

Is there any other library/plugin that I can use for this?

您可以检查此存储库,顺便说一句,它可以完成您想要的操作(此外,还可以对图像进行缓存...) https://github.com/luberda-molinet/FFImageLoading

You can use this: 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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM