The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ConvertToColorMap


Unit:SDL_openarrays
Class: none
Declaration: function ConvertToColorMap (var DataArray: TInt2DArray; ColPal: TColorArray): integer;

The function ConvertToColorMap converts the integer matrix DataArray into an RGB color map using ColPal as color palette. The integer values in DataArray are interpreted as indices into the color palette. These value have a valid range between 1 and ColPal.Size, values exceeding this range are automatically truncated to the corresponding limits.

The function returns the following error codes:

 0 ... everything OK
-1 ... undefined data array
-2 ... undefined color palette


Last Update: 2024-Jul-20