|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.ext.awt.image.codec.PNGEncodeParam | +--org.apache.batik.ext.awt.image.codec.PNGEncodeParam.Palette
Inner classes inherited from class org.apache.batik.ext.awt.image.codec.PNGEncodeParam |
PNGEncodeParam.Gray, PNGEncodeParam.Palette, PNGEncodeParam.RGB |
Fields inherited from class org.apache.batik.ext.awt.image.codec.PNGEncodeParam |
bitDepth, bitDepthSet, INTENT_ABSOLUTE, INTENT_PERCEPTUAL, INTENT_RELATIVE, INTENT_SATURATION, PNG_FILTER_AVERAGE, PNG_FILTER_NONE, PNG_FILTER_PAETH, PNG_FILTER_SUB, PNG_FILTER_UP |
Constructor Summary | |
PNGEncodeParam.Palette()
Constructs an instance of PNGEncodeParam.Palette . |
Method Summary | |
int |
getBackgroundPaletteIndex()
Returns the palette index of the suggested background color. |
int[] |
getPalette()
Returns the current RGB palette. |
byte[] |
getPaletteTransparency()
Returns the alpha values associated with each palette entry. |
boolean |
isBackgroundSet()
Returns true if a 'bKGD' chunk will be output. |
boolean |
isPaletteSet()
Returns true if a 'PLTE' chunk will be output. |
void |
setBackgroundPaletteIndex(int index)
Sets the palette index of the suggested background color. |
void |
setBitDepth(int bitDepth)
Sets the desired bit depth for a palette image. |
void |
setPalette(int[] rgb)
Sets the RGB palette of the image to be encoded. |
void |
setPaletteTransparency(byte[] alpha)
Sets the alpha values associated with each palette entry. |
void |
unsetBackground()
Suppresses the 'bKGD' chunk from being output. |
void |
unsetPalette()
Suppresses the 'PLTE' chunk from being output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PNGEncodeParam.Palette()
PNGEncodeParam.Palette
.Method Detail |
public void unsetBackground()
unsetBackground
in class PNGEncodeParam
public boolean isBackgroundSet()
isBackgroundSet
in class PNGEncodeParam
public void setBitDepth(int bitDepth)
IllegalArgumentException
will be thrown.setBitDepth
in class PNGEncodeParam
public void setPalette(int[] rgb)
rgb
parameter contains alternating
R, G, B values for each color index used in the image.
The number of elements must be a multiple of 3 between
3 and 3*256.
The 'PLTE' chunk will encode this information.
rgb
- An array of int
s.public int[] getPalette()
If the palette has not previously been set, or has been
unset, an IllegalStateException
will be thrown.
int
s.java.lang.IllegalStateException
- if the palette is not set.public void unsetPalette()
public boolean isPaletteSet()
public void setBackgroundPaletteIndex(int index)
The 'bKGD' chunk will encode this information.
public int getBackgroundPaletteIndex()
If the background palette index has not previously been
set, or has been unset, an
IllegalStateException
will be thrown.
java.lang.IllegalStateException
- if the palette index is not set.public void setPaletteTransparency(byte[] alpha)
alpha
parameter should have as many entries
as there are RGB triples in the palette.
The 'tRNS' chunk will encode this information.
public byte[] getPaletteTransparency()
If the palette transparency has not previously been
set, or has been unset, an
IllegalStateException
will be thrown.
java.lang.IllegalStateException
- if the palette transparency is
not set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |