Information

The attributes and functions explained on this page can be found in the category Info.

You can use the following attributes to query information about the displayed image or specific pixels in that image.

ImageSize

Original size of the displayed image. This corresponds to the image size in the PLC.

ImageDisplaySize

Displayed size of the image in pixels.

PixelColor

Color of a specific selected pixel (see below for details). The color is provided as an array of four elements representing the color channels [R, G, B, A].

PixelPosition

Position of a specific selected pixel (see below for details). The position is specified as an array with two elements [X, Y] in original image coordinates, not in display coordinates.

The PixelColor and PixelPosition are calculated for a specific pixel. The selection of this pixel is done by a click, a touch or by the position of the cursor on the displayed image.

The property PixelInfoUpdate determines whether the calculation is performed at all or by which event it is triggered.

Never

PixelColor and PixelPosition are not updated at all.

AtClick

PixelColor and PixelPosition are updated when the user clicks or touches a specific pixel. The values are reset when the user clicks or touches a point on the image frame outside the current image.

AtCursor

PixelColor and PixelPosition are continuously updated as the user moves the mouse pointer over the image. The values are reset when the mouse pointer is not on the image.

Each time the pixel color and position are updated, the event onPixelInfo is triggered.

Display

The current PixelColor, PixelPosition and ImageSize information can be displayed in the infobar (see property InfobarItems in the Infobar category).

Information 1: