diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-10-11 07:49:16 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-10-11 07:49:16 +0000 |
| commit | c7d3b83164b8c0a857fec52da005bd736fcce30c (patch) | |
| tree | 76c3b68eb008c8064b2b44db03fbab9400cf4e3e /applications/codec | |
| parent | 7c87bb35c45a0bd52fd4425e9d005606186193d0 (diff) | |
[trunk] WIP: correct mistake with JP2 files and manage correctly the text_GBR.jp2 filecase
Diffstat (limited to 'applications/codec')
| -rw-r--r-- | applications/codec/j2k_to_image.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/applications/codec/j2k_to_image.c b/applications/codec/j2k_to_image.c index 65ba1e5a..cbc00606 100644 --- a/applications/codec/j2k_to_image.c +++ b/applications/codec/j2k_to_image.c @@ -579,8 +579,6 @@ int main(int argc, char **argv) opj_image_t image; opj_stream_t *cio = NULL; /* Stream */ opj_codec_t* dinfo = NULL; /* Handle to a decompressor */ - opj_bool bRes1, bRes2; - char indexfilename[OPJ_PATH_LEN]; /* index file name */ @@ -713,13 +711,8 @@ int main(int argc, char **argv) return EXIT_FAILURE; } - /* Get the decoded image */ - bRes1 = opj_decode_v2(dinfo, cio, &image); - bRes2 = opj_end_decompress(dinfo,cio); - - /*if ( !(opj_decode_v2(dinfo, cio, &image)) || !(opj_end_decompress(dinfo,cio)) ) {*/ - if ( !bRes1 || !bRes2) { + if ( !( opj_decode_v2(dinfo, cio, &image) && opj_end_decompress(dinfo,cio) ) ) { fprintf(stderr, "ERROR -> j2k_to_image: failed to decode image!\n"); opj_destroy_codec(dinfo); opj_stream_destroy(cio); |
