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 9180211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:59:23+00:00 2026-06-17T17:59:23+00:00

I am basically developing a software in Visual Studio 2010 .NET 4.0 where in

  • 0

I am basically developing a software in Visual Studio 2010 .NET 4.0 where in I capture the screenshot from a pc and send it over a network to another.
Since I cannot directly send a Bitmap, I have to convert it to String.
I did a lot of internet search but cant find any solution. 🙁

I found this code on stackoverflow itself.
But it it doesnt work. I tried to print the string (converted from image) but the program behaves like that line doesnt exist.
I used a MessageBox.Show(String);
But not even a msg box pops up!
Can anyone please help? I’m stuck!
Thankx in advance 🙂 (Y)

bitmapString = null;       // Conversion from image to string
MemoryStream memoryStream = new MemoryStream();
bmpScreenshot.Save(memoryStream, ImageFormat.Png);
byte[] bitmapBytes = memoryStream.GetBuffer();
bitmapString = Convert.ToBase64String(bitmapBytes,Base64FormattingOptions.InsertLineBreaks); // Conversion from image to string end

Image img = null;                           //Conversion from string to image
byte[] bitmapBytes = Convert.FromBase64String(rob);
MemoryStream memoryStream = new MemoryStream(bitmapBytes);
img = Image.FromStream(memoryStream);   //Conversion from string to image end
  • 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-17T17:59:25+00:00Added an answer on June 17, 2026 at 5:59 pm

    Try to convert it to a byte array:

    public static byte[] ImageToByteArray(Image img)
    {
        byte[] byteArray = new byte[0];
        using (MemoryStream stream = new MemoryStream())
        {
            img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
            stream.Close();
    
            byteArray = stream.ToArray();
        }
        return byteArray;
    }
    

    I believe you can simply cast a Bitmap object to an Image object. So Image img = (Image)myBitmap; – then pass that into the method above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a custom aspx form for a SharePoint list in Visual Studio, basically
The code is from Stanford iOS developing course's Photomania app. Basically I want to
I am developing an application in Visual C# using winforms. The application is basically
I'm currently developing a framework that basically executes another application, e.g. rails within the
I am developing an add-in for outlook 2010. Basically, I have a button on
Basically I'm developing application using asp.net and I want to write Custom validator which
I am developing an app which basically should download a list of events from
Does it exist? Basically I'm developing a Django app on my local machine, when
I am developing an Android Service basically I set an alarm every 3 minutes
I'm developing a small application using Blend, basically what I have in my application

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.