summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorMatthieu Darbois <mayeut@users.noreply.github.com>2014-11-22 12:30:04 +0000
committerMatthieu Darbois <mayeut@users.noreply.github.com>2014-11-22 12:30:04 +0000
commit0ba5d15b585a46a1b881e0a126a63225bedc767b (patch)
tree70cb12925138d1bf1fa93f13d20f9a88744ee911 /src/bin
parent7e3844607584141d438191433c700d79ffab3b2a (diff)
[trunk] fixed warning in option to force rgb output in opj_decompress (fixes issue 282)
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/jp2/opj_decompress.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c
index bd76dcac..c97835a8 100644
--- a/src/bin/jp2/opj_decompress.c
+++ b/src/bin/jp2/opj_decompress.c
@@ -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