Luca Panjer
Luca Panjer

Reputation: 125

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?

Upvotes: 1

Views: 6373

Answers (2)

Daniel Luberda
Daniel Luberda

Reputation: 7454

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>

Upvotes: 2

Umar3x
Umar3x

Reputation: 1084

You can check this repo, which is great btw and will do what you want (and moreover with caching on images ... ) https://github.com/luberda-molinet/FFImageLoading

Upvotes: 2

Related Questions