[trunk] fixed warning in option to force rgb output in opj_decompress (fixes issue 282)
This commit is contained in:
parent
7e38446075
commit
0ba5d15b58
|
@ -139,7 +139,7 @@ typedef struct opj_decompress_params
|
||||||
OPJ_UINT32 nb_precision;
|
OPJ_UINT32 nb_precision;
|
||||||
|
|
||||||
/* force output colorspace to RGB */
|
/* force output colorspace to RGB */
|
||||||
OPJ_BOOL force_rgb;
|
int force_rgb;
|
||||||
}opj_decompress_parameters;
|
}opj_decompress_parameters;
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
@ -492,7 +492,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para
|
||||||
opj_option_t long_option[]={
|
opj_option_t long_option[]={
|
||||||
{"ImgDir", REQ_ARG, NULL ,'y'},
|
{"ImgDir", REQ_ARG, NULL ,'y'},
|
||||||
{"OutFor", REQ_ARG, NULL ,'O'},
|
{"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:"
|
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)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
case 0: /* long opt with flag */
|
||||||
|
break;
|
||||||
case 'i': /* input file */
|
case 'i': /* input file */
|
||||||
{
|
{
|
||||||
char *infile = opj_optarg;
|
char *infile = opj_optarg;
|
||||||
|
@ -689,12 +691,6 @@ int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *para
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
/* ----------------------------------------------------- */
|
/* ----------------------------------------------------- */
|
||||||
case 'FRGB': /* Force RGB output */
|
|
||||||
{
|
|
||||||
parameters->force_rgb = OPJ_TRUE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
/* ----------------------------------------------------- */
|
|
||||||
|
|
||||||
/* UniPG>> */
|
/* UniPG>> */
|
||||||
#ifdef USE_JPWL
|
#ifdef USE_JPWL
|
||||||
|
|
Loading…
Reference in New Issue