public static interface URLImage.ImageAdapter
Notice: adapters happen before the image is saved so they will only happen once and the image will be saved as "adapted" which can be great for performance but is also permanent. E.g. If you mask an image it will remain masked.
Modifier and Type | Method and Description |
---|---|
EncodedImage |
adaptImage(EncodedImage downloadedImage,
EncodedImage placeholderImage)
Allows the downloaded image to be adapted e.g if it isn't the same size of the placeholder image.
|
boolean |
isAsyncAdapter()
Return true if the adapter should work on a separate thread to avoid blocking the EDT
this is especially important for image masks and heavy image manipulation
|
EncodedImage adaptImage(EncodedImage downloadedImage, EncodedImage placeholderImage)
downloadedImage
- the downloaded imageplaceholderImage
- the placeholder imageboolean isAsyncAdapter()