Provides full support for generating or copying JPX
files. Note that the most correct suffix to use for
JPX files is actually ".jpf", not ".jpx", although
the latter is still a reasonable choice. The typical
sequence of operations used to generate a JPX file
is as follows:
-
Create and open a
jp2_family_tgt object.
-
Pass this object to
jpx_target::open.
-
Add at least one codestream using
jpx_target::add_codestream and at least one composition layer using
jpx_target::add_layer.
-
Configure the various parameters of the
jpx_codestream_target and
jpx_layer_target interfaces returned via the above-mentioned functions.
-
Call
write_headers to write the JPX file header and as many of the compositing
layer and codestream header boxes as you like. If you
have installed breakpoints using
jpx_codestream_target::set_breakpoint or
jpx_layer_target::set_breakpoint, you must call
write_headers multiple times, writing additional boxes of your choice
after each breakpoint.
-
Optionally write additional boxes after
write_headers returns true.
-
Pass through each
jpx_codestream interface in turn, using its
jpx_codestream::open_stream function to open a contiguous codestream box. Pass
this box directly to
kdu_codestream::create and generate the codestream using
kdu_codestream::flush. Alternatively, you may write directly to the open
box (e.g., to copy a code-stream, or write a non-JPEG2000
codestream).
-
If you have used the
codestream_threshold feature of the
write_headers function you may need to invoke it again periodically,
so as to interleave codestream header boxes and/or
compositing layer header boxes with the codestreams
themselves.
-
Optionally write additional boxes after generating
each codestream.
-
Call
close to finish the JPX file (it may or may not write additional
boxes) and clean up internal resources.
-
Call
jp2_family_tgt::close when you are completely finished.
Note that this object will make every effort to produce
JPX files which are also JP2 compatible, recording
the outcome of the relevant compatibility tests in
the file-type box. For this reason, an application
may choose to always write JPX files, even if the JP2
feature set is sufficient for its purposes.
jpx_target (2 forms) {Java: Jpx_target}
~jpx_target [virtual] {Java: Native_destroy}
operator=
exists {Java: Exists}
operator!
open [virtual] {Java: Open}
access_compatibility {Java: Access_compatibility}
add_codestream {Java: Add_codestream}
add_layer {Java: Add_layer}
access_composition {Java: Access_composition}
access_meta_manager
write_headers
write_metadata
close [virtual] {Java: Close}