| synopsis || return value || arguments || prev || next |

jp2_channels::get_colour_mapping

Java: Jp2_channels::Get_colour_mapping

bool get_colour_mapping( int colour_idx, int & codestream_component, int & lut_idx, int & codestream_idx)

Java: boolean Get_colour_mapping( int colour_idx, int[] codestream_component, int[] lut_idx, int[] codestream_idx)

[Declared in "../apps/compressed_io/jp2.h"]

Go to class description.


Synopsis

This function is used, together with get_opacity_mapping and get_premult_mapping, to determine the relationship, if any, between code-stream image components and the reproduction functions of colour intensity, opacity and pre-multiplied opacity. The present function is most important, identifying the source of colour intensity information.

Each colour's intensity may be directly assigned to some code-stream component. Alternatively, it may be associated with the output of a palette lookup table (LUT), together with a code-stream image component which provides indices into the LUT.


Return Value

True if colour_idx identifies a legal colour index.

Arguments

colour_idx [int]

See the set_colour_mapping function for a description of this argument.

codestream_component [int &]

Used to retrieve the index of the code-stream image component (starting from 0) which is used to create the identified colour intensity channel, either by direct assignment or after mapping through a palette LUT.

lut_idx [int &]

Set to -1 (the default) if the code-stream image component is assigned directly to the identified colour intensity channel. Otherwise, the code-stream component samples are indices to a lookup table, where lut_idx gives the index of the lookup table (starting from 0), as it appears in the jp2_palette object.

codestream_idx [int &]

Used to retrieve the index of the code-stream whose components and palette lookup tables (if required) are used to generate the identified colour intensity channel. See the discussion which accompanies the set_colour_mapping function for more details on the meaning of this index in different file formats.


| top || synopsis || return value || arguments || prev || next |