add new functions in jp2 codec from v2 branches; solve bug in j2k_setup_encoder_v2

This commit is contained in:
Mickael Savinaud
2012-05-14 09:37:36 +00:00
parent 595c00f55c
commit 1023be33fb
5 changed files with 502 additions and 34 deletions

View File

@@ -1818,8 +1818,17 @@ int main(int argc, char **argv) {
/* encode the image */
bSuccess = opj_start_compress(l_codec,image,l_stream);
if (!bSuccess) {
fprintf(stderr, "failed to encode image: opj_start_compress\n");
}
bSuccess = bSuccess && opj_encode_v2(l_codec, l_stream);
if (!bSuccess) {
fprintf(stderr, "failed to encode image: opj_encode_v2\n");
}
bSuccess = bSuccess && opj_end_compress(l_codec, l_stream);
if (!bSuccess) {
fprintf(stderr, "failed to encode image: opj_end_compress\n");
}
if (!bSuccess) {
opj_stream_destroy(l_stream);