|
|||||||||
| Home >> All >> org >> apache >> batik >> ext >> awt >> image >> [ codec overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.batik.ext.awt.image.codec
Class PNGEncodeParam.Palette

java.lang.Objectorg.apache.batik.ext.awt.image.codec.PNGEncodeParam
org.apache.batik.ext.awt.image.codec.PNGEncodeParam.Palette
- All Implemented Interfaces:
- java.lang.Cloneable, ImageDecodeParam, ImageEncodeParam, java.io.Serializable
- Enclosing class:
- PNGEncodeParam
- public static class PNGEncodeParam.Palette
- extends PNGEncodeParam
| Nested Class Summary |
| Nested classes inherited from class org.apache.batik.ext.awt.image.codec.PNGEncodeParam |
PNGEncodeParam.Gray, PNGEncodeParam.Palette, PNGEncodeParam.RGB |
| Field Summary | |
private int |
backgroundPaletteIndex
|
private boolean |
backgroundSet
|
private int[] |
palette
|
private boolean |
paletteSet
|
private int[] |
transparency
|
| Fields inherited from class org.apache.batik.ext.awt.image.codec.PNGEncodeParam |
bitDepth, bitDepthSet, chunkData, chunkType, INTENT_ABSOLUTE, INTENT_PERCEPTUAL, INTENT_RELATIVE, INTENT_SATURATION, PNG_FILTER_AVERAGE, PNG_FILTER_NONE, PNG_FILTER_PAETH, PNG_FILTER_SUB, PNG_FILTER_UP, transparencySet |
| 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 |
| Field Detail |
backgroundSet
private boolean backgroundSet
palette
private int[] palette
paletteSet
private boolean paletteSet
backgroundPaletteIndex
private int backgroundPaletteIndex
transparency
private int[] transparency
| Constructor Detail |
PNGEncodeParam.Palette
public PNGEncodeParam.Palette()
- Constructs an instance of
PNGEncodeParam.Palette.
| Method Detail |
unsetBackground
public void unsetBackground()
- Suppresses the 'bKGD' chunk from being output.
- Overrides:
unsetBackgroundin classPNGEncodeParam
isBackgroundSet
public boolean isBackgroundSet()
- Returns true if a 'bKGD' chunk will be output.
- Overrides:
isBackgroundSetin classPNGEncodeParam
setBitDepth
public void setBitDepth(int bitDepth)
- Sets the desired bit depth for a palette image. The bit
depth must be one of 1, 2, 4, or 8, or else an
IllegalArgumentExceptionwill be thrown.- Specified by:
setBitDepthin classPNGEncodeParam
setPalette
public void setPalette(int[] rgb)
- Sets the RGB palette of the image to be encoded.
The
rgbparameter 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.
getPalette
public int[] getPalette()
- Returns the current RGB palette.
If the palette has not previously been set, or has been unset, an
IllegalStateExceptionwill be thrown.
unsetPalette
public void unsetPalette()
- Suppresses the 'PLTE' chunk from being output.
isPaletteSet
public boolean isPaletteSet()
- Returns true if a 'PLTE' chunk will be output.
setBackgroundPaletteIndex
public void setBackgroundPaletteIndex(int index)
- Sets the palette index of the suggested background color.
The 'bKGD' chunk will encode this information.
getBackgroundPaletteIndex
public int getBackgroundPaletteIndex()
- Returns the palette index of the suggested background color.
If the background palette index has not previously been set, or has been unset, an
IllegalStateExceptionwill be thrown.
setPaletteTransparency
public void setPaletteTransparency(byte[] alpha)
- Sets the alpha values associated with each palette entry.
The
alphaparameter should have as many entries as there are RGB triples in the palette.The 'tRNS' chunk will encode this information.
getPaletteTransparency
public byte[] getPaletteTransparency()
- Returns the alpha values associated with each palette entry.
If the palette transparency has not previously been set, or has been unset, an
IllegalStateExceptionwill be thrown.
|
|||||||||
| Home >> All >> org >> apache >> batik >> ext >> awt >> image >> [ codec overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC