Please enable JavaScript to view this site.

uEye .NET Manual 4.97

Class

uEye.Display

Accessible

Camera.Display.Render

Syntax

uEye.Display.Render(uEye.Defines.DisplayRenderMode mode)

uEye.Display.Render(System.IntPtr windowHandle)

uEye.Display.Render(System.IntPtr windowHandle, uEye.Defines.DisplayRenderMode mode)

uEye.Display.Render(int memID, uEye.Defines.DisplayRenderMode mode)

uEye.Display.Render(int memID, System.IntPtr windowHandle)

uEye.Display.Render(int memID)

uEye.Display.Render()

uEye.Display.Render(int memID, System.IntPtr windowHandle, uEye.Defines.DisplayRenderMode mode)

Description

Using this method, you can output an image from an image memory in the specified window. For the display, Windows bitmap functionality is used. The image is displayed in the format you specified when allocating the image memory.

Allocate() defines in its parameters the color depth and display type. RGB16 and RGB15 require the same amount of memory but can be distinguished by the parameter.

hint_info

Display.Render() can render Y8 and RGB formats. For displaying YUV/YCbCr formats please use DirectRenderer.

hint_info

Thread safety

We recommend that you call the following method exclusively from a single thread in order to avoid unpredictable behavior of the application.

Render()

hint_info

Hint: This method only affects the display in DIB mode. It has no effect in Direct3D mode (for Direct3D see DirectRenderer).

Parameter

memID

ID of the image memory whose contents is to be displayed.

windowHandle

Output window handle

mode

Display mode to be set:

uEye.Defines.DisplayRenderMode.Normal: The image is rendered normally. It will be displayed in 1:1 scale as stored in the image memory.

uEye.Defines.DisplayRenderMode.FitToWindow: The image size is adjusted to fit the output window.

uEye.Defines.DisplayRenderMode.DownScale_1_2: Displays the image at 50 % of its original size.

Options which can be linked to the mode above using logical OR:

uEye.Defines.DisplayRenderMode.PlanarColorBlue: Displays only the blue channel of planar color format.

uEye.Defines.DisplayRenderMode.PlanarColorGreen: Displays only the green channel of planar color format.

uEye.Defines.DisplayRenderMode.PlanarColorRed: Displays only the red channel of planar color format.

uEye.Defines.DisplayRenderMode.PlanarMonoBlue: Displays only the blue channel as monochrome image.

uEye.Defines.DisplayRenderMode.PlanarMonoGreen: Displays only the green channel as monochrome image.

uEye.Defines.DisplayRenderMode.PlanarMonoRed: Displays only the red channel as monochrome image.

uEye.Defines.DisplayRenderMode.MirrorUpDown: Mirrors the displayed image along the horizontal axis.

uEye.Defines.DisplayRenderMode.Rotate_90: Rotates the image clockwise 90 degrees

uEye.Defines.DisplayRenderMode.Rotate_180: Rotates the image clockwise 180 degrees

uEye.Defines.DisplayRenderMode.Rotate_270: Rotates the image clockwise 270 degrees

Example

PictureBox pictureBox = new PictureBox();
pictureBox.Size = new System.Drawing.Size(1920,1080);
pictureBox.Location = new System.Drawing.Point(10, 10);
this.Controls.Add(pictureBox);
 
uEye.Defines.Status nRet = 0;
uEye.Camera hCam = new Camera();
nRet = hCam.Init(0);
nRet = hCam.Memory.Allocate();
nRet = hCam.Acquisition.Capture(uEye.Defines.DeviceParameter.Wait);
nRet = hCam.Display.Render(pictureBox.Handle,uEye.Defines.DisplayRenderMode.FitToWindow);