j2d.color
Class IndexImageBean

java.lang.Object
  extended by j2d.color.IndexImageBean

public class IndexImageBean
extends java.lang.Object

Use the IndexImageBean in order to create an 8 bit color image with 256 colors. You can set the look up table (LUT) anyway that you like.


Constructor Summary
IndexImageBean(ShortImageBean sib)
          Make an instance of an IndexImageBean from a ShortImageBean.
 
Method Summary
 void add(int k)
          Add k to each pel.
 void drawSquare(int x, int y, int size)
           
static java.awt.image.IndexColorModel getIce()
          An IndexColorModel serves as a LUT (Look-up table) Values in the IndexImage Are mapped to colors in RGB space.
 java.awt.Image getImage()
           
static java.awt.Image getImage(byte[] pixels8, java.awt.Dimension d, java.awt.image.IndexColorModel indexColorModel)
           
 java.awt.image.IndexColorModel getIndexColorModel()
           
static java.awt.image.IndexColorModel getIndexColorModel(int[] r, int[] g, int[] b)
           
 java.awt.Dimension getSize()
           
static java.awt.image.IndexColorModel getSpectrum()
           
 void setIndexColorModel(java.awt.image.IndexColorModel indexColorModel)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexImageBean

public IndexImageBean(ShortImageBean sib)
Make an instance of an IndexImageBean from a ShortImageBean. Just use the blue pels.

Method Detail

add

public void add(int k)
Add k to each pel.


getIce

public static java.awt.image.IndexColorModel getIce()
An IndexColorModel serves as a LUT (Look-up table) Values in the IndexImage Are mapped to colors in RGB space.


getSpectrum

public static java.awt.image.IndexColorModel getSpectrum()

getIndexColorModel

public static java.awt.image.IndexColorModel getIndexColorModel(int[] r,
                                                                int[] g,
                                                                int[] b)

getImage

public java.awt.Image getImage()

getImage

public static java.awt.Image getImage(byte[] pixels8,
                                      java.awt.Dimension d,
                                      java.awt.image.IndexColorModel indexColorModel)

drawSquare

public void drawSquare(int x,
                       int y,
                       int size)

getIndexColorModel

public java.awt.image.IndexColorModel getIndexColorModel()

setIndexColorModel

public void setIndexColorModel(java.awt.image.IndexColorModel indexColorModel)

getSize

public java.awt.Dimension getSize()