How to convert Image to string in Xamarin Forms?

1

Good Friends.

I am trying to convert an element of type Xmarin.Forms.Image to a string to store it in a local database. And tried to use the one they use by converting an image to a string using the base part 64, but unlike C #, the Image type is different. I would like to help me.

Greetings from Honduras to the whole community.

    
asked by Joel Caballero 05.12.2017 в 17:49
source

1 answer

-1

Try the following code:

byte[] ImageData = File.ReadAllBytes(RutaFoto);
string base64String = Convert.ToBase64String(ImageData);
    
answered by 31.12.2018 в 17:05