return nb_bytes;
}
+ OPJ_BOOL seek (OPJ_SIZE_T nb_bytes)
+ {
+ _offset = nb_bytes;
+ return OPJ_TRUE;
+ }
+
Data data () const {
return _data;
}
delete reinterpret_cast<WriteBuffer*>(data);
}
+static OPJ_BOOL
+seek_function (OPJ_OFF_T nb_bytes, void* data)
+{
+ return reinterpret_cast<WriteBuffer*>(data)->seek (nb_bytes);
+}
+
+
Data
dcp::compress_j2k (shared_ptr<const OpenJPEGImage> xyz, int bandwidth, int frames_per_second, bool threed, bool fourk)
{
}
opj_stream_set_write_function (stream, write_function);
+ opj_stream_set_seek_function (stream, seek_function);
WriteBuffer* buffer = new WriteBuffer ();
opj_stream_set_user_data (stream, buffer, write_free_function);
}
if (!opj_end_compress (encoder, stream)) {
+ opj_destroy_codec (encoder);
+ opj_stream_destroy (stream);
throw MiscError ("could not end JPEG2000 encoding");
}