Dim stream As MemoryStream = New MemoryStream
Dim bitmapBytes As Byte()
'Create bitmap
Dim bitmap As Bitmap = New Bitmap(50, 50)
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg)
bitmapBytes = stream.ToArray
stream.Close()
bitmap.Dispose()
Tip Submitted By: David McCarter
Discover more from dotNetTips.com
Subscribe to get the latest posts sent to your email.
