Search code examples
formsxamarinxamarin.formscrop

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?


Solution

  • 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>