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

kdu_channel_mapping::configure

Java: Kdu_channel_mapping::Configure

Overload navigation: 1, 2, 3

bool configure( jp2_colour colour, jp2_channels channels, int codestream_idx, jp2_palette palette)

Java: boolean Configure( Jp2_colour colour, Jp2_channels channels, int codestream_idx, Jp2_palette palette)

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

Go to class description.


Synopsis

Configures the channel mapping information based on the supplied colour, palette and channel binding information. The object is configured only for colour rendering, regardless of whether the channels object identifies the existence of opacity channels. However, you may augment the configuration with alpha information at a later time by calling add_alpha_to_configuration.


Return Value

All versions of this overloaded function return true if successful. This version returns false only if the colour space cannot be rendered. This gives the caller an opportunity to provide an alternate colour space for rendering. JPX data sources, for example, may provide several related colour descriptions for a single compositing layer. If any other error occurs, the function may invoke kdu_error rather than returninig — this in turn may throw an exception which the caller can catch.

Arguments

colour [jp2_colour]

channels [jp2_channels]

codestream_idx [int]

A JPX source may have multiple codestreams associated with a given compositing layer. This argument identifies the index of the codestream which is to be used with the present configuration when it is supplied to kdu_region_decompressor. The identifier is compared against the codestream identifiers returned via channels.get_colour_mapping and channels.get_opacity_mapping.

palette [jp2_palette]

Used to supply the jp2_palette interface associated with the codestream which is identified by codestream_idx. For JP2 files, there is only one recognized palette and one recognized codestream having index 0. For JPX files, each codestream is associated with its own palette.


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