ST_ColorInterp

更新时间:
复制 MD 格式

Returns the color interpretation type of a raster band.

Syntax

text ST_ColorInterp(raster raster_obj, integer band);

Parameters

ParameterDescription
raster_objThe raster object.
bandThe band index, starting from 0.

Return values

Returns one of the following text values:

ValueDescription
UndefinedThe color interpretation type is not defined.
CI_GrayIndexThe index of the associated gray value table.
CI_RGBIndexThe index of the RGB color table.
CI_RGBAIndexThe index of the RGBA color table.
CI_RedThe red band in the RGB color model.
CI_GreenThe green band in the RGB color model.
CI_BlueThe blue band in the RGB color model.
CI_AlphaThe alpha band in the RGBA color model.
CI_HueThe hue band in the HSL color model.
CI_SaturationThe saturation band in the HSL color model.
CI_LightnessThe lightness band in the HSL color model.
CI_CyanThe cyan band in the CMYK color model.
CI_MagentaThe magenta band in the CMYK color model.
CI_YellowThe yellow band in the CMYK color model.
CI_BlackThe black band in the CMYK color model.
CI_YCBCR_YThe Y band in the YCbCr color model.
CI_YCBCR_CbThe Cb band in the YCbCr color model.
CI_YCBCR_CrThe 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)