Hi Here I am going to post the .NET tricks. Very useful one. You can also post your .NET tips here.
How to convert a Bitmap to a Byte Array
Here is some simple code that takes a bitmap and converts it to a byte array.
Dim myVar As MemoryStream = New MemoryStream Dim bitmapBytes As Byte()
'Create bitmap Dim bitmap As Bitmap = New Bitmap(50, 50)
bitmap.Save(myVar, System.Drawing.Imaging.ImageFormat.Jpeg)
bitmapBytes = myVar.ToArray
myVar.Close()
bitmap.Dispose()
thanks
