G
Guest
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.
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.