| synopsis || arguments || prev || next |
void open( const char * fname, bool allow_seeks=true)
Java: void Open( String fname, boolean allow_seeks)
[Declared in "../apps/compressed_io/jp2.h"]
Open a JP2-family file, having the indicated name. The function does not actually read anything from the file, and no assumption is made concerning the file structure other than the fact that it should consist of a sequence of boxes, each of which may have sub-boxes, where the box structure conforms to that used by the JP2 family file formats such as JP2, JPX, JPM and MJ2.
Generates an error through kdu_error if the file cannot be opened.
Relative path name of file to be opened.
If false, seeking within the source will not be permitted. Disabling seeking means that any jp2_input_box objects which are opened from the present object will not list KDU_SOURCE_CAP_SEEKABLE amongst their capabilities. This has no effect unless embedded code-stream(s) contains TLM and/or PLT marker segments, in which case the ability to seek within the file can save a lot of memory when working with large images, but this may come at the expense of some loss in speed if we know ahead of time that we want to decompress the entire image(s). Perhaps more significantly, if the source is not seekable, you will only be able to open boxes one at a time, and then only in strict linear order.