SE_rasbandinfo_set_colormap

Sets the colormap for a raster band

Usage syntax

LONG SE_rasbandinfo_set_colormap (SE_RASBANDINFO rasterband,
SE_COLORMAP_TYPE colormap_type,
SE_COLORMAP_DATA_TYPE data_type,
LONG num_entries,
void *data);

Parameters
rasterband The SE_RASBANDINFO handle
colormap_type The colormap type, i.e. the color model
data_type Data type for individual color
num_entries Number of entries in the colormap
data A pointer to the colormap data
Description

SE_rasbandinfo_set_colormap sets the colormap, or also known as the color lookup table (LUT) in a raster band. The colormap data should be a one-dimensional array. For example, if the colormap type is SE_COLORMAP_RGB, it should have the following structure: r0, g0, b0, r1, g1, b1, . . .

Valid values for SE_COLORMAP_TYPE are:

   SE_COLORMAP_NONE,
SE_COLORMAP_RGB,
SE_COLORMAP_RGBA

Valid values for SE_COLORMAP_DATA_TYPE are:

   SE_COLORMAP_DATA_BYTE,
SE_COLORMAP_DATA_SHORT

Colormaps can only be applied to single band rasters whose bit depth is either 8 or 16 bit. The allowable compression type for rasters with colormaps map is LZ77 (SE_COMPRESSION_LZ77). If a pyramid is created, only the nearest neighbor (SE_INTERPOLATION_NEAREST) interpolation type is allowed. These restrictions are necessary since color-mapped rasters must be able to map to a discrete set of values that will not be resampled.

Returns

SE_SUCCESS
SE_INVALID_POINTER

SE_OUT_OF_CLMEM

SE_INVALID_PARAM_VALUE