| java.lang.Object org.vfny.geoserver.wms.responses.palette.CustomPaletteBuilder
CustomPaletteBuilder | final public class CustomPaletteBuilder (Code) | | This class implements the octree quantization method as it is described in
the "Graphics Gems" (ISBN 0-12-286166-3, Chapter 4, pages 297-293)
author: Simone Giannecchini - GeoSolutions |
Inner Class :protected class ColorNode | |
Method Summary | |
public CustomPaletteBuilder | buildPalette() | public static boolean | canCreatePalette(ImageTypeSpecifier type) Returns true if PaletteBuilder is able to create palette
for given image type.
Parameters: type - an instance of ImageTypeSpecifier to beindexed. | public static boolean | canCreatePalette(RenderedImage image) Returns true if PaletteBuilder is able to create palette
for given rendered image.
Parameters: image - an instance of RenderedImage to be indexed. | protected int | findColorIndex(ColorNode aNode, int[] rgba, int transpBand) | public int | findNearestColorIndex(int[] rgba, int transparentBand) | protected int | findPaletteEntry(ColorNode aNode, int index, byte[] red, byte[] green, byte[] blue) | protected ColorNode | freeTree(ColorNode aNode) | protected int | getBranchIndex(int[] rgba, int aLevel) | public IndexColorModel | getIndexColorModel() | public RenderedImage | getIndexedImage() | protected ColorNode | insertNode(ColorNode aNode, int[] rgba, int aLevel) | protected void | reduceTree() |
DEFAULT_ALPHA_TH | final public static int DEFAULT_ALPHA_TH(Code) | | Default value for the threshold to decide whether a pixel is opaque (>=)
or transparent (<). Default is 1 to try to preserve antialising
|
alphaThreshold | protected int alphaThreshold(Code) | | |
currLevel | protected int currLevel(Code) | | |
currSize | protected int currSize(Code) | | |
maxLevel | protected int maxLevel(Code) | | maximum of tree depth
|
maxNodes | protected int maxNodes(Code) | | |
numBands | protected int numBands(Code) | | |
numNodes | protected int numNodes(Code) | | |
palette | protected ColorNode[] palette(Code) | | |
reduceList | protected ColorNode[] reduceList(Code) | | |
requiredSize | protected int requiredSize(Code) | | |
root | protected ColorNode root(Code) | | |
src | protected RenderedImage src(Code) | | |
subsampleX | protected int subsampleX(Code) | | |
subsampley | protected int subsampley(Code) | | |
transColor | protected ColorNode transColor(Code) | | |
transparency | protected int transparency(Code) | | |
CustomPaletteBuilder | public CustomPaletteBuilder(RenderedImage src)(Code) | | |
CustomPaletteBuilder | public CustomPaletteBuilder(RenderedImage src, int size, int subsx, int subsy, int alpha_th)(Code) | | |
canCreatePalette | public static boolean canCreatePalette(ImageTypeSpecifier type)(Code) | | Returns true if PaletteBuilder is able to create palette
for given image type.
Parameters: type - an instance of ImageTypeSpecifier to beindexed. true if the PaletteBuilder islikely to be able to create palette for this image type. exception: IllegalArgumentException - if type is null . |
canCreatePalette | public static boolean canCreatePalette(RenderedImage image)(Code) | | Returns true if PaletteBuilder is able to create palette
for given rendered image.
Parameters: image - an instance of RenderedImage to be indexed. true if the PaletteBuilder islikely to be able to create palette for this image type. exception: IllegalArgumentException - if image is null . |
findColorIndex | protected int findColorIndex(ColorNode aNode, int[] rgba, int transpBand)(Code) | | |
findNearestColorIndex | public int findNearestColorIndex(int[] rgba, int transparentBand)(Code) | | |
findPaletteEntry | protected int findPaletteEntry(ColorNode aNode, int index, byte[] red, byte[] green, byte[] blue)(Code) | | |
freeTree | protected ColorNode freeTree(ColorNode aNode)(Code) | | |
getBranchIndex | protected int getBranchIndex(int[] rgba, int aLevel)(Code) | | |
getIndexedImage | public RenderedImage getIndexedImage()(Code) | | |
insertNode | protected ColorNode insertNode(ColorNode aNode, int[] rgba, int aLevel)(Code) | | |
reduceTree | protected void reduceTree()(Code) | | |
|
|