May I ask about How to "Convert Image to Byte Array" and "Convert Byte Array to Image" in Xamarin.Forms?
But i'm facing problem to convert MediaFile into Byte[].
I'm using Xam.Plugin.Media ( http://www.nuget.org/packages/Xam.Plugin.Media ) to access camera and gallery.
Please kindly guide me how to convert MedieFile into Byte[].
Thank you.
Any sample source code for references?
Answers
@CheahEngSoon,
MediaFile
has GetStream().You could use this to the
Stream
and then convert that to abyte[]
. Here is one way to do that:@JohnMiller How about convert the bytes array to images?
@CheahEngSoon,
Hi, I'm really new with Xamarin.Forms.
How can I read the jpg file from a specific path I have to an image variable?
Can it be done at the PCL Project?
Thanks!
it wirk for me
an d image helper just copy this class to your project...