Xamarin Forms how to crop \ resize image, get byte [] from ImageSource?

I can't find a way to implement the profile pic save, can anyone help me with an example? I am capturing an image using MediaPicker (from Xamarin Labs) and then dont know how to crop it or resize to smaller mb size, tried Xamarin Resizer but cannot crop the image if it is in the wrong format.

Can anyone help me? Maybe there is a component I am missing?

+3


source to share


1 answer


Check out this answer showing you how you can approach the resizing question.

The bottom line is that you can create a Xamarin Forms service and associated code that uses the built-in pruning functionality. Inner code performs much better - memory requirements, performance, etc.



For the exact trimming code, you can search SO for iOS and Android native solutions and convert them to Xamarin code

+2


source







All Articles