Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Convert Image to ByteArray

$
0
0

I have this image in xaml:
<Image x:Name="imageEntry" HeightRequest="240" />
the image will be added after browsing an image from phone gallery. So, when i'll be saving data after clicking save button, I need to get the image and convert to byte array.

async void OnSaveNoteButtonClicked(object sender, EventArgs args)
{
     Image img = imageEntry;
     byte[] imgdata = **Need to convert to byte array--img
     var N_Note = noteEntry.Text;
}

Can someone advice me how to do it. Thank you.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>