public final class ImageLoader
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ImageLoader.Dimension2DDouble |
static interface |
ImageLoader.LoadFunction |
Modifier and Type | Field and Description |
---|---|
static int |
ALLOW_FLOAT_SCALING |
static long |
CACHED_IMAGE_MAX_SIZE |
static int |
DARK |
static int |
FIND_SVG |
static java.awt.Component |
ourComponent |
static byte |
USE_CACHE |
Constructor and Description |
---|
ImageLoader() |
Modifier and Type | Method and Description |
---|---|
static void |
clearCache() |
static java.awt.Image |
loadCustomIcon(java.io.File f) |
static java.awt.Image |
loadFromBytes(byte [] bytes) |
static java.awt.Image |
loadFromResource(java.lang.String s) |
static java.awt.Image |
loadFromResource(java.lang.String path,
java.lang.Class aClass) |
static java.awt.Image |
loadFromStream(java.io.InputStream inputStream) |
static java.awt.Image |
loadFromStream(java.io.InputStream inputStream,
int scale)
Deprecated.
|
static java.awt.Image |
loadFromStream(java.io.InputStream inputStream,
int scale,
java.awt.image.ImageFilter filter)
Deprecated.
|
static java.awt.Image |
loadFromStream(java.io.InputStream inputStream,
ScaleContext ctx,
java.awt.image.ImageFilter filter)
The scale context describes the image the stream presents.
|
static java.awt.Image |
loadFromUrl(java.lang.String path,
java.lang.Class aClass,
int flags,
java.awt.image.ImageFilter [] filters,
ScaleContext scaleContext)
Loads an image of available resolution (1x, 2x, ...) and scales to address the provided scale context.
|
static java.awt.Image |
loadFromUrl(java.net.URL url) |
static java.awt.Image |
loadFromUrl(java.net.URL url,
boolean allowFloatScaling) |
static java.awt.Image |
loadFromUrl(java.net.URL url,
boolean allowFloatScaling,
boolean useCache,
java.awt.image.ImageFilter[] filters,
ScaleContext ctx) |
static java.awt.Image |
loadFromUrl(java.net.URL url,
java.lang.Class aClass,
int flags,
java.awt.image.ImageFilter [] filters,
ScaleContext scaleContext)
Loads an image of available resolution (1x, 2x, ...) and scales to address the provided scale context.
|
static java.awt.Image |
scaleImage(java.awt.Image image,
double scale) |
static java.awt.Image |
scaleImage(java.awt.Image image,
int targetSize) |
static java.awt.Image |
scaleImage(java.awt.Image image,
int targetWidth,
int targetHeight) |
public static final int ALLOW_FLOAT_SCALING
public static final byte USE_CACHE
public static final int DARK
public static final int FIND_SVG
public static final long CACHED_IMAGE_MAX_SIZE
public static final java.awt.Component ourComponent
public static void clearCache()
public static java.awt.Image loadFromUrl(java.net.URL url)
public static java.awt.Image loadFromUrl(java.net.URL url, boolean allowFloatScaling)
public static java.awt.Image loadFromUrl(java.net.URL url, boolean allowFloatScaling, boolean useCache, java.awt.image.ImageFilter[] filters, ScaleContext ctx)
public static java.awt.Image loadFromUrl(java.net.URL url, java.lang.Class aClass, int flags, java.awt.image.ImageFilter [] filters, ScaleContext scaleContext)
JBHiDPIScaledImage
if necessary.public static java.awt.Image loadFromUrl(java.lang.String path, java.lang.Class aClass, int flags, java.awt.image.ImageFilter [] filters, ScaleContext scaleContext)
JBHiDPIScaledImage
if necessary.public static java.awt.Image scaleImage(java.awt.Image image, double scale)
public static java.awt.Image scaleImage(java.awt.Image image, int targetSize)
public static java.awt.Image scaleImage(java.awt.Image image, int targetWidth, int targetHeight)
public static java.awt.Image loadFromResource(java.lang.String s)
public static java.awt.Image loadFromResource(java.lang.String path, java.lang.Class aClass)
public static java.awt.Image loadFromBytes(byte [] bytes)
public static java.awt.Image loadFromStream(java.io.InputStream inputStream)
@Deprecated public static java.awt.Image loadFromStream(java.io.InputStream inputStream, int scale)
loadFromStream(InputStream, ScaleContext, ImageFilter)
@Deprecated public static java.awt.Image loadFromStream(java.io.InputStream inputStream, int scale, java.awt.image.ImageFilter filter)
loadFromStream(InputStream, ScaleContext, ImageFilter)
public static java.awt.Image loadFromStream(java.io.InputStream inputStream, ScaleContext ctx, java.awt.image.ImageFilter filter)
public static java.awt.Image loadCustomIcon(java.io.File f) throws java.io.IOException
java.io.IOException