org.apache.batik.ext.awt.image
Class ImageLoader
java.lang.Object
|
+--org.apache.batik.ext.awt.image.ImageLoader
- public class ImageLoader
- extends java.lang.Object
Field Summary |
protected static java.awt.Component |
component
|
protected static java.awt.MediaTracker |
tracker
|
Method Summary |
static java.awt.image.BufferedImage |
loadImage(java.io.File file,
int imageType)
loadImage loads an image from a given file into a BufferedImage. |
static java.awt.Image |
loadImage(java.lang.String path)
loadImage loads the image located at path. |
static java.awt.image.BufferedImage |
loadImage(java.lang.String path,
int imageType)
loadImage loads an image from a given path into a BufferedImage. |
static java.awt.Image |
loadImage(java.net.URL url)
loadImage loads the image located at URL. |
static java.awt.image.BufferedImage |
loadImage(java.net.URL url,
int imageType)
loadImage loads an image from a given URL into a BufferedImage. |
static java.awt.image.BufferedImage |
loadJPEGImage(java.net.URL url)
loads a JPEG image from a given location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
component
protected static final java.awt.Component component
tracker
protected static final java.awt.MediaTracker tracker
ImageLoader
public ImageLoader()
loadImage
public static java.awt.Image loadImage(java.lang.String path)
- loadImage loads the image located at path.
- Parameters:
path
- location of image file in local file system.- Returns:
- loaded image at path or url
loadImage
public static java.awt.Image loadImage(java.net.URL url)
- loadImage loads the image located at URL.
- Parameters:
url
- URL where the image file is located.- Returns:
- loaded image at path or url
loadImage
public static java.awt.image.BufferedImage loadImage(java.io.File file,
int imageType)
- loadImage loads an image from a given file into a BufferedImage.
The image is returned in the format defined by the imageType parameter.
Note that this is special cased for JPEG images where loading is performed
outside the standard media tracker, for efficiency reasons.
- Parameters:
file
- File where the image file is located.imageType
- one of the image type defined in the BufferedImage class.- Returns:
- loaded image at path or url
- See Also:
BufferedImage
loadImage
public static java.awt.image.BufferedImage loadImage(java.lang.String path,
int imageType)
- loadImage loads an image from a given path into a BufferedImage.
The image is returned in the format defined by the imageType parameter.
Note that this is special cased for JPEG images where loading is performed
outside the standard media tracker, for efficiency reasons.
- Parameters:
path
- Name of file where the image file is located.imageType
- one of the image type defined in the BufferedImage class.- Returns:
- loaded image at path or url
- See Also:
BufferedImage
loadImage
public static java.awt.image.BufferedImage loadImage(java.net.URL url,
int imageType)
- loadImage loads an image from a given URL into a BufferedImage.
The image is returned in the format defined by the imageType parameter.
Note that this is special cased for JPEG images where loading is performed
outside the standard media tracker, for efficiency reasons.
- Parameters:
url
- URL where the image file is located.imageType
- one of the image type defined in the BufferedImage class.- Returns:
- loaded image at path or url
- See Also:
BufferedImage
loadJPEGImage
public static java.awt.image.BufferedImage loadJPEGImage(java.net.URL url)
- loads a JPEG image from a given location.
- Parameters:
url
- URL where the image file is located.- Returns:
- loaded image at path or url
Copyright © 2001 Apache Software Foundation. All Rights Reserved.