|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.image.BufferedImageHelper
public class BufferedImageHelper
This class provides some utility methods for creating a BufferedImage. It will check to see if the Java Advanced Image package is available and use it if it can.
Field Summary | |
---|---|
protected static java.util.logging.Logger |
logger
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.logging.Logger logger
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |