| synopsis || arguments || prev || next |
void set_precision( int component_idx, int bit_depth, bool is_signed=false)
Java: void Set_precision( int component_idx, int bit_depth, boolean is_signed)
[Declared in "../apps/compressed_io/jp2.h"]
Sets the bit-depth and signed/unsigned characteristics of the indicated image component. This function must be used after the first form of the overloaded init function, to complete the initialization of each individual image component. Its use may be avoided by employing the second form of the init function.
Note that the JP2/JPX file formats were really designed with unsigned representations in mind. In some cases, the use of signed representations is illegal and in others it may create ambiguity. Users are strongly encouraged to adopt unsigned representations when using these file formats.
Must be in the range 0 through num_components-1.
Number of bits per sample. This information is identical to that recorded in the Sprecision attribute of a cod_params parameter object. Legal bit-depths can be in the range 1 through 38; however, applications are ill-advised to select bit-depths larger than about 28, since otherwise reversible compression or decompression on 32-bit architectures might not be achievable.
True if the component's sample values have a signed representation with a nominal range of -2^{B-1} to 2^{B-1}-1 where B is the value of the bit_depth argument. Otherwise, the sample values have a nominally unsigned representation in the range 0 to 2^B-1. This information is identical to that recorded in the Ssigned attribute of a cod_params paramter object.