Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to convert a Bitmap to a base64 string c# xamarin universal

using(var stream = new MemoryStream())
{
   yourBitmap.Compress(Bitmap.CompressFormat.Png,0, stream);

    var bytes = stream.ToArray();
    var str = Convert.ToBase64String(bytes);
}
Source by forums.xamarin.com #
 
PREVIOUS NEXT
Tagged: #convert #Bitmap #string #xamarin #universal
ADD COMMENT
Topic
Name
3+9 =