| synopsis || arguments || prev || next |
void set_premult_mapping( int colour_idx, int codestream_component, int lut_idx=-1, int codestream_idx=0)
Java: void Set_premult_mapping( int colour_idx, int codestream_component, int lut_idx, int codestream_idx)
[Declared in "../apps/compressed_io/jp2.h"]
This function is used, together with set_colour_mapping and set_opacity_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 pre-multiplied opacity definitions. There is no obligation to provide pre-multiplied opacity mappings; indeed, the default configuration created by init provides no opacity or pre-multiplied opacity information.
Each pre-multiplied 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.
Identifies the colour intensity channel whose pre-multiplied opacity is being described. The meaning of this argument is identical to that explained in connection with the set_colour_mapping function.
Identifies the code-stream image component (starting from 0) which is used to create the relevant pre-multiplied opacity channel, either by direct assignment or after mapping through a palette LUT.
Set to -1 (the default) if the code-stream image component is to be assigned directly to the pre-multiplied 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.
Index of the code-stream whose components and palette lookup tables (if required) are used to generate this pre-multiplied 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.