CogDisplay CreateContentBitmap Method Cognex VisionPro
Returns the current content of the display (image and graphics) as a bitmap in a picture object.

Namespace: Cognex.VisionPro.Display
Assembly: Cognex.VisionPro.Display.Controls (in Cognex.VisionPro.Display.Controls.dll) Version: 65.1.0.0 (65.1.0.0)
Syntax

public virtual Image CreateContentBitmap(
	CogDisplayContentBitmapConstants content,
	[OptionalAttribute] CogRectangle contentRect,
	[OptionalAttribute] int bitmapSize
)

Parameters

content
Type: Cognex.VisionPro.Display CogDisplayContentBitmapConstants
The type of content bitmap to create.
contentRect (Optional)
Type: Cognex.VisionPro CogRectangle
The rectangle within the display to return as a bitmap.
bitmapSize (Optional)
Type: System Int32
The maximum dimension for the requested bitmap.

Return Value

Type: Image
The returned bitmap.
Exceptions

ExceptionCondition
AxHost InvalidActiveXStateException Thrown when the display control is invalid.
CogException Thrown when one of the followings happen: BitmapSize is less than 0, if return bitmap cannot be allocated, or CogSpaceTree errors if passed content rect cannot be mapped to pixel(#) space.
See Also