Image

General

images/download/attachments/6045007/image0.PNG

Component Palette Icon:

images/download/attachments/6045007/image1.PNG


Description

The image component is a deceptively powerful component. While you can use other components, like the Label, to display images as well, this component gives you much more flexibility. In particular, this component has 4 important features for displaying images:

  1. Scaling

  2. Rotation - Rotate to create spinning animations by binding to a timer component.

  3. Color Tinting - Dynamically apply a color tint to an image to allow it to display real-time status

  4. Color Swapping - Color swapping to change one specific color in an image to another in real time.


To choose an image, simply press the browse button ( images/support.inductiveautomation.com/usermanuals/ignition/folder_view.png ) next to this component's Image Path property. You can drag new images (*.png, *.gif, *.jpg, *.bmp) into the Image Management window to upload them.
images/support.inductiveautomation.com/usermanuals/ignition/information2.png Images are stored on the Gateway, not in your window or project. This means that you can alter an image globally, and it will affect all windows in all projects. It also means that you must be careful to migrate custom images if you do project backups (as opposed to Gateway backups, which will automatically include both projects and images)

Properties

Name

Description

Property Type

Scripting

Category

Border

The border surrounding this component. NOTE that the border is unaffected by rotation.

Border

.border

Common

Color Swap Filter

Swap a specific color to another.

boolean

.useColorSwap

Image Manipulation

Cursor

The mouse cursor to use when hovering over this component.

int

.cursorCode

Common

Data Quality

The data quality code for any tag bindings on this component.

int

.dataQuality

Data

Disabled Image Path

The relative path of the image to be displayed when this component is not enabled.

String

.disabledPath

Data

Enabled

If disabled, a component cannot be used.

boolean

.componentEnabled

Common

Flip Horizontal

Flip (mirror) the image horizontally.

boolean

.flipHorizontal

Image Manipulation

Flip Vertical

Flip (mirror) the image vertically.

boolean

.flipVertical

Image Manipulation

Image Path

The relative path of the image.

String

.path

Data

Load In Background

Controls whether or not the image loading takes place on the UI thread or a background thread.

boolean

.loadInBackground

Behavior

Mouseover Text

The text that is displayed in the tooltip which pops up on mouseover of this component.

String

.toolTipText

Common

Name

The name of this component.

String

.name

Common

Rotation

The angle of rotation in degrees.

int

.rotation

Image Manipulation

Stretch Height

If stretch mode is "Parameters", this will be the stretched height of the image<BR>If stretch mode is "% Bounds", this will be the percentage of the component's height.

int

.stretchHeight

Image Manipulation

Stretch Mode

Sets the stretch mode for this image.

int

.stretchMode

Image Manipulation

Stretch Width

If stretch mode is "Parameters", this will be the stretched width of the image<BR>If stretch mode is "% Bounds", this will be the percentage of the component's width.

int

.stretchWidth

Image Manipulation

Styles

Contains the component's styles

Dataset

.styles

Appearance

Swap From

If the Color Swap Filter is on, this color will be changed to the Swap To color.

Color

.swapFromColor

Image Manipulation

Swap Threshold

Threshold (0-255) for the swap from color matching. 0 is no tolerance, 255 is max tolerance.

int

.swapThreshold

Image Manipulation

Swap To

If the Color Swap Filter is on, the Swap From color will be changed to this color.

Color

.swapToColor

Image Manipulation

Tint Color

If the Tint Filter is on, this is the color of the tint.

Color

.tintColor

Image Manipulation

Tint Filter

Tint the entire image a color (works best with greyscale images)

boolean

.useTint

Image Manipulation

Use Cache

If false, this image will bypass the client image cache and load the image directly from the source.

boolean

.useCache

Behavior

Visible

If disabled, the component will be hidden.

boolean

.visible

Common

Scripting
Scripting Functions

This component does not have scripting functions associated with it.

Extension Functions

This component does not have extension functions associated with it.

Event Handlers

mouse

mouseClicked

This event signifies a mouse click on the source component. A mouse click the combination of a mouse press and a mouse release, both of which must have occurred over the source component. Note that this event fires after the pressed and released events have fired.

.source

The component that fired this event

.button

The code for the button that caused this event to fire.

.clickCount

The number of mouse clicks associated with this event.

.x

The x-coordinate (with respect to the source component) of this mouse event.

.y

The y-coordinate (with respect to the source component) of this mouse event.

.popupTrigger

Returns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.

.altDown

True (1) if the Alt key was held down during this event, false (0) otherwise.

.controlDown

True (1) if the Control key was held down during this event, false (0) otherwise.

.shiftDown

True (1) if the Shift key was held down during this event, false (0) otherwise.

mouseEntered

This event fires when the mouse enters the space over the source component.

.source

The component that fired this event

.button

The code for the button that caused this event to fire.

.clickCount

The number of mouse clicks associated with this event.

.x

The x-coordinate (with respect to the source component) of this mouse event.

.y

The y-coordinate (with respect to the source component) of this mouse event.

.popupTrigger

Returns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.

.altDown

True (1) if the Alt key was held down during this event, false (0) otherwise.

.controlDown

True (1) if the Control key was held down during this event, false (0) otherwise.

.shiftDown

True (1) if the Shift key was held down during this event, false (0) otherwise.

mouseExited

This event fires when the mouse leaves the space over the source component.

.source

The component that fired this event

.button

The code for the button that caused this event to fire.

.clickCount

The number of mouse clicks associated with this event.

.x

The x-coordinate (with respect to the source component) of this mouse event.

.y

The y-coordinate (with respect to the source component) of this mouse event.

.popupTrigger

Returns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.

.altDown

True (1) if the Alt key was held down during this event, false (0) otherwise.

.controlDown

True (1) if the Control key was held down during this event, false (0) otherwise.

.shiftDown

True (1) if the Shift key was held down during this event, false (0) otherwise.

mousePressed

This event fires when a mouse button is pressed down on the source component.

.source

The component that fired this event

.button

The code for the button that caused this event to fire.

.clickCount

The number of mouse clicks associated with this event.

.x

The x-coordinate (with respect to the source component) of this mouse event.

.y

The y-coordinate (with respect to the source component) of this mouse event.

.popupTrigger

Returns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.

.altDown

True (1) if the Alt key was held down during this event, false (0) otherwise.

.controlDown

True (1) if the Control key was held down during this event, false (0) otherwise.

.shiftDown

True (1) if the Shift key was held down during this event, false (0) otherwise.

mouseReleased

This event fires when a mouse button is released, if that mouse button's press happened over this component.

.source

The component that fired this event

.button

The code for the button that caused this event to fire.

.clickCount

The number of mouse clicks associated with this event.

.x

The x-coordinate (with respect to the source component) of this mouse event.

.y

The y-coordinate (with respect to the source component) of this mouse event.

.popupTrigger

Returns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.

.altDown

True (1) if the Alt key was held down during this event, false (0) otherwise.

.controlDown

True (1) if the Control key was held down during this event, false (0) otherwise.

.shiftDown

True (1) if the Shift key was held down during this event, false (0) otherwise.

mouseMotion

mouseDragged

Fires when the mouse moves over a component after a button has been pushed.

.source

The component that fired this event

.button

The code for the button that caused this event to fire.

.clickCount

The number of mouse clicks associated with this event.

.x

The x-coordinate (with respect to the source component) of this mouse event.

.y

The y-coordinate (with respect to the source component) of this mouse event.

.popupTrigger

Returns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.

.altDown

True (1) if the Alt key was held down during this event, false (0) otherwise.

.controlDown

True (1) if the Control key was held down during this event, false (0) otherwise.

.shiftDown

True (1) if the Shift key was held down during this event, false (0) otherwise.

mouseMoved

Fires when the mouse moves over a component, but no buttons are pushed.

.source

The component that fired this event

.button

The code for the button that caused this event to fire.

.clickCount

The number of mouse clicks associated with this event.

.x

The x-coordinate (with respect to the source component) of this mouse event.

.y

The y-coordinate (with respect to the source component) of this mouse event.

.popupTrigger

Returns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.

.altDown

True (1) if the Alt key was held down during this event, false (0) otherwise.

.controlDown

True (1) if the Control key was held down during this event, false (0) otherwise.

.shiftDown

True (1) if the Shift key was held down during this event, false (0) otherwise.

propertyChange

propertyChange

Fires whenever a bindable property of the source component changes. This works for standard and custom (dynamic) properties.

.source

The component that fired this event

.newValue

The new value that this property changed to.

.oldValue

The value that this property was before it changed. Note that not all components include an accurate oldValue in their events.

.propertyName

The name of the property that changed. NOTE: remember to always filter out these events for the property that you are looking for! Components often have many properties that change.

Examples

images/download/attachments/6045007/image2.PNG

Property Name

Value

Image Path

Builtin/Air Flow/Air Flow 9.png