Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.ext.awt.image.rendered
Class IndexImage

    java.lang.Object
      org.apache.batik.ext.awt.image.rendered.IndexImage

    public class IndexImage

extends Object

This class implements an adaptive palette generator to reduce images to a specified number of colors. Ideally this would also support a better dither option than just the JDK's pattern dither. The algorithm used is the 'Median Cut Algorithm' published by Paul Heckbert in early '80s.

Constructor Summary
`IndexImage()`

Method Summary
`static BufferedImage` | `getIndexedImage(BufferedImage bi, int nColors)` Converts the input image (must be TYPE_INT_RGB or TYPE_INT_ARGB) to an indexed image.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IndexImage

    public IndexImage()

Method Detail

### getIndexedImage

    public static BufferedImage getIndexedImage(BufferedImage bi,
                                                int nColors)

  Converts the input image (must be TYPE_INT_RGB or TYPE_INT_ARGB) to an indexed image. Generating an adaptive palette with number of colors specified.

  Parameters:
    `bi` - the image to be processed.
    `nColors` - number of colors in the palette

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.