|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.grelf.grip.ImBase
public class ImBase
Basic image stuff that can be used in applications/applets other than GRIP. Can contain either a BufferedImage or an Image.
Field Summary | |
---|---|
protected static int |
DEFAULT_COLOUR_IMAGE_TYPE
|
protected static int |
DEFAULT_MONO_IMAGE_TYPE
|
protected javax.imageio.IIOImage |
iioi
Wraps image, thumbnails and image metadata. |
protected Image |
image
Either this field or iioi must be null: an Im has either a BufferedImage or an Image. |
static float |
SCREEN_FRACTION
Initial size factor for displaying an image. |
Constructor Summary | |
---|---|
ImBase(java.awt.image.BufferedImage bim)
|
|
ImBase(javax.imageio.IIOImage iioi)
|
|
ImBase(Image image)
|
|
ImBase(int width,
int height,
boolean compatibleWithDisplay)
If the boolean is false an image of type java.awt.image.BufferedImage.TYPE_INT_RGB will be created. |
|
ImBase(int width,
int height,
boolean compatibleWithDisplay,
boolean monochrome)
|
|
ImBase(int width,
int height,
java.awt.image.ColorModel cm)
|
Method Summary | |
---|---|
static java.awt.image.BufferedImage |
create16BitImage(int width,
int height,
java.awt.image.BufferedImage srcBim)
Create a new BufferedImage with 16 bits per channel and ColorModel derived from given srcBim. |
static java.awt.image.BufferedImage |
create16BitImage(int width,
int height,
int nBands)
Create a new BufferedImage with 16 bits per channel and linear ColorModel. |
Image |
getAccumulator()
Deprecated. |
java.awt.image.BufferedImage |
getBufferedImage()
Get a reference to the BufferedImage in this ImBase object (will be null if there is an Image instead). |
static java.awt.GraphicsConfiguration |
getGraphicsConfiguration()
Get a reference to the GraphicsConfiguration object, which is the default one for the display system. |
int |
getHeight()
Get the height of the main BufferedImage or Image. |
Image |
getImage()
Use getImage () instead. |
java.lang.String |
getImageTypeAsString()
For displaying image information, get its java.awt.image.BufferedImage type constant name. |
static java.lang.String |
getImageTypeAsString(java.awt.image.BufferedImage bim)
For displaying image information, get the given image's java.awt.image.BufferedImage type constant name. |
int |
getMaxLevel()
Get the maximum level which can occur for each channel in the image or accumulator. |
static int |
getMaxLevel(java.awt.image.BufferedImage bim)
Get the maximum level which can occur for each channel in the image. |
Metadata |
getMetadata()
Get metadata associated with the image. |
int |
getNBands()
Get the number of bands (channels) in the image or accumulator. |
static int |
getNBands(java.awt.image.BufferedImage bim)
Get the number of bands (channels) in the image. |
int |
getNBits()
Get the number of bits in every channel of the BufferedImage or Image. |
static int |
getNBits(java.awt.image.BufferedImage bim)
Get the number of bits in every channel of the image. |
static int |
getNBits(int maxLevel)
Get the number of bits which would accommodate the given maximum level. |
java.awt.image.BufferedImage |
getThumbnail()
Get a reference to the first thumbnail loaded with this image (if any). |
int |
getWidth()
Get the width of the main BufferedImage or Image. |
boolean |
hasAccumulator()
Deprecated. |
boolean |
hasImage()
|
ImBase |
scaleDown(int factor)
Return a new BufferedImage-based object which is compatible with the display and contains the data from the current BufferedImage or Image scaled down by an integer factor in both x and y. |
void |
setAccumulator(Image image)
Deprecated. |
void |
setBufferedImage(java.awt.image.BufferedImage bim)
Sets the image to the given BufferedImage (may be null) and sets the Image to null. |
void |
setImage(java.awt.image.BufferedImage bim)
Deprecated. |
void |
setImage(Image image)
Sets the accumulator to the given Accumulator (may be null) and sets the (Buffered)Image to null. |
void |
setMetadata(Metadata theData)
Associate metadata with the image - only if it is a BufferedImage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float SCREEN_FRACTION
protected static final int DEFAULT_COLOUR_IMAGE_TYPE
protected static final int DEFAULT_MONO_IMAGE_TYPE
protected javax.imageio.IIOImage iioi
protected Image image
Constructor Detail |
---|
public ImBase(int width, int height, boolean compatibleWithDisplay)
public ImBase(int width, int height, boolean compatibleWithDisplay, boolean monochrome)
public ImBase(int width, int height, java.awt.image.ColorModel cm)
public ImBase(java.awt.image.BufferedImage bim)
public ImBase(javax.imageio.IIOImage iioi)
public ImBase(Image image)
Method Detail |
---|
public boolean hasImage()
@Deprecated public boolean hasAccumulator()
public Metadata getMetadata()
public void setMetadata(Metadata theData)
public java.awt.image.BufferedImage getBufferedImage()
@Deprecated public void setImage(java.awt.image.BufferedImage bim)
public void setBufferedImage(java.awt.image.BufferedImage bim)
@Deprecated public Image getAccumulator()
public Image getImage()
@Deprecated public void setAccumulator(Image image)
public void setImage(Image image)
public java.lang.String getImageTypeAsString()
public static java.lang.String getImageTypeAsString(java.awt.image.BufferedImage bim)
public java.awt.image.BufferedImage getThumbnail()
public static java.awt.GraphicsConfiguration getGraphicsConfiguration()
public int getMaxLevel()
public static int getMaxLevel(java.awt.image.BufferedImage bim)
public static int getNBits(int maxLevel)
public int getNBands()
public static int getNBands(java.awt.image.BufferedImage bim)
public int getNBits()
public static int getNBits(java.awt.image.BufferedImage bim)
public int getWidth()
public int getHeight()
public static java.awt.image.BufferedImage create16BitImage(int width, int height, java.awt.image.BufferedImage srcBim)
public static java.awt.image.BufferedImage create16BitImage(int width, int height, int nBands)
public ImBase scaleDown(int factor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |