public interface ImageLoader
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ImageLoadListener listener)
Adds a listener to monitor this loader.
|
void |
dispose()
Disposes of any resources (such as native libraries) held by this loader.
|
ImageFormatDescription |
getFormatDescription()
Gets a description of the image format supported by this loader.
|
ImageFrame |
load(int imageIndex,
int width,
int height,
boolean preserveAspectRatio,
boolean smooth)
Loads the image at a given index in an image stream.
|
void |
removeListener(ImageLoadListener listener)
Removes a listener from the list of those monitoring this loader.
|
ImageFormatDescription getFormatDescription()
void dispose()
void addListener(ImageLoadListener listener)
listener - the listener to add.void removeListener(ImageLoadListener listener)
listener - the listener to remove.ImageFrame load(int imageIndex, int width, int height, boolean preserveAspectRatio, boolean smooth) throws java.io.IOException
null will be returned.imageIndex - the zero-relative index of the image to load.width - the desired image width. If non-positive,
an IllegalArgumentException will be thrown.height - the desired image height. If non-positive,
an IllegalArgumentException will be thrown.preserveAspectRatio - whether to preserve the width-to-height ratio
of the image.smooth - whether to use a smooth downscaling algorithm.null on error.java.io.IOException