Returns the current content of the display (image and graphics) as a bitmap in a picture object.
Namespace: Cognex.VisionPro.DisplayAssembly: Cognex.VisionPro.Display.Controls (in Cognex.VisionPro.Display.Controls.dll) Version: 65.1.0.0 (65.1.0.0)
Syntax
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: ImageThe returned bitmap.
Exceptions
| Exception | Condition |
|---|---|
| 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