Crop image from file (after picking it up with MediaPlugin from James Montemagno)

Hello!
I use MediaPlugin from James Montemagno to get an image (github.com/jamesmontemagno/MediaPlugin). This saves an image file in a specified path, wether the user chooses to take the image from the camera or from the gallery.

Now, the only thing I have is the path of the image's file. I want to take this image and crop it automatically in a square (centered in the image) removing top and bottom excess (or left and right excess if the image is in landscape).

I have only found answers saying that I should use System.Drawing.Bitmap but this is an only Windows class... Any suggestion?

Answers

  • CameronCameron USMember ✭✭

    Try ImageCropView. I've used it with success, it's made to work with FFImageLoading.

  • aveschiniaveschini Member ✭✭

    Thanks but this is not what I was looking for... I didn't want to present the user with a View that cropped an image rather then taking the image file chosen by the user from the gallery and then modifying that file to become a squared image.

    Anyway, I solved my issue in another way: I just make the Image (the view inside my grid, not the file) as a square and then present my "not square" image in it, so it seems like it is a square even if it is not.

    Thanks anyway!

Sign In or Register to comment.