|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jimi.core.encoder.sunraster.SunRasterHeader
Class encapsulating SunRaster header information with support for writing it to a stream and querying for encoding information.
Field Summary | |
protected int |
colorMapLength_
Length of color map. |
protected int |
colorMapType_
Type of color map. |
protected int |
depth_
Number of bits per pixel. |
protected int |
height_
Image dimensions. |
protected AdaptiveRasterImage |
jimiImage_
JimiImage to draw information from. |
protected static int |
MAGIC_NUMBER
Magic number to identify SunRaster images. |
static int |
NO_COLOR_MAP
Values for ColorMapType field. |
protected static int |
NO_COLORMAP
ColorMap types. |
protected java.awt.image.IndexColorModel |
palette_
Image palette. |
static int |
RAW_COLOR_MAP
Values for ColorMapType field. |
protected static int |
RAW_COLORMAP
ColorMap types. |
static int |
RGB_COLOR_MAP
Values for ColorMapType field. |
protected static int |
RGB_COLORMAP
ColorMap types. |
protected int |
scanLineSize_
Number of bytes in a scan-line. |
protected int |
type_
The type code of the image. |
static int |
TYPE_BYTE_ENCODED
Values for Type field. |
static int |
TYPE_EXPERIMENTAL
Values for Type field. |
static int |
TYPE_IFF
Values for Type field. |
static int |
TYPE_OLD
Values for Type field. |
static int |
TYPE_RGB
Values for Type field. |
static int |
TYPE_STANDARD
Values for Type field. |
static int |
TYPE_TIFF
Values for Type field. |
protected int |
width_
Image dimensions. |
Constructor Summary | |
SunRasterHeader()
|
|
SunRasterHeader(AdaptiveRasterImage image)
Constructs a header based on a given JimiImage. |
Method Summary | |
int |
getDepth()
Get the value of the Depth field. |
java.awt.image.IndexColorModel |
getPalette()
Get the palette being used as the image's ColorMap. |
int |
getType()
Get the value of the Type field. |
void |
setDepth(int depth)
Set the value of the Depth field. |
void |
setPalette(java.awt.image.IndexColorModel palette)
Set an IndexColorModel to use as the palette (ColorMap) of the image. |
void |
setType(int type)
Set the value of the Type field. |
protected void |
writePaletteInfoTo(java.io.DataOutputStream out)
Writes the palette information to a given stream. |
void |
writeTo(java.io.OutputStream output)
Write the header, including palette information, to a given stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final int MAGIC_NUMBER
public static final int TYPE_OLD
public static final int TYPE_STANDARD
public static final int TYPE_BYTE_ENCODED
public static final int TYPE_RGB
public static final int TYPE_TIFF
public static final int TYPE_IFF
public static final int TYPE_EXPERIMENTAL
public static final int NO_COLOR_MAP
public static final int RGB_COLOR_MAP
public static final int RAW_COLOR_MAP
protected static final int NO_COLORMAP
protected static final int RGB_COLORMAP
protected static final int RAW_COLORMAP
protected AdaptiveRasterImage jimiImage_
protected int width_
protected int height_
protected int depth_
protected int type_
protected int colorMapType_
protected int colorMapLength_
protected java.awt.image.IndexColorModel palette_
protected int scanLineSize_
Constructor Detail |
public SunRasterHeader()
public SunRasterHeader(AdaptiveRasterImage image)
image
- The JimiImage to read information from.Method Detail |
public void setDepth(int depth)
depth
- The number of bits per pixel.public int getDepth()
public void setType(int type)
type
- The type, must be one of the TYPE_ constants.public int getType()
public void setPalette(java.awt.image.IndexColorModel palette)
palette
- The palette to use.public java.awt.image.IndexColorModel getPalette()
public void writeTo(java.io.OutputStream output) throws java.io.IOException
output
- The stream to write to.protected void writePaletteInfoTo(java.io.DataOutputStream out) throws java.io.IOException
out
- The stream to write to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |