[trunk] j2k_to_image gives fff-topic error message for non-openable files (Issue#167)
This commit is contained in:
parent
44cec04294
commit
7bfdb31c77
|
@ -274,7 +274,7 @@ static int infile_format(const char *fname)
|
||||||
reader = fopen(fname, "rb");
|
reader = fopen(fname, "rb");
|
||||||
|
|
||||||
if (reader == NULL)
|
if (reader == NULL)
|
||||||
return -1;
|
return -2;
|
||||||
|
|
||||||
memset(buf, 0, 12);
|
memset(buf, 0, 12);
|
||||||
l_nb_read = fread(buf, 1, 12, reader);
|
l_nb_read = fread(buf, 1, 12, reader);
|
||||||
|
@ -352,9 +352,14 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
|
||||||
break;
|
break;
|
||||||
case JPT_CFMT:
|
case JPT_CFMT:
|
||||||
break;
|
break;
|
||||||
|
case -2:
|
||||||
|
fprintf(stderr,
|
||||||
|
"!! infile cannot be read: %s !!\n\n",
|
||||||
|
infile);
|
||||||
|
return 1;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"!! Unrecognized format for infile : %s [accept only *.j2k, *.jp2, *.jpc or *.jpt] !!\n\n",
|
"!! Unrecognized format for infile: %s [accept only *.j2k, *.jp2, *.jpc or *.jpt] !!\n\n",
|
||||||
infile);
|
infile);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue