Forum Xamarin.Android


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

How to convert Bitmap to Base64 png string

Hi i want to convert bitmap image to base64png format Please any one tell me how to convert it.

Best Answer


  • FranciscoGGFranciscoGG ESMember ✭✭

    @SebastianS How can we do the inverse? Bitmap to base64 string.

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    @FranciscoGG Bitmap to base64 string is written in the answer. Bitmap as byte array from base64 can be done with

    var imageBytes = Convert.FromBase64String(YourString);

  • Vikram_BVikram_B USMember ✭✭

    Hi How I can convert jpg format file into base64 format

    guide me .................

    i have the file in the D: drive supose how can i do that

  • XamarinDoctusXamarinDoctus COMember ✭✭

    With Bitmap to JPEG format:

    bitmap.Compress (Bitmap.CompressFormat.Jpeg, 0, stream);

  • @SebastianSeidel.9226 Thanks You!

    Solution this It work for me ^^

Sign In or Register to comment.