| synopsis || arguments || prev || next |

jp2_target::open_codestream

Java: Jp2_target::Open_codestream

void open_codestream( bool rubber_length=true)

Java: void Open_codestream( boolean rubber_length)

[Declared in "../apps/compressed_io/jp2.h"]

Go to class description.


Synopsis

Call this function after write_header. Optionally, you may open and write some of your own boxes, being sure to close them again, before you call the present function. This function opens a contiguous code-stream box, after which you may invoke kdu_codestream::flush on the kdu_codestream object into whose kdu_codestream::create function the present object was passed. To close the contiguous code-stream box, you must explicitly call the jp2_output_box::close function (it is a virtual function).

The rubber_length argument indicates whether or not you want the length of the contiguous code-stream box to be written explicitly. If the box has a rubber length, its length field will be set to 0 and the box is expected to continue to the end of the file. Otherwise, the box's contents must be buffered internally, which might take a lot of memory, so setting rubber_length to true is usually the best approach.

It is possible to write multiple code-streams to the file. To do this, close the first code-stream ( jp2_output_box::close) and then call the present function a second time, and so forth. However, note carefully that only the last code-stream box may have a rubber length.

It is possible to open other boxes after the code-stream, using the base object's jp2_output_box::open_next function. Again, note that this is only possible if the code-stream box had a rubber length.


Arguments

rubber_length [bool]


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