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

kdu_channel_mapping::add_alpha_to_configuration

Java: Kdu_channel_mapping::Add_alpha_to_configuration

bool add_alpha_to_configuration( jp2_channels channels, int codestream_idx, jp2_palette palette)

Java: boolean Add_alpha_to_configuration( Jp2_channels channels, int codestream_idx, Jp2_palette palette)

[Declared in "../apps/support/kdu_region_decompressor.h"]

Go to class description.


Synopsis

Unlike the configure functions, this function does not call clear automatically. Instead, it adds an alpha channel to whatever configuration already exists. It is legal (although not useful) to call this function even if an alpha channel has already been configured, since the function strips back the current configuration to include only the colour channels before looking to add an alpha channel. Note, however, that it is perfectly acceptable (and quite useful) to add an alpha channel to a configuration which has just been cleared, so that only alpha information is recovered, without any colour information.

If a single alpha component cannot be found in the channels object, the function returns false. This happens if there is no alpha (opacity) information, or if multiple distinct alpha channels are identified by channels, or if the single alpha channel does not use the indicated codestream. The palette must be provided since an alpha channel may be formed by passing the relevant image component samples through one of the palette lookup tables.


Return Value

True only if there is exactly one opacity channel and it is based on the indicated codestream. Otherwise, the function returns false, adding no channels to the configuration.

Arguments

channels [jp2_channels]

codestream_idx [int]

palette [jp2_palette]


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