VIPER REFERENCE MANUAL


NAME
iflColorModelChans, iflColorModelHasAlpha, iflColorModelFromChans - color model utilities

HEADER FILE
#include <ifl/iflColor.h>

SYNOPSIS
extern "C" int iflColorModelChans ( iflColorModel cm);
extern "C" int iflColorModelHasAlpha ( iflColorModel cm);
extern "C" iflColorModel iflColorModelFromChans ( int nc);

DESCRIPTION
These functions provide a set of utilities for deal with color models in IFL.

FUNCTION DESCRIPTIONS

   iflColorModelChans()
extern "C" int iflColorModelChans ( iflColorModel cm);

This function is provided to return the number of channels associated with a color model. Given a color model cm, this function returns the number of channels associated with it. For example, for the iflRGB color model, a value of 3 will be returned; for the iflMinWhite color model a value of 1 will be returned. A value of zero is returned if the color model is iflMultiSpectral.

   iflColorModelFromChans()
extern "C" iflColorModel iflColorModelFromChans ( int nc);

This function return a best guess at a color model that matches the number of channels specified by nc. The return value as a function of the number of channels is:

channels color model
1 iflLuminance
2 iflLuminanceAlpha
3 iflRGB
4 iflRGBA
other iflMultiSpectral

   iflColorModelHasAlpha()
extern "C" int iflColorModelHasAlpha ( iflColorModel cm);

This function returns TRUE if the color model specifed by cm has an alpha component.