| synopsis || return value || arguments || prev || next |
bool init( jp2_colour colour, bool use_wide_gamut=false, bool prefer_fast_approximations=false)
Java: boolean Init( Jp2_colour colour, boolean use_wide_gamut, boolean prefer_fast_approximations)
[Declared in "../apps/compressed_io/jp2.h"]
Currently, this is the only initialization function. It always initializes the object to convert from the colour space described by colour to sRGB (or to a luminance space with the sRGB gamma function), if possible. In the future, we may provide for the capability to convert between two more general colour descriptions.
Note that it is legal to call this function again, even if it has been successfully called in the past. This will have the effect of deleting the existing conversion specifications and attempting to install new ones.
The following limitations currently exist:
False if the requested colour conversion operation is not supported by the current implementation. Although we endeavour to support the vast majority of JPX-compatible colour spaces, we do not currently support conversion from ICC profiles which use 3D lookup tables, or the JP2_CIEJab_SPACE. Of course, it is also not possible to support vendor-specific colour descriptions here.
Set this argument to true if you would like to avoid (or minimize the likelihood of) gamut truncation during the application of non-linear tone curves. Many colour transformations require sample values to be mapped through a tone curve back to a representation which is linear with respect to radiance, wherein linear transformations are performed, and the results are subsequently transformed again through a non-linear tone curve (typically the sRGB gamma curve). The tone curves are implemented using lookup tables and the inputs to each lookup table are clipped to the nominal range of the colour samples. In most cases, the impact of this clipping is negligible, but it may affect the gamut if the source and output colour spaces have significantly different gamuts. Especially for wide gamut input colour descriptions, the use of a wide gamut mapping is desirable. The current implementation uses lookup tables which are twice as large as they nominally need to be when wide gamut processing is requested.
Set this to true if you don't care too much about exact colour reproduction, but speed is more important (e.g., for video applications). In this case, an approximate opponent transform might be used, or primary transformations might be avoided where the source and output primary chromaticities are sufficiently similar.
| top || synopsis || return value || arguments || prev || next |