Class MedianCutPalette

java.lang.Object
org.apache.commons.imaging.palette.SimplePalette
org.apache.commons.imaging.palette.MedianCutPalette
All Implemented Interfaces:
Palette

class MedianCutPalette extends SimplePalette
  • Field Details

  • Constructor Details

    • MedianCutPalette

      MedianCutPalette(ColorGroup root, int[] palette)
  • Method Details

    • getPaletteIndex

      public int getPaletteIndex(int rgb)
      Description copied from interface: Palette
      Looks up the palette index for a given color.
      Specified by:
      getPaletteIndex in interface Palette
      Overrides:
      getPaletteIndex in class SimplePalette
      Parameters:
      rgb - the color to look up
      Returns:
      the palette index