[trunk] WIP: correct mistake with JP2 files and manage correctly the text_GBR.jp2 filecase
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user