|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.image.ColorModel
java.awt.image.PackedColorModel
java.awt.image.DirectColorModel
ch.randelshofer.gui.image.HAMColorModel
public class HAMColorModel
ColorModel for HAM compressed images.
| Field Summary | |
|---|---|
static int |
HAM6
|
static int |
HAM8
|
protected int |
HAMType
|
protected int |
map_size
|
protected boolean |
opaque
|
protected int[] |
rgb
|
| Fields inherited from class java.awt.image.ColorModel |
|---|
pixel_bits, transferType |
| Fields inherited from interface java.awt.Transparency |
|---|
BITMASK, OPAQUE, TRANSLUCENT |
| Constructor Summary | |
|---|---|
HAMColorModel(int aHAMType,
int size,
byte[] r,
byte[] g,
byte[] b,
boolean isOCS)
Creates a new HAM Color model using the specified base colors. |
|
HAMColorModel(int aHAMType,
int size,
int[] rgb,
boolean isOCS)
Creates a new HAM Color model using the specified base colors. |
|
| Method Summary | |
|---|---|
void |
getBlues(byte[] b)
Copies the array of blue color components into the given array. |
int |
getDepth()
Returns the number of planes required to represent this HAMColorModel in a Bitmap. |
void |
getGreens(byte[] g)
Copies the array of green color components into the given array. |
int |
getHAMType()
Returns the HAM Type of this HAMColorModel: HAM8 or HAM6. |
int |
getMapSize()
Returns the size of the color component arrays in this IndexColorModel. |
void |
getReds(byte[] r)
Copies the array of red color components into the given array. |
void |
getRGBs(int[] rgbs)
Copies the array of color components into the given array. |
protected void |
setRGBs(int size,
byte[] r,
byte[] g,
byte[] b,
byte[] a)
Sets the HAM base colors. |
| Methods inherited from class java.awt.image.DirectColorModel |
|---|
coerceData, createCompatibleWritableRaster, getAlpha, getAlpha, getAlphaMask, getBlue, getBlue, getBlueMask, getComponents, getComponents, getDataElement, getDataElements, getDataElements, getGreen, getGreen, getGreenMask, getRed, getRed, getRedMask, getRGB, getRGB, isCompatibleRaster, toString |
| Methods inherited from class java.awt.image.PackedColorModel |
|---|
createCompatibleSampleModel, equals, getAlphaRaster, getMask, getMasks, isCompatibleSampleModel |
| Methods inherited from class java.awt.image.ColorModel |
|---|
finalize, getColorSpace, getComponentSize, getComponentSize, getDataElement, getDataElements, getNormalizedComponents, getNormalizedComponents, getNumColorComponents, getNumComponents, getPixelSize, getRGBdefault, getTransferType, getTransparency, getUnnormalizedComponents, hasAlpha, hashCode, isAlphaPremultiplied |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int HAM6
public static final int HAM8
protected int HAMType
protected int map_size
protected boolean opaque
protected int[] rgb
| Constructor Detail |
|---|
public HAMColorModel(int aHAMType,
int size,
byte[] r,
byte[] g,
byte[] b,
boolean isOCS)
aHAMType - Type, must be HAM6 or HAM 8.size - The size of the color palette.r - The red colors as 8 bit or as 4 bit values.g - The green colors as 8 bit or as 4 bit values.b - The blue colors as 8 bit or as 4 bit values.isOCS - Set this to true if the colors are 4 bit values.
public HAMColorModel(int aHAMType,
int size,
int[] rgb,
boolean isOCS)
aHAMType - Type, must be HAM6 or HAM 8.size - The size of the color palette.rgb - The rgb colors.isOCS - Set this to true if the colors are 12 bit precision only.| Method Detail |
|---|
public int getHAMType()
public int getDepth()
protected void setRGBs(int size,
byte[] r,
byte[] g,
byte[] b,
byte[] a)
size - The size of the color palette.r - The red colors as 8 bit values.g - The green colors as 8 bit values.b - The blue colors as 8 bit values.a - The alpha channels as 8 bit values.public final void getReds(byte[] r)
public final void getGreens(byte[] g)
public final void getBlues(byte[] b)
public final void getRGBs(int[] rgbs)
public final int getMapSize()
|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||