Interface ColorModelFactory

public interface ColorModelFactory

Interface defining a callback which may be used to create a ColorModel for the rendering of a node in an operation chain. The value corresponding to the key JAI.KEY_COLOR_MODEL_FACTORY in a configuration mapping must be of type ColorModelFactory. This configuration variable is recognized by the constructor OpImage.OpImage(Vector,ImageLayout,Map,boolean).

JAI 1.1.2

Method Summary
 ColorModel createColorModel(SampleModel sampleModel, List sources, Map configuration)
          Create a ColorModel given the image SampleModel and configuration variables.

Method Detail


public ColorModel createColorModel(SampleModel sampleModel,
                                   List sources,
                                   Map configuration)
Create a ColorModel given the image SampleModel and configuration variables. When invoked in the context of OpImage.OpImage(Vector,ImageLayout,Map,boolean), the SampleModel will be that of the OpImage and the source list and configuration mapping will be those which were supplied to the OpImage constructor.

The implementing class should in general ensure that the ColorModel created is compatible with the supplied SampleModel. If it is known a priori that compatibility is verified by the object which invokes this method, then such compatibility verification might be safely omitted.

sampleModel - The SampleModel to which the ColorModel to be created must correspond; may not be null.
sources - A List of RenderedImages; may be null.
configuration - A configuration mapping; may be null.
A new ColorModel or null if it is not possible for the ColorModelFactory to create a ColorModel for the supplied parameters.
IllegalArgumentException - if sampleModel is null.