Click here to Skip to main content
16,020,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am opening an image and trying to convert it to a string, so later I can be able to display it in 1's and 0's. I am able to this in OpenFileDialog but when I am using the FileStream I am getting on line:
C#
img = new Bitmap(stream.ToString());

C#
FileStream stream = new FileStream(Application.StartupPath + @"\TestData\img001-001.png", FileMode.Open);

myImage.Image = Image.FromStream(stream); //display in pictureBox
img = new Bitmap(stream.ToString());
Posted
Updated 9-Nov-12 22:05pm
v2

1 solution

Ok manage to solve the problem

img = new Bitmap(stream);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900