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

12,242

Take a look at this answer, showing you how you can approach the issue of resizing.

The essence is you can create a Xamarin Forms service and corresponding code that uses native functionality to crop. Native code performs much better - memory requirements, performance etc.

For the exact cropping code you can search SO for iOS and Android native solutions and transform them to Xamarin code

Share:
12,242
animekun
Author by

animekun

Updated on June 05, 2022

Comments

  • animekun
    animekun almost 2 years

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

    Can somebody help me with that? May be there is component that I'm missing?