| synopsis || prev || next |

jp2_source::read_header

Java: Jp2_source::Read_header

bool read_header( )

Java: boolean Read_header( )

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

Go to class description.


Synopsis

Reads the JP2 file up until the first contiguous code-stream box, leaving that box open for reading and returning true once the main code-stream header is available for parsing. If the header has already been read, this function does nothing, but simply returns true immediately. If the ultimate source of information is a dynamic cache, which does not currently have enough information to parse all necessary header boxes, the function may return false. A false return value simply means that the function must be called again later when the cache contents have been augmented. If a parsing error occurs, the function will not return at all, but will generate an error through kdu_error — of course, you can arrange to have exceptions thrown and caught in this case. Regardless of whether the ultimate data source is a cache or not, as soon as this function returns true, it is safe to pass the object directly into the kdu_codestream::create function.


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