This function returns the color interpretation type of a band of a raster object.
Syntax
text ST_ColorInterp(raster raster_obj, integer band);
Parameters
Parameter | Description |
raster_obj | The raster object. |
band | The sequence number of the band, which starts from 0. |
The following table describes the values of the interp parameter that is returned.
Value | Description |
Undefined | The color interpretation type is not defined. |
CI_GrayIndex | The index of the associated gray value table. |
CI_RGBIndex | The index of the RGB color table. |
CI_RGBAIndex | The index of the RGBA color table. |
CI_Red | The red band in the RGB color model. |
CI_Green | The green band in the RGB color model. |
CI_Blue | The blue band in the RGB color model. |
CI_Alpha | The alpha band in the RGBA color model. |
CI_Hue | The hue band in the HSL color model. |
CI_Saturation | The saturation band in the HSL color model. |
CI_Lightness | The lightness band in the HSL color model. |
CI_Cyan | The cyan band in the CMYK color model. |
CI_Magenta | The magenta band in the CMYK color model. |
CI_Yellow | The yellow band in the CMYK color model. |
CI_Black | The black band in the CMYK color model. |
CI_YCBCR_Y | The Y band in the YCbCr color model. |
CI_YCBCR_Cb | The Cb band in the YCbCr color model. |
CI_YCBCR_Cr | The Cr band in the YCbCr color model. |
Example
select ST_ColorInterp(raster_obj,0) from raster_table where id = 1;
st_colorinterp
----------------
CI_YCBCR_Y
(1 row)