Android Image Resize

Hello everyone

Please could someone help me with what seems like it should be a simple task. In IOS I added 8 lines of code to achieve it but with Android I am coming unstuck.

I have the following code that I have used from the Image Picker demo on the Azure website:

    Android.Net.Uri uri = data.Data;

    Stream stream = ContentResolver.OpenInputStream(uri);

    PickImageTaskCompletionSource.SetResult(stream);

This code sits in the OnActivityResult and works perfectly well.

I am ultimately looking to simply resize the image to a width of 200 before it is converted to the steam and pushed back to the shared code.

There are so many post out there but I cant find one that works.

The dream solution would be for the user to crop the image to a square shape like on IOS too.

Many thanks

Sign In or Register to comment.