本文介绍了将图像转换为字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在打开图像并尝试将其转换为字符串,因此以后我可以在1英寸和0英寸的位置显示它.我可以在OpenFileDialog
中做到这一点,但是当我使用FileStream
时,我会上线:
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:
img = new Bitmap(stream.ToString());
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());
推荐答案
这篇关于将图像转换为字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!