Hey, I am trying to display an alternate image when the Image path is invalid. I haven't found a way to do this, Quality doesn't seem to change even if path is invalid. System.file.fileExists doesn't seem to work with Images.
Only thing i found was this but it wasn't very helpful : Image Doesn't Exist - Vision Image Component
Any lead would be appreciated!
It's a little hacky, but it is possible to check if the image component is in an error state:
from com.inductiveautomation.ignition.client.images import PathIcon
from org.apache.commons.lang3.reflect import FieldUtils
errorImage = FieldUtils.readStaticField(PathIcon, "errorImage", True)
target = event.source.parent.getComponent('Image')
print target.icon.image != errorImage
Thank you very much mister Griffith, you are a life saver!