G
Guest
I have the following snippet of code with bm being a succesfully stored bitmap
(not including all the code just the relevant bits)
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 have tried numerous different wys of this but I can only get a black image
displayed in my picturebox pbo1, anybody have any ideas where I am going
wrong?
Thanks,
barry.
(not including all the code just the relevant bits)
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 have tried numerous different wys of this but I can only get a black image
displayed in my picturebox pbo1, anybody have any ideas where I am going
wrong?
Thanks,
barry.