summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2014-03-25 15:35:33 +0000
committerAntonin Descampe <antonin@gmail.com>2014-03-25 15:35:33 +0000
commit5e1a0fad085a67dc840fb0b9e856d37c91a1d685 (patch)
treeea96c1c1d3f9cd47f3a99f682843f586e1846a8e /src
parentc05118dc49dab49f72a4798b1c67ab16c615f596 (diff)
[trunk] fixed bug related to r2791
Diffstat (limited to 'src')
-rw-r--r--src/bin/jp2/opj_compress.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c
index 3cd63e2b..f3a20d0d 100644
--- a/src/bin/jp2/opj_compress.c
+++ b/src/bin/jp2/opj_compress.c
@@ -1476,7 +1476,7 @@ int main(int argc, char **argv) {
memset(&img_fol,0,sizeof(img_fol_t));
/* parse input and get user encoding parameters */
- parameters.tcp_mct = -1; /* This will be set later according to the input image or the provided option */
+ parameters.tcp_mct = (char) 255; /* This will be set later according to the input image or the provided option */
if(parse_cmdline_encoder(argc, argv, &parameters,&img_fol, &raw_cp, indexfilename) == 1) {
return 1;
}
@@ -1636,8 +1636,8 @@ int main(int argc, char **argv) {
}
/* Decide if MCT should be used */
- if (parameters.tcp_mct == -1) { /* mct mode has not been set in commandline */
- parameters.tcp_mct = image->numcomps >= 3 ? 1 : 0;
+ if (parameters.tcp_mct == (char) 255) { /* mct mode has not been set in commandline */
+ parameters.tcp_mct = (image->numcomps >= 3) ? 1 : 0;
} else { /* mct mode has been set in commandline */
if ((parameters.tcp_mct == 1) && (image->numcomps < 3)){
fprintf(stderr, "RGB->YCC conversion cannot be used:\n");