|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.meshcms.util.ImageLoader
Loads an image from a file without using the javax.imageio package. That package creates some performance problems with JPEG files that contain color profile information. This class works fine in a headless environment.
Field Summary |
Fields inherited from interface java.awt.image.ImageConsumer |
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT |
Constructor Summary | |
ImageLoader(java.lang.String imageFilePath)
Creates an image loader for the given file path. |
Method Summary | |
boolean |
check()
Checks if the images has loaded. |
int |
getHeight()
Returns the height of the image. |
java.awt.Image |
getImage()
Returns a new image. |
int[] |
getPixels()
Returns the image as an array of ARGB pixels. |
int |
getWidth()
Returns the width of the image. |
void |
imageComplete(int status)
|
void |
setColorModel(java.awt.image.ColorModel model)
|
void |
setDimensions(int width,
int height)
|
void |
setHints(int hintflags)
|
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
|
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
|
void |
setProperties(java.util.Hashtable props)
|
void |
waitForImage()
Waits until the image has been loaded completely. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ImageLoader(java.lang.String imageFilePath)
imageFilePath
- the image file pathMethod Detail |
public boolean check()
public int getWidth()
public int getHeight()
public void setDimensions(int width, int height)
setDimensions
in interface java.awt.image.ImageConsumer
public void setProperties(java.util.Hashtable props)
setProperties
in interface java.awt.image.ImageConsumer
public void setColorModel(java.awt.image.ColorModel model)
setColorModel
in interface java.awt.image.ImageConsumer
public void setHints(int hintflags)
setHints
in interface java.awt.image.ImageConsumer
public void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int off, int scansize)
setPixels
in interface java.awt.image.ImageConsumer
public void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int off, int scansize)
setPixels
in interface java.awt.image.ImageConsumer
public void imageComplete(int status)
imageComplete
in interface java.awt.image.ImageConsumer
public java.awt.Image getImage()
public int[] getPixels()
public void waitForImage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |