reader = fopen(fname, "rb");
if (reader == NULL)
- return -1;
+ return -2;
memset(buf, 0, 12);
l_nb_read = fread(buf, 1, 12, reader);
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",
+ "!! Unrecognized format for infile: %s [accept only *.j2k, *.jp2, *.jpc or *.jpt] !!\n\n",
infile);
return 1;
}