[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");
|
||||
|
||||
if (reader == NULL)
|
||||
return -1;
|
||||
return -2;
|
||||
|
||||
memset(buf, 0, 12);
|
||||
l_nb_read = fread(buf, 1, 12, reader);
|
||||
|
@ -352,6 +352,11 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
|
|||
break;
|
||||
case JPT_CFMT:
|
||||
break;
|
||||
case -2:
|
||||
fprintf(stderr,
|
||||
"!! infile cannot be read: %s !!\n\n",
|
||||
infile);
|
||||
return 1;
|
||||
default:
|
||||
fprintf(stderr,
|
||||
"!! Unrecognized format for infile: %s [accept only *.j2k, *.jp2, *.jpc or *.jpt] !!\n\n",
|
||||
|
|
Loading…
Reference in New Issue