Changed the ROI parameter in the image_to_j2k codec to make it correspond to the documentation (i.e. -ROI c=0,U=25)

This commit is contained in:
Francois-Olivier Devaux 2007-10-18 08:14:43 +00:00
parent 1f11a4fe90
commit 5fdc05d18d
2 changed files with 7 additions and 3 deletions

View File

@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed
+ : added
October 18, 2007
* [FOD] Changed the ROI parameter in the image_to_j2k codec to make it correspond to the documentation (i.e. -ROI c=0,U=25)
October 12, 2007
* [FOD] Changed the way the image structure is allocated when the decoding parameters include some resolutions to discard.
This should have a significant impact for the decoding of huge images when some resolutions are discarder (-r parameter)

View File

@ -199,7 +199,7 @@ void encode_help_display() {
fprintf(stdout,"\n");
fprintf(stdout,"-ROI : c=%%d,U=%%d : quantization indices upshifted \n");
fprintf(stdout," for component c=%%d [%%d = 0,1,2]\n");
fprintf(stdout," with a value of U=%%d [0 <= %%d <= 37] (i.e. -ROI:c=0,U=25) \n");
fprintf(stdout," with a value of U=%%d [0 <= %%d <= 37] (i.e. -ROI c=0,U=25) \n");
fprintf(stdout,"\n");
fprintf(stdout,"-d : offset of the origin of the image (-d 150,300) \n");
fprintf(stdout,"\n");
@ -845,6 +845,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
{"EPH",NO_ARG, NULL ,'E'},
{"OutFor",REQ_ARG, NULL ,'O'},
{"POC",REQ_ARG, NULL ,'P'},
{"ROI",REQ_ARG, NULL ,'R'},
};
/* parse the command line */
@ -1219,9 +1220,9 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
case 'R': /* ROI */
{
if (sscanf(optarg, "OI:c=%d,U=%d", &parameters->roi_compno,
if (sscanf(optarg, "c=%d,U=%d", &parameters->roi_compno,
&parameters->roi_shift) != 2) {
fprintf(stderr, "ROI error !! [-ROI:c='compno',U='shift']\n");
fprintf(stderr, "ROI error !! [-ROI c='compno',U='shift']\n");
return 1;
}
}