The sample values are interpreted according to a color model, which simply tells how to map the sample values into constant colors. There are some predefined color models; the client is free to create others.
SampledSource: TYPE = ImagerBasic.SampledSource;
SampleSequence: TYPE = ImagerBasic.SampleSequence;
ColorModel: TYPE = ImagerBasic.ColorModel;
ColorModelRec: TYPE = RECORD [colorModelProc: ColorModelProc, colorModelData: REF ← NIL];
ColorModelProc: TYPE = PROC [sample: LONG CARDINAL, colorModelData: REF] RETURNS [Color];
RegisterColorModel: PROC [colorModel: ColorModel, colorModelRec: ColorModelRec];
FindColorModel: PROC [colorModel: ColorModel] RETURNS [ColorModelRec];
Predefined color models:
$OneBitPerPixelGray
$EightBitPerPixelGray
$StandardColorMap
$Identity -- no translation needed