public final class PNGImageLoader2 extends ImageLoaderImpl
formatDescription, lastPercentDone, listeners
Constructor and Description |
---|
PNGImageLoader2(InputStream input) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of any resources (such as native libraries) held by this loader.
|
ImageFrame |
load(int imageIndex,
int rWidth,
int rHeight,
boolean preserveAspectRatio,
boolean smooth)
Loads the image at a given index in an image stream.
|
addListener, emitWarning, getFormatDescription, removeListener, updateImageMetadata, updateImageProgress
public PNGImageLoader2(InputStream input) throws IOException
IOException
public void dispose()
ImageLoader
public ImageFrame load(int imageIndex, int rWidth, int rHeight, boolean preserveAspectRatio, boolean smooth) throws IOException
ImageLoader
null
will be returned.imageIndex
- the zero-relative index of the image to load.rWidth
- the desired image width. If non-positive,
an IllegalArgumentException
will be thrown.rHeight
- 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.IOException
Copyright © 2020. All rights reserved.