Location:
imageprocessor.h
Link against: imageconversion.lib
class TColorConvertor;
Description
Interface to colour conversion classes for various display modes. Manages the mapping between RGB/Greyscale values and the index into the color palette for the given display mode.
Members
Defined in TColorConvertor:
Color(), ColorIndex(), ColorToIndex(), NewL(), RgbToMonochrome()
static IMPORT_C TColorConvertor *NewL(TDisplayMode aDisplayMode);
Description
Static factory function for creating instances of TColorConvertor derived classes based on the supplied display mode.
Parameters
TDisplayMode aDisplayMode |
The display mode. This determines the TColorConvertor derived type returned. |
|
Return value
TColorConvertor * |
A pointer to a fully constructed TColorConvertor derived object. |
|
Leave codes
KErrNotSupported |
The display mode is not supported. |
|
virtual TInt ColorIndex(TRgb aColor) const=0;
Description
Returns the colour index corresponding to the supplied RGB value. Operates in the context of the current display mode.
This is a virtual function that each derived class must implement.
Parameters
TRgb aColor |
The colour in RGB format. |
|
Return value
virtual TRgb Color(TInt aColorIndex) const=0;
Description
Returns the RGB value corresponding to the supplied colour index. Operates in the context of the current display mode.
This is a virtual function that each derived class must implement.
Parameters
TInt aColorIndex |
The colour in RGB format. |
|
Return value
virtual void ColorToIndex(TInt *aIndexBuffer, TRgb *aColorBuffer, TInt aCount) const=0;
Description
Gets an array of colour indices from a corresponding array of RGB values. Operates in the context of the current display mode.
This is a virtual function that each derived class must implement.
Parameters
TInt *aIndexBuffer |
A pointer to the first element in destination array. |
TRgb *aColorBuffer |
A pointer to the first element in the source array. |
TInt aCount |
The number of elements to get. |
|
static inline TInt RgbToMonochrome(TRgb aRgb);
Description
Parameters
Return value