IVideoFramePreviewBitmap Property

Returns a preview bitmap for the last video frame as an array of byte.

Definition

Namespace: ASCOM.Common.DeviceInterfaces
Assembly: ASCOM.Common (in ASCOM.Common.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
C#
byte[] PreviewBitmap { get; }

Property Value

Byte
The preview bitmap image.

Remarks

Must be implemented, must not throw an ASCOM.NotImplementedException.

The application can use this bitmap to show a preview image of the last video frame when required. This is a convenience property for those applications that don't require to process the ImageArray but usually only adjust the video camera settings and then record a video file.

When a 24bit RGB image can be returned by the driver this should be the preferred format.

Example

The following code can be used to create a Bitmap from the returned byte array
C#
1
2
3
4
using (var memStr = new MemoryStream(frame.PreviewBitmap))
{
bmp = (Bitmap)Image.FromStream(memStr);
}

Version Information

.NET Standard

Supported in: 2.0

See Also