Image resources
The attributes and functions explained on this page can be found in the category Common.
Image resources
The image resource defines which image will be displayed in the Image Viewer. The intended use is to link as an image resource a ITcVnDisplayableImage
symbol using the HMI.Vision extension. In general, however, the image resource only needs to be a valid image URL. This can be either a direct path in the project, a URL to an external server or a Data URL. This works analogously to the Src attribute of the standard image control.
In the simplest case, the image resource is specified via the Image
attribute:

Furthermore, it is possible to store multiple image resources in the ImageList
attribute:

The ImageIndex
attribute can be used to select which of the resources is actually used. This can be used, for example, to easily switch between image symbols from the PLC. The switch can also be made graphically via the ImageSelection
combo box in the toolbar. For this purpose, not only the respective image resource but also an associated image name can be assigned in the ImageList
.

![]() | Simultaneous use of Image and ImageList is mutually exclusive Internally, using the |
Receive event
Each time the control receives a new image, the event onImageReceived
is triggered.
Alternative text
If no image resource is specified or no valid image could be loaded from the specified resource, an alternative text is displayed. This can be changed by the Alt
attribute and is "No image available." by default.

Image download
The currently displayed image can be saved locally on the client device via browser-specific download. The download can be triggered either by the downloadImage
function or the download button in the toolbar.
The image is saved in its original size.
The file name can be specified as a parameter in programmatic calls. A file extension does not need to be specified as it is automatically appended. If the parameter remains empty, the file name is also created automatically. For a symbol, the symbol name is used first; for a data URL, the control name is used accordingly:
<symbol name/control name>_<date>_<time>-<MS>.<file extension>
For an image path, the file name and file extension from the specified path are used without appending a timestamp.
The selection of the save path is not possible within the control, but corresponds to the download path setting of the used browser. The usual download path is C:\User\<User>\Downloads\.
![]() | Requirements and restrictions of the image download Since the image download is done via a browser-specific functionality, the possibilities, settings and functionality depend on the used web browser for the TwinCAT HMI Client. The method This method does not work with images that are linked as a stream, as well as in the live view of HMI engineering. |