| synopsis || arguments || prev |

kdu_image_in::get

bool get( int comp_idx, kdu_line_buf & line, int x_tnum)

[Declared in "../apps/image/kdu_image.h"]

Go to class description.


Synopsis

Retrieves a new tile-line from the image component identified by comp_idx, or returns false if the input file is exhausted.

x_tnum must hold the horizontal tile index (starting from 0). This is used to determine how much of each line has already been read and so control internal line buffering. We leave line buffering to the image reading object itself, since it knows the smallest amount of memory which can actually be buffered; however, to simplify line buffering, we insist on the following rules which should not prove burdensome:

Sample values in the line buffer are always signed quantities. For normalized (floating or fixed point) sample values, the nominal range is from -0.5 to 0.5, while for absolute integer values, the range is from -2^{B-1} to 2^{B-1}, where B is the bit-depth. The function takes care of renormalizing, and conversion between signed and unsigned data types.


Arguments

comp_idx [int]

Must lie within the range of valid component indices for this object. This range runs consecutively from the value of the next_comp_idx argument passed to the constructor, kdu_image_in::kdu_image_in.

line [kdu_line_buf &]

The supplied object must have already been created. The line.get_buf16 or line.get_buf32 function is used to access the line's internal buffer and fill it with samples recovered from the image. The actual number of samples associated with the tile-line being requested is given by the line.get_width function.

x_tnum [int]

Horizontal tile index associated with the current tile line. Tile indices start from 0 — see above.


| top || synopsis || arguments || prev |