|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lizardtech.djvu.DjVuObject
com.lizardtech.djvu.Palette
public class Palette
DOCUMENT ME!
Field Summary | |
---|---|
int[] |
colordata
Contains an optional sequence of color indices. |
static int |
DJVUPALETTEVERSION
DOCUMENT ME! |
Fields inherited from class com.lizardtech.djvu.DjVuObject |
---|
hasReferences |
Constructor Summary | |
---|---|
Palette()
Creates a new Palette object. |
Method Summary | |
---|---|
java.lang.Object |
clone()
DOCUMENT ME! |
int |
color_to_index(GPixel p)
Returns the best palette index for representing color #bgr#. |
static Palette |
createPalette(DjVuInterface ref)
Creates an instance of Palette with the options interherited from the specified reference. |
void |
decode_rgb_entries(java.io.InputStream input,
int palettesize)
Reads palette colors. |
void |
decode(DataPool pool)
Initializes the object by reading data from bytestream #bs#. |
void |
get_color(int nth,
GPixel out)
Returns colors from the color index sequence. |
GPixel[] |
getPalette()
DOCUMENT ME! |
void |
index_to_color(int index,
GPixel p)
Overwrites #p# with the color located at position #index# in the palette. |
boolean |
isImageData()
Query if this is image data. |
void |
setPalette(GPixel[] palette)
DOCUMENT ME! |
int |
size()
Returns the number of colors in the palette. |
Methods inherited from class com.lizardtech.djvu.DjVuObject |
---|
checkLockTime, create, create, createSoftReference, createWeakReference, getDjVuOptions, getFromReference, invoke, setDjVuOptions |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.lizardtech.djvu.DjVuInterface |
---|
getDjVuOptions, setDjVuOptions |
Field Detail |
---|
public static final int DJVUPALETTEVERSION
public int[] colordata
Constructor Detail |
---|
public Palette()
Method Detail |
---|
public boolean isImageData()
isImageData
in interface Codec
public void setPalette(GPixel[] palette)
palette
- DOCUMENT ME!public GPixel[] getPalette()
public static Palette createPalette(DjVuInterface ref)
ref
- Object to interherit DjVuOptions from.
public java.lang.Object clone()
clone
in class java.lang.Object
public final void get_color(int nth, GPixel out)
nth
- DOCUMENT ME!out
- DOCUMENT ME!public final int size()
public int color_to_index(GPixel p)
p
- DOCUMENT ME!
public final void index_to_color(int index, GPixel p)
index
- DOCUMENT ME!p
- DOCUMENT ME!public void decode(DataPool pool) throws java.io.IOException
decode
in interface Codec
pool
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public void decode_rgb_entries(java.io.InputStream input, int palettesize) throws java.io.IOException
input
- DOCUMENT ME!palettesize
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |