| synopsis || arguments || prev || next |

jp2_channels::set_opacity_mapping

Java: Jp2_channels::Set_opacity_mapping

void set_opacity_mapping( int colour_idx, int codestream_component, int lut_idx=-1, int codestream_idx=0)

Java: void Set_opacity_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 set_colour_mapping and set_premult_mapping, to establish the relationship, if any, between the code-stream image components and the reproduction functions of colour intensity, opacity and pre-multiplied opacity. The present function may be used to provide opacity definitions. There is no obligation to provide opacity mappings; indeed, the default configuration created by init provides no opacity information.

Each opacity channel (there can be one for each colour) 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.


Arguments

colour_idx [int]

Identifies the colour intensity channel whose opacity is being described. The meaning of this argument is identical to that explained in connection with the set_colour_mapping function.

codestream_component [int]

Identifies the code-stream image component (starting from 0) which is used to create the relevant opacity 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 to be assigned directly to the opacity 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]

Index of the code-stream whose components and palette lookup tables (if required) are used to generate this opacity channel. See the discussion which accompanies the set_colour_mapping function for more details on the meaning of this index and how it should be used with different file formats.


| top || synopsis || arguments || prev || next |