public class BufferedImageHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
logger |
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
getBufferedImage(javax.swing.ImageIcon ii,
int x,
int y,
int w,
int h,
boolean hasAlpha)
Return a BufferedImage loaded from a URL.
|
static java.awt.image.BufferedImage |
getBufferedImage(java.awt.Image image,
int x,
int y,
int w,
int h)
Return a BufferedImage loaded from a Image.
|
static java.awt.image.BufferedImage |
getBufferedImage(java.awt.Image image,
int x,
int y,
int w,
int h,
int imageType)
Return a BufferedImage loaded from a Image.
|
static java.awt.image.BufferedImage |
getBufferedImage(java.lang.String path)
Return a BufferedImage loaded from a file path.
|
static java.awt.image.BufferedImage |
getBufferedImage(java.lang.String path,
int x,
int y,
int w,
int h)
Return a BufferedImage loaded from an image file path.
|
static java.awt.image.BufferedImage |
getBufferedImage(java.net.URL url)
Return a BufferedImage loaded from a URL.
|
static java.awt.image.BufferedImage |
getBufferedImage(java.net.URL url,
int x,
int y,
int w,
int h)
Return a BufferedImage loaded from a URL.
|
static java.awt.image.BufferedImage |
getBufferedImageFromPixelGrabber(java.awt.Image image,
int x,
int y,
int w,
int h,
int imageType)
Return a BufferedImage loaded from a Image, using a PixelGrabber.
|
protected static java.lang.Object |
getJAI()
Get the JAI class if it's available.
|
static java.awt.image.BufferedImage |
getJAIBufferedImage(java.lang.String opName,
java.lang.Object param)
Run the operation on JAI to create BufferedImage.
|
static java.awt.image.BufferedImage |
getJAIBufferedImage(java.lang.String opName,
java.lang.Object param,
int x,
int y,
int w,
int h)
Run the operation on JAI to create BufferedImage.
|
protected static java.lang.Object getJAI()
public static java.awt.image.BufferedImage getJAIBufferedImage(java.lang.String opName, java.lang.Object param)
opName
- JAI opName, like "file" or "url"param
- JAI object to use for operation, like the file path (String)
or URL.public static java.awt.image.BufferedImage getJAIBufferedImage(java.lang.String opName, java.lang.Object param, int x, int y, int w, int h) throws java.lang.InterruptedException
opName
- JAI opName, like "file" or "url"param
- JAI object to use for operation, like the file path (String)
or URL.x
- x start pixely
- y start pixelw
- crop width (-1 uses image width)h
- crop height (-1 uses image height)java.lang.InterruptedException
public static java.awt.image.BufferedImage getBufferedImage(java.net.URL url) throws java.lang.InterruptedException
java.lang.InterruptedException
public static java.awt.image.BufferedImage getBufferedImage(java.net.URL url, int x, int y, int w, int h) throws java.lang.InterruptedException
url
- the source URLx
- x start pixely
- y start pixelw
- crop width (-1 uses image width)h
- crop height (-1 uses image height)java.lang.InterruptedException
public static java.awt.image.BufferedImage getBufferedImage(javax.swing.ImageIcon ii, int x, int y, int w, int h, boolean hasAlpha) throws java.lang.InterruptedException
ii
- an ImageIcon created from the source.x
- x start pixely
- y start pixelw
- crop width (-1 uses image width)h
- crop height (-1 uses image height)hasAlpha
- whether the image should be transparent.java.lang.InterruptedException
public static java.awt.image.BufferedImage getBufferedImage(java.lang.String path) throws java.lang.InterruptedException
java.lang.InterruptedException
public static java.awt.image.BufferedImage getBufferedImage(java.lang.String path, int x, int y, int w, int h) throws java.lang.InterruptedException
path
- file path to the imagex
- x start pixely
- y start pixelw
- crop width (-1 uses image width)h
- crop height (-1 uses image height)java.lang.InterruptedException
public static java.awt.image.BufferedImage getBufferedImage(java.awt.Image image, int x, int y, int w, int h) throws java.lang.InterruptedException
image
- the source Imagex
- x start pixely
- y start pixelw
- crop width (-1 uses image width)h
- crop height (-1 uses image height)java.lang.InterruptedException
public static java.awt.image.BufferedImage getBufferedImage(java.awt.Image image, int x, int y, int w, int h, int imageType) throws java.lang.InterruptedException
image
- the source Imagex
- x start pixel - the horizontal pixel location in the returned
image that the provided image will be set.y
- y start pixel - the vertical pixel location in the returned
image that the provided image will be set.w
- crop width (-1 uses image width)h
- crop height (-1 uses image height)imageType
- the image color model. See BufferedImage.java.lang.InterruptedException
public static java.awt.image.BufferedImage getBufferedImageFromPixelGrabber(java.awt.Image image, int x, int y, int w, int h, int imageType)
image
- the source Imagex
- x start pixel - the horizontal pixel location in the returned
image that the provided image will be set.y
- y start pixel - the vertical pixel location in the returned
image that the provided image will be set.w
- crop width (-1 uses image width)h
- crop height (-1 uses image height)imageType
- the image color model. See BufferedImage.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details