Returns a display bitmap corresponding to the image array that has been set.

Namespace: ASCOM.Utilities.Video
Assembly: ASCOM.Utilities.Video (in ASCOM.Utilities.Video.dll) Version: 6.1.0.0 (6.1.1.2619)

Syntax

C#
byte[] GetDisplayBitmapBytes()
Visual Basic
Function GetDisplayBitmapBytes As Byte()
Visual C++
array<unsigned char>^ GetDisplayBitmapBytes()

Return Value

Returns a byte array of the byte content of the 24bit RBG bitmap. The byte array also contains all relevant bitmap headers.

Examples

The following code can be used to create a Bitmap from the returned byte array
CopyC#
using (var memStr = new MemoryStream(cameraImage.GetDisplayBitmapBytes()))
{
    bmp = (Bitmap)Image.FromStream(memStr);
}
CopyVB.NET
Using memStr = New MemoryStream(cameraImage.GetDisplayBitmapBytes())
    bmp = DirectCast(Image.FromStream(memStr), Bitmap)
End Using

See Also