sky.common.util
Class RGBConverter

java.lang.Object
  extended bysky.common.util.RGBConverter

public class RGBConverter
extends java.lang.Object

Converts an RGB image to 8-bit index color using Heckbert's median-cut color quantization algorithm. Based on median.c by Anton Kruger from the September, 1994 issue of Dr. Dobbs Journal.


Constructor Summary
RGBConverter(java.awt.image.BufferedImage image)
           
RGBConverter(int[] pixels, int width, int height)
           
 
Method Summary
 java.awt.Image convert()
           
 java.awt.Image convert(int maxcubes)
          This is a version of convert that returns a ByteProcessor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RGBConverter

public RGBConverter(java.awt.image.BufferedImage image)

RGBConverter

public RGBConverter(int[] pixels,
                    int width,
                    int height)
Method Detail

convert

public java.awt.Image convert()

convert

public java.awt.Image convert(int maxcubes)
This is a version of convert that returns a ByteProcessor.