[trunk] fixed warning in option to force rgb output in opj_decompress (fixes issue 282)

This commit is contained in:
Matthieu Darbois 2014-11-22 12:30:04 +00:00
parent 7e38446075
commit 0ba5d15b58
1 changed files with 4 additions and 8 deletions

View File

@ -139,7 +139,7 @@ typedef struct opj_decompress_params
OPJ_UINT32 nb_precision;
/* force output colorspace to RGB */
OPJ_BOOL force_rgb;
int force_rgb;
}opj_decompress_parameters;
/* -------------------------------------------------------------------------- */
@ -492,7 +492,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para
opj_option_t long_option[]={
{"ImgDir", REQ_ARG, NULL ,'y'},
{"OutFor", REQ_ARG, NULL ,'O'},
{"force-rgb", NO_ARG, NULL ,'FRGB'}
{"force-rgb", NO_ARG, &(parameters->force_rgb), 1}
};
const char optlist[] = "i:o:r:l:x:d:t:p:"
@ -511,6 +511,8 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para
if (c == -1)
break;
switch (c) {
case 0: /* long opt with flag */
break;
case 'i': /* input file */
{
char *infile = opj_optarg;
@ -689,12 +691,6 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para
}
break;
/* ----------------------------------------------------- */
case 'FRGB': /* Force RGB output */
{
parameters->force_rgb = OPJ_TRUE;
}
break;
/* ----------------------------------------------------- */
/* UniPG>> */
#ifdef USE_JPWL