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

kdu_params::translate_marker_segment

Java: Kdu_params::Translate_marker_segment

bool translate_marker_segment( kdu_uint16 code, int num_bytes, kdu_byte bytes[], int which_tile, int tpart_idx)

Java: boolean Translate_marker_segment( int code, int num_bytes, byte[] bytes, int which_tile, int tpart_idx)

[Declared in "../coresys/common/kdu_params.h"]

Go to class description.


Synopsis

This function invokes the protected (and generally overridden) read_marker_segment member function of every object whose tile index agrees with which_tile, in the network of code-stream parameter objects to which the current object belongs, until one is found which returns true. Note that it does not make any difference whether the current object is a cluster head or not. In any event, all objects of all clusters are scanned, starting from the first cluster (usually that associated with the derived siz_params class).

The marker code and the number of segment bytes are explicitly provided. The bytes array starts right after the length indicator of the original marker segment and num_bytes indicates the length of this array (this means that num_bytes is always 2 bytes less than the length indicator in the original code-stream marker segment, since the length indicator includes its own length in JPEG2000).


Return Value

False unless the marker segment was translated by some object.

Arguments

code [kdu_uint16]

The 16-bit marker code. All valid JPEG2000 marker codes have a most significant byte of 0xFF. A set of macros defining useful JPEG2000 marker codes may be found in the "kdu_compressed.h" header file.

num_bytes [int]

Length of the bytes array.

bytes[] [kdu_byte]

Array holding the body of the marker segment.

which_tile [int]

Index of the tile to which the marker segment belongs, or -1 for marker segments belonging to the main header. The first tile in the image has an index of 0.

tpart_idx [int]

Identifies the tile-part in the code-stream from which the marker segment originates. This index has a value of 0 in the first tile-part of each tile and for all marker segments in the main header.


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