By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

memorystream bytes to bitmap

P: n/a
Hi, I have some code here
Dim g As Graphics
Dim g2 As Graphics
Dim bm As Bitmap
Dim bm2 As Bitmap
Dim bitmapbytestream() As Byte
Dim b2() As Byte
Dim ms As New MemoryStream()

bm.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp)
bitmapbytestream = ms.ToArray
bm2 = New Bitmap(71, 92)
Dim STRM As New MemoryStream(bitmapbytestream)
bm2 = Bitmap.FromStream(STRM)
pbo1.Image = bm2

I'm sure there is something silly missing but have tried numerous variations
and no matter what I do the image in the picture box pbo1 appears totally
black.
bm by the way is an image already succesfully stored.

Any help would be great.
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a


Nov 21 '05 #2

P: n/a
Sorry, not deliberate, got an error when I posted this and presumed obviously
incorrectly that it hadn't been processed.

"Cor Ligthert" wrote:


Nov 21 '05 #3

P: n/a
> Sorry, not deliberate, got an error when I posted this and presumed
obviously

No problem, however when I put double post in the subject than everybode can
see that, there is no need to excuse.

Cor
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.