Class ImageLoader
java.lang.Object
com.inductiveautomation.ignition.client.images.ImageLoader
The ImageLoader is the main interface for the images stored in the Gateway. While they're accessible via a URL, this
 class will maintain a cache system (both in-memory using soft references and a disk-backed cach) of images and
 resized versions of them.
- 
Method SummaryModifier and TypeMethodDescriptionvoidClears the in-memory image cachestatic ImageLoaderGet the shared instance of the ImageLoaderbyte[]Loads the named image, and returns its raw bytes.Loads the named image.Deprecated.Loads the named image and resizes it to the given size.loadImageNoCache(String name, Dimension size) Loads the named image at the given size, but skips any caching mechanism.static voidsetCacheDir(File cacheDir) Set the directory used to cache images and their resized versions
- 
Method Details- 
getInstanceGet the shared instance of the ImageLoader
- 
setCacheDirSet the directory used to cache images and their resized versions
- 
loadImageDeprecated.useloadImage(String, Dimension)instead.
- 
loadImageLoads the named image. If possible, the image is retrieved from an in-memory image cache.
- 
loadImageLoads the named image and resizes it to the given size.- Parameters:
- name- The path to the image. May be a path to a gateway image or a URL
- size- The size to resize the image to. May be null, which means to use the natural size.
 
- 
loadImageNoCacheLoads the named image at the given size, but skips any caching mechanism. This will download the image and resize it fresh, each time it is called.- Parameters:
- name- The path to the image or the URL to an image.
- size- The size to resize the image to, or null meaning return the image at its natural size.
 
- 
loadBytesLoads the named image, and returns its raw bytes.
- 
clearCachepublic void clearCache()Clears the in-memory image cache
 
- 
loadImage(String, Dimension)instead.