public class JPEGImageLoader extends ImageLoaderImpl
Modifier and Type | Field and Description |
---|---|
static int |
JCS_CMYK |
static int |
JCS_GRAYSCALE |
static int |
JCS_RGB |
static int |
JCS_RGBA |
static int |
JCS_UNKNOWN |
static int |
JCS_YCbCr |
static int |
JCS_YCbCrA |
static int |
JCS_YCC |
static int |
JCS_YCCA |
static int |
JCS_YCCK |
formatDescription, lastPercentDone, listeners
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of any resources (such as native libraries) held by this loader.
|
protected void |
finalize() |
ImageFrame |
load(int imageIndex,
int width,
int height,
boolean preserveAspectRatio,
boolean smooth)
Loads the image at a given index in an image stream.
|
addListener, emitWarning, getFormatDescription, removeListener, updateImageMetadata, updateImageProgress
public static final int JCS_UNKNOWN
public static final int JCS_GRAYSCALE
public static final int JCS_RGB
public static final int JCS_YCbCr
public static final int JCS_CMYK
public static final int JCS_YCC
public static final int JCS_RGBA
public static final int JCS_YCbCrA
public static final int JCS_YCCA
public static final int JCS_YCCK
public void dispose()
ImageLoader
public ImageFrame load(int imageIndex, int width, int height, boolean preserveAspectRatio, boolean smooth) throws IOException
ImageLoader
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.IOException
Copyright © 2020. All rights reserved.