All Products
Search
Document Center

ApsaraDB RDS:ST_SetColorInterp

Last Updated:Sep 22, 2023

This topic describes the ST_SetColorInterp function. This function configures the color interpretation type for a specified band of a raster object.

Syntax

raster ST_SetColorInterp(raster rast, integer band_sn, ColorInterp interp);

Parameters

Parameter

Description

rast

The raster that you want to query.

band_sn

The sequence number of the band, which starts from 0.

interp

The color interpretation type.

Description

The following table describes the values of the interp parameter.

Value

Description

Undefined

The color interpretation type is not defined.

GrayIndex

The associated gray color table.

RGBIndex

The associated RGB color table.

RGBAIndex

The associated RGBA color table.

CMYKIndex

The associated CMYK color table.

HSLIndex

The associated HSL color table.

RedBand

The red band.

GreenBand

The green band.

BlueBand

The blue band.

AlphaBand

The alpha band.

HueBand

The hue band in the HSL color model.

SaturationBand

The saturation band in the HSL color model.

LightnessBand

The lightness band in the HSL color model.

CyanBand

The cyan band in the CMYK color model.

MegentaBand

The magenta band in the CMYK color model.

YellowBand

The yellow band in the CMYK color model.

BlackBand

The black band in the CMYK color model.

YBand

The Y band in the YCbCr color model.

CbBand

The Cb band in the YCbCr color model.

CrBand

The Cr band in the YCbCr color model.

Examples

UPDATE raster_table SET rast = ST_SetColorInterp(rast, 0, 'YBand');
Note

You can execute the SELECT enumlabel FROM pg_enum WHERE enumtypid = 'colorinterp'::regtype; statement to query the color interpretation types that can be used.