求大神指点vb.net的Bitmap图像数据怎么才能用BinaryReader写进去呀?
DimpicAsNewBitmap(500,600)DimmygraphicsAsGraphicsmygraphics=Graphics.FromImage(pic)my...
Dim pic As New Bitmap(500, 600)
Dim mygraphics As Graphics
mygraphics = Graphics.FromImage(pic)
mygraphics.CopyFromScreen(0, 0, 0, 0, Screen.PrimaryScreen.Bounds.Size)
我想把上面的 pic图像数据 用BinaryReader保存到 strRead 里面 要怎么写才对呀?我下面这样写是错的
Dim strRead As New BinaryReader(pic) 展开
Dim mygraphics As Graphics
mygraphics = Graphics.FromImage(pic)
mygraphics.CopyFromScreen(0, 0, 0, 0, Screen.PrimaryScreen.Bounds.Size)
我想把上面的 pic图像数据 用BinaryReader保存到 strRead 里面 要怎么写才对呀?我下面这样写是错的
Dim strRead As New BinaryReader(pic) 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励20(财富值+成长值)
展开全部
Dim bitmap As New Bitmap("笑汪源碰态"陵或)
Dim st As IO.Stream = New IO.MemoryStream()
bitmap.Save(st, Drawing.Imaging.ImageFormat.Bmp)
Dim bing As New IO.BinaryReader(st)
Dim st As IO.Stream = New IO.MemoryStream()
bitmap.Save(st, Drawing.Imaging.ImageFormat.Bmp)
Dim bing As New IO.BinaryReader(st)
追问
Dim FileBuff(8192)
bing.Read(FileBuff, 0, 8192)
Debug.Print(FileBuff(0))
不的行呀 bing 里面没有内容呀.....
追答
st.Seek(0, IO.SeekOrigin.Begin)
加在你的代码前面
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询