Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9201705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:04:50+00:00 2026-06-17T23:04:50+00:00

I have a base64 string and I want convert that to an image and

  • 0

I have a base64 string and I want convert that to an image and set the Source of an Image control to the result of that.

Normally I would do that using Image.FromStream, similar to this:

Image img;
byte[] fileBytes = Convert.FromBase64String(imageString);
using(MemoryStream ms = new MemoryStream())
{
    ms.Write(fileBytes, 0, fileBytes.Length);
    img = Image.FromStream(ms);
}

However, the Image.FromStream method does not exist on Windows Phone, and a casual search only turns up results that depend on that method.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:04:51+00:00Added an answer on June 17, 2026 at 11:04 pm

    You can use a method like this:

        public static BitmapImage base64image(string base64string)
        {
            byte[] fileBytes = Convert.FromBase64String(base64string);
    
            using (MemoryStream ms = new MemoryStream(fileBytes, 0, fileBytes.Length))
            {
                ms.Write(fileBytes, 0, fileBytes.Length);
                BitmapImage bitmapImage = new BitmapImage();
                bitmapImage.SetSource(ms);
                return bitmapImage;
            }
        }
    

    Add an image to your XAML, such as this:

        <Image x:Name="myWonderfulImage" />
    

    You can then set the source, like this:

    myWonderfulImage.Source = base64image(yourBase64string);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a binary that I want to convert to standard MIME-compliant base64 string.
I have an image coded as base64 String, and I want to pass it
I have a base64 string that contains not printable chars. I want to modify
I have a Base64 jpeg image string which is a simple signature image. I
I have an app which requires downloading image asynchronously in base64 encoded string(server is
I have a web service that returns a base64 encoded string of a PDF
I want to decrypt the string in base64 format. I have some data in
I want to upload the image using the .NET webservices and that will be
I want to save an image as a base64 string as part of a
I have come across some Base64 conversion functions in .net(FromBase64.string etc). What i want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.