From: Francois-Olivier Devaux Date: Thu, 18 Oct 2007 08:14:43 +0000 (+0000) Subject: Changed the ROI parameter in the image_to_j2k codec to make it correspond to the... X-Git-Tag: version.1.3~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fdc05d18d4831ead22948950ba279fadfc6b71d;p=openjpeg Changed the ROI parameter in the image_to_j2k codec to make it correspond to the documentation (i.e. -ROI c=0,U=25) --- diff --git a/ChangeLog b/ChangeLog index f0b1922d..9df723ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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) diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index 06b1215e..470bd119 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -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", ¶meters->roi_compno, + if (sscanf(optarg, "c=%d,U=%d", ¶meters->roi_compno, ¶meters->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; } }